【发布时间】:2014-06-01 13:11:27
【问题描述】:
我想使用 HTML5 流式传输实时视频。到目前为止我已经尝试过
<!DOCTYPE html>
<html>
<head>
<title>Video.js | HTML5 Video Player</title>
<!-- Chang URLs to wherever Video.js files will be hosted -->
<link href="video-js.css" rel="stylesheet" type="text/css">
<!-- video.js must be in the <head> for older IEs to work. -->
<script src="video.js"></script>
<!-- Unless using the CDN hosted version, update the URL to the Flash SWF -->
<script>
videojs.options.flash.swf = "video-js.swf";
</script>
</head>
<body>
<video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="640" height="264"
poster="http://video-js.zencoder.com/oceans-clip.png"
data-setup="{}">
<source src="http://my stream url .m3u8" />
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
</video>
</body>
</html>
它在 Opera TV Emulator 中不起作用。当我用一些 mp4 视频文件替换 url 时,它可以工作。
如何在 Opera TV Emulator 中加载视频?
注意:以上代码仅适用于 Safari 浏览器。不在 chrome、firefox 等上。
【问题讨论】:
标签: video-streaming html5-video opera live-streaming television