Commit c2b43fc1 by Tianqing Liu

feat: 优化播放器事件名称

1 parent 3da32f2a
......@@ -40,6 +40,7 @@ export default {
},
mounted() {
this.init(this.playUrl);
console.log('mounted', window.JessibucaPro.EVENTS);
},
unmounted() {
this.destroy();
......@@ -136,11 +137,7 @@ export default {
}
},
registerEvent(playerIns) {
playerIns.on("log", msg => {
console.log("on-log", msg);
});
playerIns.on("videoInfo", (data) => {
playerIns.on(JessibucaPro.EVENTS.videoInfo, (data) => {
console.log('width:', data.width, 'height:', data.height);
this.player.width = data.width;
this.player.height = data.height;
......@@ -155,7 +152,12 @@ export default {
this.playing = false;
}); */
playerIns.on('ptz', (arrow) => {
playerIns.on(JessibucaPro.EVENTS.playFailedAndPaused, (e) => {
console.log('playFailedAndPaused', e);
// replay();
});
playerIns.on(JessibucaPro.EVENTS.ptz, (arrow) => {
// console.log('ptz', arrow);
this.$emit('ptz-control', arrow);
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!