|
|
@ -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) { |
|
|
|
|
|
|
|