We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
大佬你好 我们公司的m3u8播放链接不想暴漏域名,使用了cdn的ip地址进行播放,并在headers中添加host 现在问题是不能正常播放,因为没有正确的host,播放地址会返回403 下方是具体代码
//尝试添加header到option(host添加到header不可用) playUrl="http://58.215.151.57/dianshiju/105420/sz01/sz01_720.m3u8?stTime=1591083278&token=6002d5387b145dbbaea9bf4bef922e7f"; var platform = [TargetPlatform.android, TargetPlatform.iOS];
// var options = [IjkOption(IjkOptionCategory.format, "host", header["host"])]; var options = [IjkOption(IjkOptionCategory.format, "headers", header)]; mediaController.setIjkPlayerOptions(platform, options); await mediaController.setNetworkDataSource(playUrl, autoPlay: true);
我感觉IjkOption使用了headers和host两种方式,都不能真实的把host添加到headers中,导致此问题,请问有没有解决办法
The text was updated successfully, but these errors were encountered:
他里面提供了方法
controller.setNetworkDataSource(url, autoPlay: true, headers: {'host': ' 127.0.0.1'})
但是注意的是,header的value值前面必须添加一个空格才可以 在ijkplayer里面也是相同的解决方案 bilibili/ijkplayer#4946 bilibili/ijkplayer#3693 bilibili/ijkplayer#2648
Sorry, something went wrong.
No branches or pull requests
大佬你好
我们公司的m3u8播放链接不想暴漏域名,使用了cdn的ip地址进行播放,并在headers中添加host
现在问题是不能正常播放,因为没有正确的host,播放地址会返回403
下方是具体代码
// var options = [IjkOption(IjkOptionCategory.format, "host", header["host"])];
var options = [IjkOption(IjkOptionCategory.format, "headers", header)];
mediaController.setIjkPlayerOptions(platform, options);
await mediaController.setNetworkDataSource(playUrl, autoPlay: true);
我感觉IjkOption使用了headers和host两种方式,都不能真实的把host添加到headers中,导致此问题,请问有没有解决办法
The text was updated successfully, but these errors were encountered: