我完全不了解MPEG-DASH自适应流技术。我正在尝试使用浏览器中的dash.js创建视频播放器。我已经参考了一些有用的MPEG-DASH自适应流文档,这些链接如下:
但是,脚本https://cdn.dashjs.org/latest/dash.all.min.js也很好用。而且当我在https://reference.dashif.org/dash.js/1.4.0/samples/dash-if-reference-player/index.html视频播放器中添加
实际上,我在这里缺少什么?有什么建议或帮助吗?
<!DOCTYPE html>
<html>
<head>
<title>Adaptive Streaming in HTML5</title>
<style>
video {
width: 640px;
height: 360px;
}
</style>
</head>
<body>
<div>
<h1>Adaptive Streaming with HTML5</h1>
<video id="videoplayer" controls></video>
<div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<!-- DASH-AVC/265 reference implementation -->
<script src="https://cdn.dashjs.org/latest/dash.all.min.js"></script>
<script></script>
</body>
</html>
但是在 chrome (版本 63.0.3239.132 (官方构建) (64 位))
和 mozilla (版本57.0(64 位))
上运行后,我无法看到这个播放器中播放的任何视频。以下是输出屏幕截图:
我正在尝试在本地浏览器上运行。这会有什么问题吗?点击播放按钮后,我无法看到任何视频。在 Mozilla
浏览器中,我可以看到以下内容:
[dash.js 2.6.4] MediaPlayer has been initialized
The character encoding of the HTML document was not declared.
The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range.
The character encoding of the page must be declared in the document or in the transfer protocol.
但是,脚本https://cdn.dashjs.org/latest/dash.all.min.js也很好用。而且当我在https://reference.dashif.org/dash.js/1.4.0/samples/dash-if-reference-player/index.html视频播放器中添加
https://dash.akamaized.net/envivio/EnvivioDash3/manifest.mpd
URL时也正常工作。实际上,我在这里缺少什么?有什么建议或帮助吗?