|
@@ -241,25 +241,8 @@ const app = new Vue({
|
|
|
Toast.clear();
|
|
|
this.doConnectDirectives()
|
|
|
this.isShowVideo = true
|
|
|
- this.$refs.rtcMediaPlayer.volume = 0
|
|
|
- console.log('推流消耗时间:' + ((+ new Date() - this.plugFlowStartDate) / 1000) + '秒')
|
|
|
- this.$refs.rtcMediaPlayer.play().then(() => {
|
|
|
- this.$refs.rtcMediaPlayer.volume = 1
|
|
|
- }).catch(error => {
|
|
|
- Dialog.alert({
|
|
|
- title: '提示',
|
|
|
- message: '加载失败,请手动刷新',
|
|
|
- confirmButtonText: '刷新',
|
|
|
- confirmButtonColor: '#3cc51f',
|
|
|
- beforeClose: (action, done) => {
|
|
|
- this.$refs.rtcMediaPlayer.play()
|
|
|
- this.$refs.rtcMediaPlayer.volume = 1
|
|
|
- done()
|
|
|
- }
|
|
|
- })
|
|
|
- // Toast('如需声音,可调高音量使用')
|
|
|
- console.error('自动播放失败', error);
|
|
|
- });
|
|
|
+ this.$refs.rtcMediaPlayer.muted = true
|
|
|
+ this.$refs.rtcMediaPlayer.play()
|
|
|
this.definitionFun(this.definitionValue)
|
|
|
this.pushflowPopup()
|
|
|
this.getResidueTime()
|
|
@@ -309,7 +292,7 @@ const app = new Vue({
|
|
|
// 清晰度
|
|
|
definitionFun(value) {
|
|
|
this.definitionValue = value
|
|
|
- this.engine.makeBitrate(value)
|
|
|
+ this.engine.makeBitrate && this.engine.makeBitrate(value)
|
|
|
localStorage.setItem('definitionValue', value)
|
|
|
this.levitatedSphereVisible = false
|
|
|
},
|
|
@@ -331,7 +314,7 @@ const app = new Vue({
|
|
|
// 确定修改分辨率
|
|
|
confirmResolution() {
|
|
|
let { width, height, dpi: density } = this.phoneSize
|
|
|
- this.engine.makeResolution({ width, height, density })
|
|
|
+ this.engine.makeResolution && this.engine.makeResolution({ width, height, density })
|
|
|
this.resolutionRatioVisible = false
|
|
|
},
|
|
|
|
|
@@ -748,13 +731,13 @@ const app = new Vue({
|
|
|
},
|
|
|
// 移开手指时会发生的回调
|
|
|
touchendRtcMediaPlayer(event) {
|
|
|
- this.engine.touchClick(event, 1, true)
|
|
|
+ this.engine.touchClick && this.engine.touchClick(event, 1, true)
|
|
|
this.noOperationSetTimeout()
|
|
|
},
|
|
|
|
|
|
// 返回、主页、任务器
|
|
|
footerBtnFun(key) {
|
|
|
- this.engine[key]()
|
|
|
+ this.engine[key] && this.engine[key]()
|
|
|
this.noOperationSetTimeout()
|
|
|
},
|
|
|
|
|
@@ -769,6 +752,12 @@ const app = new Vue({
|
|
|
this.layoutViewWidth = layoutView.offsetWidth
|
|
|
this.layoutViewHeight = layoutView.offsetHeight
|
|
|
})
|
|
|
+ },
|
|
|
+
|
|
|
+ // 音量
|
|
|
+ volumeControl(value) {
|
|
|
+ this.engine.ExexuteKeyBoard && this.engine.ExexuteKeyBoard(value)
|
|
|
+ this.$refs.rtcMediaPlayer && (this.$refs.rtcMediaPlayer.muted = false)
|
|
|
}
|
|
|
}
|
|
|
})
|