|
@@ -9,7 +9,7 @@
|
|
@on-playing="onHkPlaying"
|
|
@on-playing="onHkPlaying"
|
|
@on-play-error="onHKPlayError"
|
|
@on-play-error="onHKPlayError"
|
|
/>
|
|
/>
|
|
- <FlvVideo v-if="isPlaying && isNoLive" ref="FlvVideoRef" :videoUrl="dot_data.video_code" style="width: 100%; height: 100%; object-fit: fill" />
|
|
|
|
|
|
+ <FlvVideo v-if="isPlaying && isNoLive" ref="flvVideoRef" :videoUrl="dot_data.video_code" style="width: 100%; height: 100%; object-fit: fill" />
|
|
<div class="video-header">
|
|
<div class="video-header">
|
|
<div class="label" :title="dot_data.name">{{ dot_data.name }}</div>
|
|
<div class="label" :title="dot_data.name">{{ dot_data.name }}</div>
|
|
<div class="video-header-right">
|
|
<div class="video-header-right">
|
|
@@ -87,7 +87,7 @@ const isPlaying = ref(false);
|
|
const errBKVisible = ref(false);
|
|
const errBKVisible = ref(false);
|
|
const posterVisible = ref(true);
|
|
const posterVisible = ref(true);
|
|
let videoPlayer = ref(null);
|
|
let videoPlayer = ref(null);
|
|
-let FlvVideoRef = ref(null);
|
|
|
|
|
|
+let flvVideoRef = ref(null);
|
|
const tags = ref([]);
|
|
const tags = ref([]);
|
|
|
|
|
|
watch(
|
|
watch(
|
|
@@ -96,6 +96,9 @@ watch(
|
|
if (!!videoPlayer.value) {
|
|
if (!!videoPlayer.value) {
|
|
videoPlayer.value.stop();
|
|
videoPlayer.value.stop();
|
|
}
|
|
}
|
|
|
|
+ if (!!flvVideoRef.value) {
|
|
|
|
+ flvVideoRef.value.destoryVideo();
|
|
|
|
+ }
|
|
posterVisible.value = true;
|
|
posterVisible.value = true;
|
|
errBKVisible.value = false;
|
|
errBKVisible.value = false;
|
|
isPlaying.value = false;
|
|
isPlaying.value = false;
|
|
@@ -145,7 +148,7 @@ const play_now = async (check?: boolean) => {
|
|
isPlaying.value = true;
|
|
isPlaying.value = true;
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
if (props.isNoLive) {
|
|
if (props.isNoLive) {
|
|
- FlvVideoRef.value.handleVideoPlay(props.dot_data.video_code);
|
|
|
|
|
|
+ flvVideoRef.value.handleVideoPlay(props.dot_data.video_code);
|
|
} else {
|
|
} else {
|
|
// 视频监控数据
|
|
// 视频监控数据
|
|
getVideoUrlById(props.dot_data.video_code).then((res) => {
|
|
getVideoUrlById(props.dot_data.video_code).then((res) => {
|
|
@@ -198,7 +201,8 @@ defineExpose({
|
|
play,
|
|
play,
|
|
refresh_data,
|
|
refresh_data,
|
|
handleScreenshot,
|
|
handleScreenshot,
|
|
- getPlayer
|
|
|
|
|
|
+ getPlayer,
|
|
|
|
+ handleFullScreen
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -208,6 +212,7 @@ defineExpose({
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
background-color: #000;
|
|
background-color: #000;
|
|
|
|
+ color: #ffffff;
|
|
}
|
|
}
|
|
|
|
|
|
.video-box {
|
|
.video-box {
|