From 2eb1ca2d94a09c2d3ced69de28de72d2d6d77d8e Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 03 三月 2022 15:57:28 +0800
Subject: [PATCH] 国标录像支持多端同时播放

---
 web_src/src/components/dialog/devicePlayer.vue |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/web_src/src/components/dialog/devicePlayer.vue b/web_src/src/components/dialog/devicePlayer.vue
index 74c14c8..5a08006 100644
--- a/web_src/src/components/dialog/devicePlayer.vue
+++ b/web_src/src/components/dialog/devicePlayer.vue
@@ -307,7 +307,7 @@
             this.isLoging = false;
             // this.videoUrl = streamInfo.rtc;
             this.videoUrl = this.getUrlByStreamInfo(streamInfo);
-            this.streamId = streamInfo.streamId;
+            this.streamId = streamInfo.stream;
             this.app = streamInfo.app;
             this.mediaServerId = streamInfo.mediaServerId;
             this.playFromStreamInfo(false, streamInfo)
@@ -485,8 +485,9 @@
                 }).then(function (res) {
                     var streamInfo = res.data;
                     that.app = streamInfo.app;
-                    that.streamId = streamInfo.streamId;
+                    that.streamId = streamInfo.stream;
                     that.mediaServerId = streamInfo.mediaServerId;
+                    that.ssrc = streamInfo.ssrc;
                     that.videoUrl = that.getUrlByStreamInfo(streamInfo);
                     that.recordPlay = true;
                 });
@@ -497,7 +498,7 @@
             this.videoUrl = '';
             this.$axios({
                 method: 'get',
-                url: '/api/playback/stop/' + this.deviceId + "/" + this.channelId
+                url: '/api/playback/stop/' + this.deviceId + "/" + this.channelId + "/" + this.streamId
             }).then(function (res) {
                 if (callback) callback()
             });
@@ -517,7 +518,7 @@
                 }).then(function (res) {
                     var streamInfo = res.data;
                     that.app = streamInfo.app;
-                    that.streamId = streamInfo.streamId;
+                    that.streamId = streamInfo.stream;
                     that.mediaServerId = streamInfo.mediaServerId;
                     that.videoUrl = that.getUrlByStreamInfo(streamInfo);
                     that.recordPlay = true;
@@ -529,7 +530,7 @@
             this.videoUrl = '';
             this.$axios({
                 method: 'get',
-                url: '/api/download/stop/' + this.deviceId + "/" + this.channelId
+                url: '/api/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.streamId
             }).then(function (res) {
                 if (callback) callback()
             });
@@ -539,8 +540,6 @@
             let that = this;
             this.$axios({
                 method: 'post',
-                // url: '/api/ptz/' + this.deviceId + '/' + this.channelId + '?leftRight=' + leftRight + '&upDown=' + upDown +
-                //     '&inOut=' + zoom + '&moveSpeed=50&zoomSpeed=50'
                 url: '/api/ptz/control/' + this.deviceId + '/' + this.channelId + '?command=' + command + '&horizonSpeed=' + this.controSpeed + '&verticalSpeed=' + this.controSpeed + '&zoomSpeed=' + this.controSpeed
             }).then(function (res) {});
         },

--
Gitblit v1.8.0