Commit 70863b03 by 李乾广

Merge branch 'qxh-master' of http://git.keliuyun.com:55676/jiaxiuc123/miniProject into qxh-master

2 parents 6cc73b35 a81f3592
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -49,23 +49,28 @@ export default {
const options = Object.assign({
container: this.$refs.container,
decoder: '/jessibuca-pro/decoder-pro.js',
isResize: false,
text: '', // TODO: 功能暂不清楚
useMSE: true,
useWCS: false,
isNotMute: false,
timeout: 10,
keepScreenOn: true, // 屏幕常亮
isResize: false,
isNotMute: false,
debug: false, // 是否开启控制台调试打印
// 播放相关
videoBuffer: 0.1, // 缓存时长
videoBufferDelay: 0.2, // 缓存延迟(延迟超过会触发丢帧)
// TODO: 是否通过浏览器API判断是否支持后,再赋值true或false
useMSE: true,
useWCS: false,
// useSIMD: true,
timeout: 10, // 在连接成功之前(loading)和播放中途(heart),如果超过设定时长无数据返回,则回调timeout事件
// 按钮和界面
loadingText: '加载中...',
controlAutoHide: this.controlAutoHide,
supportDblclickFullscreen: false,
showBandwidth: false, // 显示网速
// TODO: 水印功能暂不可用
fullscreenWatermarkConfig: {
text: '文安智能',
text: this.watermarkText || '',
},
/* watermarkConfig: {
image: {
......@@ -83,14 +88,37 @@ export default {
audio: true,
ptz: true, // 云台
zoom: true,
performance: false,
performance: true,
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: [],
showBandwidth: true, // 显示网速
showPerformance: false, // 显示性能
// 云台控制
ptzClickType: 'click', // click mouseDownAndUp
ptzZoomShow: true,
ptzMoreArrowShow: true,
ptzApertureShow: true,
// ptzApertureShow: true, // 光圈
ptzFocusShow: true,
});
......@@ -137,6 +165,7 @@ export default {
play(url) {
if (url) {
// 播放地址不同,则先停止再播放。
// TODO: 尝试销毁后,再创建的方式 demo-flv.html
if (this.playOriginUrl && this.playOriginUrl !== url) {
this.stop();
}
......@@ -197,6 +226,9 @@ export default {
image.src = this._jessibuca.screenshot(filename, format, quality, type);
});
},
screenshotOrigin(filename = '', format = 'png', quality = 0.92, type = 'base64') {
return this._jessibuca.screenshot(filename, format, quality, type);
}
},
}
</script>
......
......@@ -5,7 +5,7 @@
<vion-player v-if="playerVisible"
ref="vionPlayer"
:datetime-range="datetimeRange"
watermarkText="文安智能123"
watermarkText="文安智能678"
@ptz-control="handlePtz"
/>
</div>
......@@ -20,6 +20,7 @@
<button @click="handleStop">停止</button>
<button @click="handleDestroy">销毁</button>
<button @click="handleScreenshot">抓拍</button>
<button @click="handleScreenshot2">抓拍(原)</button>
<div class="record">
<input type="text" v-model="recordUrl">
<button @click="handleRecord">录像</button>
......@@ -73,6 +74,10 @@ export default {
console.error(err);
})
},
handleScreenshot2() {
this.base64Url = this.$refs.vionPlayer.screenshotOrigin();
this.dialogVisible = true;
},
handlePause() {
this.$refs.vionPlayer.pause();
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!