From 99f6c232566434bb9ba350bd26cd822a1db7386d Mon Sep 17 00:00:00 2001 From: chendingwei <1170506816@qq.com> Date: Tue, 3 Jan 2023 08:49:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=9B=E5=BB=BA=E6=B5=81?= =?UTF-8?q?=E5=AA=92=E4=BD=93=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/page/cameraCenter.vue | 47 ++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/src/views/page/cameraCenter.vue b/src/views/page/cameraCenter.vue index c0f1e7f..76bef23 100644 --- a/src/views/page/cameraCenter.vue +++ b/src/views/page/cameraCenter.vue @@ -101,7 +101,30 @@ onMounted(() => { loadVideoPlayer(); loadVideoCanvas(); changeVideoCanvasSize(); - var showOperateBtns = false; // 是否显示按钮 + create() + } +}) + + + +watch(curSelectKey, (newVal, oldVal) => { + labelList.value = [] + switchCamera(newVal) + jessibuca.value.play("ws://192.168.1.119:8080/jessica/live/test.flv") +}) +watch(addLabel, (newVal, oldVal) => { + if (newVal.isAddLabel) { + isActiveChoose.value = true + document.body.onmousemove = (e) => { + addLabelTop.value = e.clientY + addLabelLeft.value = e.clientX + + } + } +}) +//创建流媒体 +function create(){ + var showOperateBtns = false; // 是否显示按钮 var forceNoOffscreen = true; // jessibuca.value = new Jessibuca({ @@ -131,27 +154,7 @@ onMounted(() => { jessibuca.value.onFullscreen = (msg:any) => console.log('onFullscreen', msg); jessibuca.value.onMute = (msg:any) => console.log('onMute', msg); - } -}) - - - -watch(curSelectKey, (newVal, oldVal) => { - labelList.value = [] - switchCamera(newVal) - jessibuca.value.play("ws://192.168.1.119:8080/jessica/live/test.flv") -}) -watch(addLabel, (newVal, oldVal) => { - if (newVal.isAddLabel) { - isActiveChoose.value = true - document.body.onmousemove = (e) => { - addLabelTop.value = e.clientY - addLabelLeft.value = e.clientX - - } - } -}) - +} //删除标签 function deleteLabel(id: number) {