Commit 06d78575cc08170d09e089f40cd271acbbb4661f

Authored by 64850858
1 parent 367ec111

修改声音处理逻辑

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