@@ -193,6 +202,7 @@
},
//通知设备上传媒体流
sendDevicePush: function(itemData) {
+ console.log(itemData)
let deviceId = this.deviceId;
this.isLoging = true;
let channelId = itemData.channelId;
@@ -204,7 +214,7 @@
}).then(function(res) {
let ssrc = res.data.ssrc;
that.isLoging = false
- that.$refs.devicePlayer.play(res.data,deviceId,channelId);
+ that.$refs.devicePlayer.play(res.data,deviceId,channelId,itemData.hasAudio);
}).catch(function(e) {
});
},
@@ -256,6 +266,16 @@
this.currentPage = 1;
this.total = 0;
this.initData();
+ },
+ updateChannel: function(row) {
+ console.log(row)
+ this.$axios({
+ method: 'post',
+ url: `/api/channel/update/${this.deviceId}`,
+ params: row
+ }).then(function(res) {
+ console.log(JSON.stringify(res));
+ });
}
}
diff --git a/web_src/src/components/gb28181/devicePlayer.vue b/web_src/src/components/gb28181/devicePlayer.vue
index dc69adb7..f49e03f0 100644
--- a/web_src/src/components/gb28181/devicePlayer.vue
+++ b/web_src/src/components/gb28181/devicePlayer.vue
@@ -1,7 +1,7 @@
-
+
@@ -114,17 +114,22 @@
ssrc: '',
deviceId: '',
channelId: '',
- tabActiveName: 'media'
+ tabActiveName: 'media',
+ hasaudio: false
};
},
methods: {
- play: function(streamInfo, deviceId, channelId) {
+ play: function(streamInfo, deviceId, channelId, hasAudio) {
+ console.log(hasAudio);
+ this.hasaudio = hasAudio;
this.ssrc = streamInfo.ssrc;
this.deviceId = deviceId;
this.channelId = channelId;
- this.videoUrl = streamInfo.flv + "?" + new Date().getTime();
+ // this.$refs.videoPlayer.hasaudio = hasAudio;
+ // this.videoUrl = streamInfo.flv + "?" + new Date().getTime();
+ this.videoUrl = streamInfo.ws_flv;
this.showVideoDialog = true;
console.log(this.ssrc);
},