From 4d9a62339d43e163c3615a52b72a3c3f01cc30ab Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 16 十月 2020 16:49:41 +0800
Subject: [PATCH] 去除lombok框架 添加流传输模式udp/tcp被动支持

---
 web_src/src/components/gb28181/devicePlayer.vue |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/web_src/src/components/gb28181/devicePlayer.vue b/web_src/src/components/gb28181/devicePlayer.vue
index ce36483..2f2cfc0 100644
--- a/web_src/src/components/gb28181/devicePlayer.vue
+++ b/web_src/src/components/gb28181/devicePlayer.vue
@@ -1,7 +1,8 @@
 <template>
 	<div id="devicePlayer">
 		<el-dialog title="瑙嗛鎾斁" top="0" :visible.sync="showVideoDialog" :destroy-on-close="true" @close="close()">
-      <LivePlayer v-if="showVideoDialog" ref="videoPlayer" :videoUrl="videoUrl" :error="videoError" :hasaudio="hasaudio" fluent autoplay live ></LivePlayer>
+      <LivePlayer v-if="showVideoDialog && hasaudio" ref="videoPlayer" :videoUrl="videoUrl" :error="videoError" hasaudio fluent autoplay live ></LivePlayer>
+      <LivePlayer v-if="showVideoDialog && !hasaudio" ref="videoPlayer" :videoUrl="videoUrl" :error="videoError" fluent autoplay live ></LivePlayer>
 			<div id="shared" style="text-align: right; margin-top: 1rem;">
 				<el-tabs v-model="tabActiveName">
 					<el-tab-pane label="濯掍綋娴佷俊鎭�" name="media">
@@ -122,20 +123,20 @@
 		methods: {
 
 			play: function(streamInfo, deviceId, channelId, hasAudio) {
-        console.log(hasAudio);
-        this.hasaudio = hasAudio;
-        // 鏍规嵁濯掍綋娴佷俊鎭簩娆″垽鏂�
-        if( this.hasaudio && !!streamInfo.tracks && streamInfo.tracks.length > 0) {
-          var realHasAudio = false;
-          for (let i = 0; i < streamInfo.tracks; i++) {
-            if (streamInfo.tracks[i].codec_type == 1) { // 鍒ゆ柇涓洪煶棰�
-              realHasAudio = true;
-            }
-          }
-          this.hasaudio = realHasAudio && this.hasaudio;
+        // this.hasaudio = hasAudio;
+        if (!hasAudio) { // hasaudio == false鏃惰缃挱鏀惧櫒hasaudio false, 鍚﹀垯涓嶈缃�
+          this.hasaudio = hasAudio;
         }
-        console.log("111")
-        console.log(this.hasaudio)
+        // 鏍规嵁濯掍綋娴佷俊鎭簩娆″垽鏂�
+        // if( this.hasaudio && !!streamInfo.tracks && streamInfo.tracks.length > 0) {
+        //   var realHasAudio = false;
+        //   for (let i = 0; i < streamInfo.tracks; i++) {
+        //     if (streamInfo.tracks[i].codec_type == 1) { // 鍒ゆ柇涓洪煶棰�
+        //       realHasAudio = true;
+        //     }
+        //   }
+        //   this.hasaudio = realHasAudio && this.hasaudio;
+        // }
         this.ssrc = streamInfo.ssrc;
 				this.deviceId = deviceId;
 				this.channelId = channelId;

--
Gitblit v1.8.0