I use video-js player, but I can't view HLS in it.
我使用video-js播放器,但我无法在其中查看HLS。
I loaded videojs-contrib-hls
, but it didn't help.
我加载了videojs-contrib-hls,但它没有帮助。
The media could not be loaded, either the server or network failed or because the format is not supported.
无法加载媒体,无论是服务器还是网络失败,或者因为不支持该格式。
I have these two lines in the <head>
:
我在中有这两行:
<link href="vjs.zencdn.net/5.9.2/video-js.css"; rel="stylesheet">
<script src="vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script>
In <body>
:
<video id="my-video" class="video-js" controls preload="auto" style= "width:100%; height:100%" data-setup="{}">
<source src="fambox.tv:1935/vod/smil:1. PK_Film_HD.mp4.smil/playlist.m3u8" type="application/x-mpegURL">
</video>
1 个解决方案
#1
0
you need to add videojs hls library
你需要添加videojs hls库
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.5.3/videojs-contrib-hls.js"></script>
在此输入链接描述
#1
0
you need to add videojs hls library
你需要添加videojs hls库
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.5.3/videojs-contrib-hls.js"></script>
在此输入链接描述