Commit a81f3592 by Tianqing Liu

feat: 增加右键菜单

1 parent 0cdb131c
...@@ -91,9 +91,29 @@ export default { ...@@ -91,9 +91,29 @@ export default {
performance: true, performance: true,
quality: false, quality: false,
}, },
contextmenuBtns: [{
content: '切换性能面板',
index: 1,
click: () => {
const playStatus = this._jessibuca.getStatus()
if (playStatus === 'playing') {
this._jessibuca.togglePerformancePanel();
} else {
console.log('请先播放视频');
}
},
}, {
content: '关于',
index: 2,
click: () => {
window.open("http://vion-tech.com/", "_blank");
},
}],
extendOperateBtns: [], extendOperateBtns: [],
showBandwidth: true, // 显示网速 showBandwidth: true, // 显示网速
showPerformance: false, // 显示性能 showPerformance: false, // 显示性能
// 云台控制 // 云台控制
ptzClickType: 'click', // click mouseDownAndUp ptzClickType: 'click', // click mouseDownAndUp
ptzZoomShow: true, ptzZoomShow: true,
...@@ -145,6 +165,7 @@ export default { ...@@ -145,6 +165,7 @@ export default {
play(url) { play(url) {
if (url) { if (url) {
// 播放地址不同,则先停止再播放。 // 播放地址不同,则先停止再播放。
// TODO: 尝试销毁后,再创建的方式 demo-flv.html
if (this.playOriginUrl && this.playOriginUrl !== url) { if (this.playOriginUrl && this.playOriginUrl !== url) {
this.stop(); this.stop();
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!