Browse Source

新增创建流媒体方法

master
chendingwei 2 years ago
parent
commit
99f6c23256
  1. 47
      src/views/page/cameraCenter.vue

47
src/views/page/cameraCenter.vue

@ -101,7 +101,30 @@ onMounted(() => {
loadVideoPlayer(); loadVideoPlayer();
loadVideoCanvas(); loadVideoCanvas();
changeVideoCanvasSize(); 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; // var forceNoOffscreen = true; //
jessibuca.value = new Jessibuca({ jessibuca.value = new Jessibuca({
@ -131,27 +154,7 @@ onMounted(() => {
jessibuca.value.onFullscreen = (msg:any) => console.log('onFullscreen', msg); jessibuca.value.onFullscreen = (msg:any) => console.log('onFullscreen', msg);
jessibuca.value.onMute = (msg:any) => console.log('onMute', 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) { function deleteLabel(id: number) {

Loading…
Cancel
Save