bugfix: 解决国标设备通道列表点播时 jessibuca 播放组件重复播放两次导致报错的问题
parent
3ab4ce0a83
commit
57bcf2e699
|
@ -242,8 +242,9 @@ export default {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.initData();
|
this.$nextTick(() => {
|
||||||
|
this.initData();
|
||||||
|
})
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
this.$destroy('videojs');
|
this.$destroy('videojs');
|
||||||
|
|
|
@ -42,10 +42,9 @@ export default {
|
||||||
volume: 1,
|
volume: 1,
|
||||||
rotate: 0,
|
rotate: 0,
|
||||||
vod: true, // 点播
|
vod: true, // 点播
|
||||||
forceNoOffscreen: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: ['videoUrl', 'error', 'hasAudio', 'height'],
|
props: ['videoUrl', 'error', 'hasAudio', 'height', 'autoPlay'],
|
||||||
mounted() {
|
mounted() {
|
||||||
let paramUrl = decodeURIComponent(this.$route.params.url)
|
let paramUrl = decodeURIComponent(this.$route.params.url)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -57,6 +56,9 @@ export default {
|
||||||
this.videoUrl = paramUrl;
|
this.videoUrl = paramUrl;
|
||||||
}
|
}
|
||||||
this.btnDom = document.getElementById("buttonsBox");
|
this.btnDom = document.getElementById("buttonsBox");
|
||||||
|
if (this.autoPlay) {
|
||||||
|
this.play(this.videoUrl);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -65,8 +67,7 @@ export default {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.play(val);
|
this.play(val);
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
immediate: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -122,7 +123,7 @@ export default {
|
||||||
supportDblclickFullscreen: false,
|
supportDblclickFullscreen: false,
|
||||||
timeout: 10,
|
timeout: 10,
|
||||||
useMSE: true,
|
useMSE: true,
|
||||||
useWCS: location.hostname === "localhost" || location.protocol === "https:",
|
useWCS: false,
|
||||||
useWebFullScreen: true,
|
useWebFullScreen: true,
|
||||||
videoBuffer: 0.1,
|
videoBuffer: 0.1,
|
||||||
wasmDecodeErrorReplay: true,
|
wasmDecodeErrorReplay: true,
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
<!-- <LivePlayer v-if="showVideoDialog" ref="livePlayer" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" :hasaudio="hasAudio" fluent autoplay live></LivePlayer>-->
|
<!-- <LivePlayer v-if="showVideoDialog" ref="livePlayer" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" :hasaudio="hasAudio" fluent autoplay live></LivePlayer>-->
|
||||||
<!-- </el-tab-pane>-->
|
<!-- </el-tab-pane>-->
|
||||||
<el-tab-pane label="Jessibuca" name="jessibuca">
|
<el-tab-pane label="Jessibuca" name="jessibuca">
|
||||||
<jessibucaPlayer v-if="activePlayer === 'jessibuca'" ref="jessibuca" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" height="100px" :hasAudio="hasAudio" fluent autoplay live ></jessibucaPlayer>
|
<jessibucaPlayer v-if="activePlayer === 'jessibuca'" ref="jessibuca" :visible.sync="showVideoDialog"
|
||||||
|
:videoUrl="videoUrl" :error="videoError" :message="videoError" height="100px"
|
||||||
|
:hasAudio="hasAudio" :auto-play="false" fluent autoplay live></jessibucaPlayer>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="WebRTC" name="webRTC">
|
<el-tab-pane label="WebRTC" name="webRTC">
|
||||||
<rtc-player v-if="activePlayer === 'webRTC'" ref="webRTC" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" height="100px" :hasAudio="hasAudio" fluent autoplay live ></rtc-player>
|
<rtc-player v-if="activePlayer === 'webRTC'" ref="webRTC" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" height="100px" :hasAudio="hasAudio" fluent autoplay live ></rtc-player>
|
||||||
|
@ -242,6 +244,7 @@
|
||||||
import rtcPlayer from '../dialog/rtcPlayer.vue'
|
import rtcPlayer from '../dialog/rtcPlayer.vue'
|
||||||
import LivePlayer from '@liveqing/liveplayer'
|
import LivePlayer from '@liveqing/liveplayer'
|
||||||
import jessibucaPlayer from '../common/jessibuca.vue'
|
import jessibucaPlayer from '../common/jessibuca.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'devicePlayer',
|
name: 'devicePlayer',
|
||||||
props: {},
|
props: {},
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue