Commit 06d78575cc08170d09e089f40cd271acbbb4661f

Authored by 64850858
1 parent 367ec111

修改声音处理逻辑

web_src/src/components/dialog/devicePlayer.vue
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 3
4 <el-dialog title="视频播放" top="0" :close-on-click-modal="false" :visible.sync="showVideoDialog" @close="close()"> 4 <el-dialog title="视频播放" top="0" :close-on-click-modal="false" :visible.sync="showVideoDialog" @close="close()">
5 <!-- <LivePlayer v-if="showVideoDialog" ref="videoPlayer" :videoUrl="videoUrl" :error="videoError" :message="videoError" :hasaudio="hasaudio" fluent autoplay live></LivePlayer> --> 5 <!-- <LivePlayer v-if="showVideoDialog" ref="videoPlayer" :videoUrl="videoUrl" :error="videoError" :message="videoError" :hasaudio="hasaudio" fluent autoplay live></LivePlayer> -->
6 - <player ref="videoPlayer" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" :height="false" :hasaudio="hasaudio" fluent autoplay live ></player> 6 + <player ref="videoPlayer" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" :height="false" :hasAudio="hasAudio" fluent autoplay live ></player>
7 <div id="shared" style="text-align: right; margin-top: 1rem;"> 7 <div id="shared" style="text-align: right; margin-top: 1rem;">
8 <el-tabs v-model="tabActiveName" @tab-click="tabHandleClick"> 8 <el-tabs v-model="tabActiveName" @tab-click="tabHandleClick">
9 <el-tab-pane label="实时视频" name="media"> 9 <el-tab-pane label="实时视频" name="media">
@@ -185,7 +185,7 @@ export default { @@ -185,7 +185,7 @@ export default {
185 deviceId: '', 185 deviceId: '',
186 channelId: '', 186 channelId: '',
187 tabActiveName: 'media', 187 tabActiveName: 'media',
188 - hasaudio: false, 188 + hasAudio: false,
189 loadingRecords: false, 189 loadingRecords: false,
190 recordsLoading: false, 190 recordsLoading: false,
191 isLoging: false, 191 isLoging: false,
@@ -235,6 +235,8 @@ export default { @@ -235,6 +235,8 @@ export default {
235 } 235 }
236 }, 236 },
237 openDialog: function (tab, deviceId, channelId, param) { 237 openDialog: function (tab, deviceId, channelId, param) {
  238 + console.log("openDialog")
  239 + console.log(param)
238 this.tabActiveName = tab; 240 this.tabActiveName = tab;
239 this.channelId = channelId; 241 this.channelId = channelId;
240 this.deviceId = deviceId; 242 this.deviceId = deviceId;
@@ -268,7 +270,7 @@ export default { @@ -268,7 +270,7 @@ export default {
268 }, 270 },
269 play: function (streamInfo, hasAudio) { 271 play: function (streamInfo, hasAudio) {
270 272
271 - this.hasaudio = hasAudio; 273 + this.hasAudio = hasAudio;
272 this.isLoging = false; 274 this.isLoging = false;
273 // this.videoUrl = streamInfo.rtc; 275 // this.videoUrl = streamInfo.rtc;
274 this.videoUrl = this.getUrlByStreamInfo(streamInfo); 276 this.videoUrl = this.getUrlByStreamInfo(streamInfo);
web_src/src/components/dialog/jessibuca.vue
@@ -46,7 +46,7 @@ export default { @@ -46,7 +46,7 @@ export default {
46 forceNoOffscreen: false, 46 forceNoOffscreen: false,
47 }; 47 };
48 }, 48 },
49 - props: ['videoUrl', 'error', 'hasaudio', 'height'], 49 + props: ['videoUrl', 'error', 'hasAudio', 'height'],
50 mounted () { 50 mounted () {
51 window.onerror = (msg) => { 51 window.onerror = (msg) => {
52 // console.error(msg) 52 // console.error(msg)
@@ -73,6 +73,7 @@ export default { @@ -73,6 +73,7 @@ export default {
73 create(){ 73 create(){
74 let options = {}; 74 let options = {};
75 console.log(this.$refs.container) 75 console.log(this.$refs.container)
  76 + console.log("hasAudio " + this.hasAudio)
76 77
77 this.jessibuca = new window.Jessibuca(Object.assign( 78 this.jessibuca = new window.Jessibuca(Object.assign(
78 { 79 {
@@ -83,7 +84,7 @@ export default { @@ -83,7 +84,7 @@ export default {
83 // text: "WVP-PRO", 84 // text: "WVP-PRO",
84 // background: "bg.jpg", 85 // background: "bg.jpg",
85 loadingText: "加载中", 86 loadingText: "加载中",
86 - hasAudio: this.hasAudio, 87 + hasAudio: typeof (this.hasAudio) =="undefined"? true: this.hasAudio,
87 debug: false, 88 debug: false,
88 supportDblclickFullscreen: false, // 是否支持屏幕的双击事件,触发全屏,取消全屏事件。 89 supportDblclickFullscreen: false, // 是否支持屏幕的双击事件,触发全屏,取消全屏事件。
89 operateBtns: { 90 operateBtns: {