videojs hls在android上不起作用

时间:2016-11-03 22:54:18

标签: javascript android html5 video.js

嗨videojs hls插件在Android上不起作用但它适用于chrome,firefox,safari,ios不确定android上有什么问题

<video id=example-video width=960 height=540 class="video-js vjs-default-skin" controls>
  <source
     src="https://example.com/index.m3u8"
     type="application/x-mpegURL">
</video>
<script src="video.js"></script>
<script src="videojs.hls.min.js"></script>
<script>
var player = videojs('example-video');
player.play();
</script>

我尝试使用5.10 - 5.11.9但仍未成功

videojs的例子也不起作用

https://videojs.github.io/videojs-contrib-hls/

video.js:21202VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported. 

https://i.imgur.com/r70Cotj.jpg

1 个答案:

答案 0 :(得分:0)

我刚刚找到了阻止其他引用者的原因而不是我的域名由nginx

valid_referers mysite.tv;

if ($invalid_referer) {
return 403; 
}

我试图通过fiddler嗅探android并看到android只是不发送

Referer

标题。当我禁用它时,开始工作。感谢