0
User-AgentやRefererのようなパラメータが必要なストリーミングHLS(m3u8)を再生しようとしていますが動作しません。Vitamio Androidでヘッダーを設定する
マイコード:
...
Map<String,String> options = new HashMap<>();
options.put("Referer","Xxxxxxxx");
options.put("User-Agent","Yyyyyyyy");
videoView.setVideoURI(streamURI,options);
...
と応答:
D/Vitamio[5.0.1][Player]: [http @ 0x9627e500] HTTP error 403 Forbidden
E/Vitamio[5.0.1][Player]: avformat_open_input: Server returned 403 Forbidden (access denied) : -858797304
また、私はこのようにそれを使用しようとしました:結果は同じだった
options.put("headers","Referer:Xxxxxxxx\r\n");
options.put("headers","User-Agent:Yyyyyyyy\r\n");
...
coにエラーがありますか? de?フォーマット?命令はおそらく?
ありがとうございました。
私はライブラリ=/ – AndrewL6891
を変更したので覚えていません。これはhttps://github.com/Bilibili/ijkplayerにも役立ちます – powerthazan