From f2279859b367fda6108a5ea22c572d38d89d338d Mon Sep 17 00:00:00 2001
From: panlinlin <648540858@qq.com>
Date: 星期六, 26 十二月 2020 16:44:27 +0800
Subject: [PATCH] 增加对水星IPC的兼容 增加对SIP错误的订阅,刷新通道或点播或回放出现sip错误时及时返回给页面 优化UI,增加按钮loading

---
 web_src/src/components/channelList.vue |   26 ++++----------------------
 1 files changed, 4 insertions(+), 22 deletions(-)

diff --git a/web_src/src/components/channelList.vue b/web_src/src/components/channelList.vue
index b3872ee..738012d 100644
--- a/web_src/src/components/channelList.vue
+++ b/web_src/src/components/channelList.vue
@@ -104,7 +104,7 @@
 
     mounted() {
         this.initData();
-        // this.updateLooper = setInterval(this.initData, 10000);
+        this.updateLooper = setInterval(this.initData, 10000);
     },
     destroyed() {
         this.$destroy('videojs');
@@ -173,24 +173,6 @@
 
         },
 
-        //gb28181骞冲彴瀵规帴
-        //鍒锋柊璁惧淇℃伅
-        refDevice: function (itemData) {
-            ///api/devices/{deviceId}/sync
-            console.log("鍒锋柊瀵瑰簲璁惧:" + itemData.deviceId);
-            this.$axios({
-                method: 'post',
-                url: '/api/devices/' + itemData.deviceId + '/sync'
-            }).then(function (res) {
-                // console.log("鍒锋柊璁惧缁撴灉锛�"+JSON.stringify(res));
-            }).catch(function (e) {
-                that.$message({
-                    showClose: true,
-                    message: '璇锋眰鎴愬姛',
-                    type: 'success'
-                });
-            });
-        },
         //閫氱煡璁惧涓婁紶濯掍綋娴�
         sendDevicePush: function (itemData) {
             console.log(itemData)
@@ -205,9 +187,9 @@
                 url: '/api/play/' + deviceId + '/' + channelId + '?getEncoding=' + getEncoding
             }).then(function (res) {
                 console.log(res.data)
-                let ssrc = res.data.ssrc;
+                let streamId = res.data.streamId;
                 that.isLoging = false;
-                if (!!ssrc) {
+                if (!!streamId) {
                     // that.$refs.devicePlayer.play(res.data, deviceId, channelId, itemData.hasAudio);
                     that.$refs.devicePlayer.openDialog("media", deviceId, channelId, {
                         streamInfo: res.data,
@@ -230,7 +212,7 @@
             var that = this;
             this.$axios({
                 method: 'post',
-                url: '/api/play/' + itemData.ssrc + '/stop'
+                url: '/api/play/' + itemData.streamId + '/stop'
             }).then(function (res) {
                 console.log(JSON.stringify(res));
                 that.initData();

--
Gitblit v1.8.0