導航:首頁 > 編程語言 > videojs音量調節

videojs音量調節

發布時間:2025-01-08 08:47:40

⑴ videojs如何在控制欄上增加一個按鈕

這是實現之後的效果

源碼:

//自定義控制條
var player = videojs(videoId,
{
"controls": true,
"autoplay": false,
"preload": "auto",
"loop": false,
controlBar:
{
captionsButton: false,
chaptersButton: false,
playbackRateMenuButton: true,
LiveDisplay: true,
subtitlesButton: false,
remainingTimeDisplay: true,
progressControl: true,
volumeMenuButton:
{
inline: false,
vertical: true
},
//豎著的音量條
fullscreenToggle: true
}
}, function () {

var newbtn = document.createElement('btn');
newbtn.innerHTML = '<button class="vjs-control" id="downloadButton"><i class="fa fa-expand" title="全屏"></i></button>' + '<button class="vjs-control" id="full_screen_button"><i class="fa fa-chrome" title="截圖"></i></button>' ;
var controlBar = document.getElementsByClassName('vjs-control-bar')[0];
insertBeforeNode = document.getElementsByClassName('vjs-fullscreen-control')[0];
controlBar.insertBefore(newbtn,insertBeforeNode);
player.src({ type : "rtmp/flv", src : r.roomLiveUri});
player.play();
});

裡面用到了一些前端框架的樣式,所以按鈕圖標你需要自己去找,參考的是這位大佬的博客:網頁鏈接

閱讀全文

與videojs音量調節相關的資料

熱點內容
ai中線段怎麼添加寬度配置文件 瀏覽:956
lol文件怎麼找不到game 瀏覽:142
aecc視頻教程 瀏覽:983
linux怎麼查看資料庫用戶名 瀏覽:182
cefs文件系統 瀏覽:404
學平面設計個編程哪個好 瀏覽:701
如何把編程文件轉為hex 瀏覽:80
清除蘋果地圖來自地址 瀏覽:233
已經打開的文件如何清理 瀏覽:685
視頻網站有什麼用 瀏覽:70
多個表格文件怎樣壓縮文件 瀏覽:729
cad文件大很卡如何解決 瀏覽:633
將java程序打包成apk 瀏覽:277
2021唱吧文件找不到了 瀏覽:463
華為p9手機文件管理 瀏覽:284
固定在工具欄的文件夾怎麼查找路徑 瀏覽:667
半條命2有幾個版本 瀏覽:333
電腦管家微信備份文件夾 瀏覽:826
ubuntu文件夾解鎖 瀏覽:34
網站多少錢一單 瀏覽:382

友情鏈接