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 = () => { };