Vue中使用Videojs播放插件 https://www.cnblogs.com/i-am-luckyGuy/p/11626707.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="author" content="adeng.y"> <link rel="dns-prefetch" href="//www.adeng.vip" /> <meta name="keywords" content="video.5.13.0.js,視頻播放,播放插件,Video.js,jquery視頻播放插件,flashs視頻播放,播放器,jquery視頻,VideoJS,VideoJS是什么,VideoJS下載,VideoJS使用教程,前端蝸牛"> <meta name="description" content="Video.js 是一個通用的在網頁上嵌入視頻播放器的 JS 庫,Video.js 自動檢測瀏覽器對 HTML5 的支持情況,如果不支持 HTML5 則自動使用 Flash 播放器。(要支持ie低版本請下載5.4.3版 )" /> <title>視頻播放插件video.5.13.0.js——adeng.y 前端蝸牛</title> <link href="img/video-js.min.css" rel="stylesheet"> <script src="img/videojs-ie8.min.js"></script> <style> *{padding:0;margin:0} body{width:100%;background:#337ab7; color: #fff; } a{ color: #fff; } .none{display:none} .video,.docs{ width: 800px; margin: 30px auto; } .video-js .vjs-big-play-button{ top: 50%; left: 50%; margin-top: -0.8em; margin-left: -0.8em; width: 1.6em; height: 1.6em; border-radius: 50%; } </style> </head> <body> <div class="page"> <div class="docs">Video.js 是一個通用的在網頁上嵌入視頻播放器的 JS 庫,Video.js 自動檢測瀏覽器對 HTML5 的支持情況,如果不支持 HTML5 則自動使用 Flash 播放器。(要支持ie低版本請下載5.4.3版 )</div> <div class="video"> <video id="claphands" class="video-js vjs-default-skin vjs-big-play-centered"> <source src="img/shjwj.mp4"> </video> </div> <p style="padding-top: 20px; text-align: center;"> 官網:http://www.videojs.com/ </p> <script src="https://cdn.bootcss.com/jquery/1.7.1/jquery.min.js"></script> <script src="img/video.min.js"></script> <script> videojs(document.getElementById('claphands'), { controls: true, preload: 'auto', width: 800, height: 400, flash: { swf: 'img/video-js.swf' } }, function() {}); </script> </body> </html>
官網:http://www.videojs.com/
視頻播放video.js參數:
videojs(document.getElementById('claphands'), { controls: true, preload: 'auto', // 預先加載視頻 width: 462, // 視頻寬度 height: 207, // 視頻高度 autoplay : false, // 是否自動播放 flash: { swf: 'img/video.js_5.13.0_video-js.swf' //ie加載swf } }, function() {});
效果:
下載: