装备列表设备播放器兼容webrtc
This commit is contained in:
@@ -16,12 +16,12 @@
|
||||
<a-spin size="large" v-if="loading" />
|
||||
<!-- <div id="player" v-else></div> -->
|
||||
<div class="player" :id="'player_' + sn" v-else>
|
||||
<jessibuca
|
||||
ref="jessibucaVideo"
|
||||
style="width: 100%; height: 100%"
|
||||
<stream-player
|
||||
ref="jessibucaVideo"
|
||||
style="width: 100%; height: 100%"
|
||||
:videoUrl="flvUrl"
|
||||
:showQu="false"
|
||||
></jessibuca>
|
||||
></stream-player>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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();
|
||||
|
||||
@@ -349,6 +349,11 @@ const pause = () => {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
#jessibuca {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.buttons-box {
|
||||
width: 100%;
|
||||
height: 28px;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<jessibuca
|
||||
v-show="!isWebrtcMode"
|
||||
ref="flvPlayerRef"
|
||||
style="width: 100%; height: 100%;"
|
||||
:currentVedioDatas="currentVedioDatas"
|
||||
:videoUrl="videoUrl"
|
||||
:error="error"
|
||||
|
||||
Reference in New Issue
Block a user