|
|
@@ -101,7 +101,7 @@ const app = new Vue({
|
|
|
layoutViewWidth: null,
|
|
|
layoutViewHeight: null,
|
|
|
// 是否显示video
|
|
|
- isShowVideo: false
|
|
|
+ isShowVideo: false,
|
|
|
|
|
|
},
|
|
|
created() {
|
|
|
@@ -238,7 +238,15 @@ const app = new Vue({
|
|
|
if (event.val === "connected") {
|
|
|
Toast.clear();
|
|
|
this.doConnectDirectives()
|
|
|
- playOnBtn.bind(this)()
|
|
|
+ this.isShowVideo = true
|
|
|
+ this.$refs.rtcMediaPlayer.volume = 0
|
|
|
+ this.$refs.rtcMediaPlayer.play().then(() => {
|
|
|
+ this.$refs.rtcMediaPlayer.volume = 1
|
|
|
+ }).catch(error => {
|
|
|
+ // Toast('如需声音,可调高音量使用')
|
|
|
+ console.error('自动播放失败', error);
|
|
|
+ });
|
|
|
+ this.definitionFun(this.definitionValue)
|
|
|
this.pushflowPopup()
|
|
|
this.getResidueTime()
|
|
|
return
|
|
|
@@ -759,11 +767,7 @@ function playOnBtn() {
|
|
|
confirmButtonColor: '#3cc51f',
|
|
|
beforeClose: (action, done) => {
|
|
|
if (action === 'confirm') {
|
|
|
- this.isShowVideo = true
|
|
|
- this.$refs.rtcMediaPlayer.play()
|
|
|
- setTimeout(() => {
|
|
|
- this.definitionFun(this.definitionValue)
|
|
|
- })
|
|
|
+
|
|
|
done()
|
|
|
}
|
|
|
}
|