From 4dab9528d8e69c0c3f8ce03a7d4617bb13ecec8d Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Thu, 31 Mar 2022 14:24:24 +0800
Subject: [PATCH] +注释
---
src/components/map/components/mapPopup.vue | 31 ++++++++++++++++++++++---------
1 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/src/components/map/components/mapPopup.vue b/src/components/map/components/mapPopup.vue
index e89003f..cd760a3 100644
--- a/src/components/map/components/mapPopup.vue
+++ b/src/components/map/components/mapPopup.vue
@@ -219,7 +219,10 @@
/>
</div>
<div class="content">
- <video :src="monitorUrl" controls autoplay></video>
+ <play-video
+ :sourceUrl="monitorUrl"
+ @playStatus="changePlayStatus"
+ ></play-video>
</div>
</div>
</div>
@@ -742,12 +745,14 @@
this.audioSynth = window.speechSynthesis
this.audioMsg = new window.SpeechSynthesisUtterance()
- this.audioMsg.onend = function () {
- that.audioSynth.cancel()
- that.audioFlag = false
- that.audioCourse = false
- that.audioImgUrl = '/img/icon/close-video.png'
- }
+ this.$nextTick(() => {
+ this.audioMsg.onend = function () {
+ that.audioSynth.cancel()
+ that.audioFlag = false
+ that.audioCourse = false
+ that.audioImgUrl = '/img/icon/close-video.png'
+ }
+ })
},
mounted () {
global.viewer.scene.globe.depthTestAgainstTerrain = false
@@ -813,12 +818,16 @@
immediate: true,
handler (newCode, oldCode) {
if (newCode == false) {
- this.audioSynth.cancel()
+ if (this.audioSynth != null) {
+ this.audioSynth.cancel()
+ }
this.audioFlag = false
this.audioCourse = false
} else {
if (this.audioFlag == true) {
- this.audioSynth.cancel()
+ if (this.audioSynth != null) {
+ this.audioSynth.cancel()
+ }
this.audioFlag = false
this.audioCourse = false
this.audioImgUrl = '/img/icon/close-video.png'
@@ -1087,6 +1096,10 @@
this.$store.commit('SET_MONITORPOPUP', false)
},
+ changePlayStatus (status) { // 获取子组件的播放状态
+ console.log(status)
+ },
+
audioPlay () {
if (this.audioFlag == false) {
this.audioMsg.text = this.audioSource
--
Gitblit v1.9.3