添加通道音频设置

添加media配置
This commit is contained in:
648540858
2020-10-13 17:16:38 +08:00
parent d4ae8194eb
commit f9ab13a145
13 changed files with 234 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div id="devicePlayer">
<el-dialog title="视频播放" top="0" :visible.sync="showVideoDialog" :destroy-on-close="true" @close="stop()">
<LivePlayer v-if="showVideoDialog" ref="videoPlayer" :videoUrl="videoUrl" :error="videoError" fluent autoplay live stretch></LivePlayer>
<LivePlayer v-if="showVideoDialog" ref="videoPlayer" :videoUrl="videoUrl" :error="videoError" :hasaudio="hasaudio" 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">
@@ -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);
},