【发布时间】:2016-05-26 08:41:54
【问题描述】:
我正在关注 github:https://github.com/videojs/videojs-contrib-hls#getting-started 并且还关注了该帖子 How to play html5 video play m3U8 on mobile and desktop? 在 chrome 中流式传输 m3u8。但我不明白为什么这没有发生。我总是在媒体播放器上收到错误消息无效来源。
<!DOCTYPE html>
<html>
<head>
<title>Video</title>
<meta charset="utf-8" />
<style>
body {
background: brown;
color: #CCCCCC;
}
</style>
<script src="video.js"></script>
<script src="videojs.hls.min.js"></script>
<script>
var player = videojs('example-video');
player.play();
</script>
</head>
<body>
<video id=example-video width=960 height=540 class="video-js vjs-default-skin" controls>
<source
src="http://esioslive6-i.akamaihd.net/hls/live/202874/AL_P_ESP1_INTER_ENG/playlist_1000.m3u8"
type="application/x-mpegURL">
</video>
</body>
</html>
这里是目录。我已经从这里下载了videojs-contrib-hls和videojs-contrib-hls.minhttps://github.com/videojs/videojs-contrib-hls/releases
此外,当我从 chrome 控制台检查时,我发现了我试图解决但失败的错误。 错误:
Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///C:/Users/MIC/Desktop/sss/videojs.hls.min.js Failed to load resource: net::ERR_FILE_NOT_FOUND
index.html:16 Uncaught ReferenceError: videojs is not defined
知道我哪里做错了吗?
【问题讨论】:
标签: javascript google-chrome streaming html5-video m3u8