shaogen1995 2 年 前
コミット
009f1d9d2e
3 ファイル変更33 行追加3 行削除
  1. 1 1
      QJKK/.env.bendidev
  2. 1 1
      SWKK/src/components/Rbottom.vue
  3. 31 1
      SWKK/src/views/Home.vue

+ 1 - 1
QJKK/.env.bendidev

@@ -3,6 +3,6 @@ VUE_APP_STATIC_DIR=static
 VUE_APP_INNERNET=https://fcb.intranet.4dkankan.com
 # todo gongbei: 场景数据所在地址
 # VUE_APP_CDN="http://44.47.28.123:8080/"
-VUE_APP_CDN="http://127.0.0.1:8080/"
+VUE_APP_CDN="http://192.168.20.48:8080/"
 VUE_APP_PROXY_URL='http://127.0.0.1:8001/'
 VUE_APP_URL_FILL='/'

+ 1 - 1
SWKK/src/components/Rbottom.vue

@@ -267,7 +267,7 @@ export default {
       this.isFullscreen = !this.isFullscreen;
     },
     rightClisk(type) {
-      if (type === 1)  window.location.replace('/YHT/index.html')
+      if (type === 1) window.location.replace("/YHT/index.html");
       else if (type === 2) {
         let dom = document.querySelector("#bacMusic");
         window.bacMusic = dom.paused;

+ 31 - 1
SWKK/src/views/Home.vue

@@ -89,6 +89,7 @@ export default {
       }
     },
 
+
     onceClickMusic() {
       this.$refs.RbottomRef.opMusic(true);
       setTimeout(() => {
@@ -97,9 +98,9 @@ export default {
     },
 
     async stopPlay(val) {
+      if (!val && this.playing) this.$refs.RbottomRef.leftCut(-1);
       let player = await this.kankan.TourManager.player;
       player.pause();
-      if (!val) this.$refs.RbottomRef.leftCut(-1);
 
       this.progress = 0;
     },
@@ -196,6 +197,35 @@ export default {
       });
     });
 
+    // 有关球幕视频控制背景音乐
+    kankan.Scene.on("panorama.videorenderer.startvideo", () => {
+      // 点击热点的时候当前背景音乐的播放状态
+      let dom = document.querySelector("#bacMusic");
+      window.bacMusic = !dom.paused;
+      setTimeout(() => {
+        this.$refs.RbottomRef.opMusic(false);
+      }, 200);
+      // 暂停背景音乐
+    });
+    kankan.Scene.on("panorama.videorenderer.resumerender", () => {
+
+      // 点击热点的时候当前背景音乐的播放状态
+      let dom = document.querySelector("#bacMusic");
+      window.bacMusic = !dom.paused;
+      setTimeout(() => {
+        this.$refs.RbottomRef.opMusic(false);
+      }, 200);
+      // 暂停背景音乐
+    });
+    kankan.Scene.on("panorama.videorenderer.suspendrender", () => {
+      if (window.bacMusic) {
+        setTimeout(() => {
+          this.$refs.RbottomRef.opMusic(true);
+        }, 100);
+      }
+      // 恢复背景音乐
+    });
+
     // 导览数据
     kankan.TourManager.on("loaded", (tours) => {
       this.$refs.RbottomRef.baseSw(tours);