| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- var media_count = 0;
- function video_paly(src) {
- var height = 264;
- var width = 640;
- 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 list = src.split(".");
- var videotype = list[list.length - 1]
- var html = css + '<video' +
- ' id="my-player' + (++media_count) + '"' +
- ' class="video-js"' +
- ' controls' +
- ' preload="auto"' +
- ' width="' + width + '" height="' + height + '"' +
- ' data-setup=\'{}\'>' +
- ' <source src=\'' + src + '\' type="video/' + videotype + '"></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: 1,
- shadeClose: true,
- content: "<div id='video_content_div'>" + html + "</div>",
- success: function() {
- var options = {
- };
- var player = videojs('my-player' + media_count, 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?!');
- });
- });
- }
- });
- }
|