【发布时间】:2019-01-30 19:12:35
【问题描述】:
在使用 video.js (videojs.com) 时遇到一些问题
这个简单的 html 是从他们的示例中提取的: https://github.com/videojs/video.js/releases/download/v7.5.0/video-js-7.5.0.zip
首先,我只想让“等待播放器准备好”工作并获得“嗨”弹出窗口。 (https://docs.videojs.com/docs/guides/api.html)
https://jsfiddle.net/a7pn0j28/
<!DOCTYPE html>
<html lang="en">
<head>
<title>Video.js | HTML5 Video Player</title>
<link href="https://vjs.zencdn.net/7.0/video-js.min.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/7.0/video.min.js"></script>
<script>
videojs("example_video_1").ready(function(){
alert('hi')
//var myPlayer = this;
// EXAMPLE: Start playing the video.
//myPlayer.play();
});
</script>
</head>
<body>
<video id="example_video_1" class="video-js" controls preload="none" width="640" height="264" poster="http://vjs.zencdn.net/v/oceans.png" data-setup="{}">
<source src="http://vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
<source src="http://vjs.zencdn.net/v/oceans.webm" type="video/webm">
</video>
</body>
</html>
【问题讨论】:
标签: javascript video.js