Commit 57cb2b09 by Tianqing Liu

feat: 播放器使用pro文件

1 parent e4270c09
......@@ -18,10 +18,10 @@ export default {
init(params = {}) {
const options = Object.assign({
container: this.$refs.container,
decoder: './jessibuca/decoder.js',
decoder: '/jessibuca-pro/decoder-pro.js',
isResize: false,
text: '', // TODO: 功能暂不清楚
useMSE: false,
useMSE: true,
useWCS: false,
isNotMute: false,
timeout: 10,
......@@ -40,7 +40,7 @@ export default {
},
});
this._jessibuca = new window.Jessibuca(options);
this._jessibuca = new window.JessibucaPro(options);
this.registerEvent(this._jessibuca);
},
......@@ -61,11 +61,15 @@ export default {
pause() {
this._jessibuca.pause();
},
stop() {
this._jessibuca.pause(true);
},
destroy() {
if (this._jessibuca) {
this._jessibuca.destroy();
this._jessibuca.destroy().then(() => {
this._jessibuca = null;
});
}
this.init();
},
},
}
......
......@@ -19,6 +19,7 @@
<!-- <button @click="handlePlayback">回放</button> -->
<button @click="handlePause">暂停</button>
<button @click="handleStop">停止</button>
<button @click="handleDestroy">销毁</button>
<!-- <button @click="handleScreenshot">抓拍</button> -->
</div>
</div>
......@@ -65,6 +66,9 @@ export default {
this.$refs.vionPlayer.pause();
},
handleStop() {
this.$refs.vionPlayer.stop();
},
handleDestroy() {
this.$refs.vionPlayer.destroy();
},
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!