问题描述
我对这种应用程序完全陌生,所以几天前我关注了 this tutorial 并且它在 VLC 上运行良好。但是当我尝试使用网络浏览器检查时,它不起作用。
所以我搜索了一个新的解决方案并发现了 Video.js。我尝试的所有测试都失败了,在最后一次测试中,我收到消息:无法加载媒体,原因可能是服务器或网络失败,或者格式不受支持。 视频是 MP4 格式,如何处理 HLS?知道我尝试了其他应该可以与 MP4 配合使用的脚本,但由于不再支持 Flash,它根本无法工作。
我的代码:
<!DOCTYPE html>
<html>
<head>
<Meta charset=utf-8 />
<title>videojs-contrib-hls embed</title>
<link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet">
</head>
<body>
<video-js id="my_video_1" class="vjs-default-skin" controls preload="auto" width="640" height="268">
<source src="rtmp://localhost:1935/vod2/test_video.mp4" type="application/x-mpegURL">
</video-js>
<script src="https://unpkg.com/video.js/dist/video.js"></script>
<script src="https://unpkg.com/@videojs/http-streaming/dist/videojs-http-streaming.js"></script>
<script>
var player = videojs('my_video_1');
</script>
</body>
</html>
请你帮帮我,我已经为此工作了两周,我从来没有做过这种代码,所以请多多包涵。谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)