|
|
@@ -0,0 +1,57 @@
|
|
|
+function video_paly() {
|
|
|
+ var height = 264;
|
|
|
+ var width = 640;
|
|
|
+
|
|
|
+ __inline('/node_modules/video.js/dist/video.min.js');
|
|
|
+ var css = "<style lang='css/text'>"+ __inline('/node_modules/video.js/dist/video-js.min.css')+" .video-js .vjs-fullscreen-control { display: none;} </style>";
|
|
|
+
|
|
|
+
|
|
|
+ var html =css+ '<video' +
|
|
|
+ ' id="my-player"' +
|
|
|
+ ' class="video-js"' +
|
|
|
+ ' controls' +
|
|
|
+ ' preload="auto"' +
|
|
|
+ ' poster="//vjs.zencdn.net/v/oceans.png"' +
|
|
|
+ ' width="'+width+'" height="'+height+'"' +
|
|
|
+ ' data-setup=\'{}\'>' +
|
|
|
+ ' <source src="//vjs.zencdn.net/v/oceans.mp4" type="video/mp4"></source>' +
|
|
|
+ ' <source src="//vjs.zencdn.net/v/oceans.webm" type="video/webm"></source>' +
|
|
|
+ ' <source src="//vjs.zencdn.net/v/oceans.ogv" type="video/ogg"></source>' +
|
|
|
+ ' <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>';
|
|
|
+
|
|
|
+ layer.open({
|
|
|
+ area: [width+"px", height+"px"],
|
|
|
+ type: 1,
|
|
|
+ title: false,
|
|
|
+ closeBtn: 0,
|
|
|
+ shadeClose: true,
|
|
|
+ content: html
|
|
|
+ });
|
|
|
+
|
|
|
+ var player = videojs('my-player');
|
|
|
+
|
|
|
+ var options = {
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
+ var player = videojs('my-player', options, function onPlayerReady() {
|
|
|
+ videojs.log('Your player is ready!');
|
|
|
+
|
|
|
+ // In this context, `this` is the player that was created by Video.js.
|
|
|
+ this.play();
|
|
|
+
|
|
|
+ // How about an event listener?
|
|
|
+ this.on('ended', function () {
|
|
|
+ videojs.log('Awww...over so soon?!');
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+}
|