From c605dd377d36e3c36653f3e484f501e9e826508f Mon Sep 17 00:00:00 2001 From: liuchengdist <2318563701@qq.com> Date: Sat, 23 May 2026 14:55:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A3=85=E5=A4=87=E5=88=97=E8=A1=A8=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=92=AD=E6=94=BE=E5=99=A8=E5=85=BC=E5=AE=B9webrtc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dockerCont/live-content-jg-wrc.vue | 18 +++++++++--------- src/components/dockerCont/live/jessibuca.vue | 5 +++++ .../dockerCont/live/stream-player.vue | 1 + 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/components/dockerCont/live-content-jg-wrc.vue b/src/components/dockerCont/live-content-jg-wrc.vue index 22c5d57..2f6d32f 100644 --- a/src/components/dockerCont/live-content-jg-wrc.vue +++ b/src/components/dockerCont/live-content-jg-wrc.vue @@ -16,12 +16,12 @@
- + >
@@ -35,7 +35,7 @@ import { message } from 'ant-design-vue'; import jswebrtc from '/@/vendors/jswebrtc.js'; import FlvExtend from 'flv-extend'; import { useUserAuthor } from '/@/hooks/use-g-author'; -import jessibuca from './live/jessibuca.vue'; +import streamPlayer from './live/stream-player.vue'; import { getAiLive } from '/@/api/daping'; const { getAiAuthor } = useUserAuthor(); interface Props { @@ -289,7 +289,8 @@ const createRtmpVideo = async (url: string) => { // 将video加入到 dom中 // remotePlay?.appendChild(link); await nextTick(async () => { - await rtmpVideoData(url, 'player_'+props.sn); + flvUrl.value = url; + await jessibucaVideo.value?.play?.(url); }); }; let videoPalyer = null; @@ -429,16 +430,15 @@ watch( } ); onMounted(() => { - // console.log('ckckckckk----',props) // onloadCamera(); createRtmpVideo(props.flvUrl) }); const emit = defineEmits(['close']); const closeVideo = () => { - if (!videoPalyer) return; - videoPalyer.close(); videoPalyer = null; + flvUrl.value = ''; + jessibucaVideo.value?.destroy?.(); }; const closeMoadl = () => { closeVideo(); diff --git a/src/components/dockerCont/live/jessibuca.vue b/src/components/dockerCont/live/jessibuca.vue index 7e51aa1..a74c73c 100644 --- a/src/components/dockerCont/live/jessibuca.vue +++ b/src/components/dockerCont/live/jessibuca.vue @@ -349,6 +349,11 @@ const pause = () => { };