Commit c2b43fc1 by Tianqing Liu

feat: 优化播放器事件名称

1 parent 3da32f2a
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
}, },
mounted() { mounted() {
this.init(this.playUrl); this.init(this.playUrl);
console.log('mounted', window.JessibucaPro.EVENTS);
}, },
unmounted() { unmounted() {
this.destroy(); this.destroy();
...@@ -136,11 +137,7 @@ export default { ...@@ -136,11 +137,7 @@ export default {
} }
}, },
registerEvent(playerIns) { registerEvent(playerIns) {
playerIns.on("log", msg => { playerIns.on(JessibucaPro.EVENTS.videoInfo, (data) => {
console.log("on-log", msg);
});
playerIns.on("videoInfo", (data) => {
console.log('width:', data.width, 'height:', data.height); console.log('width:', data.width, 'height:', data.height);
this.player.width = data.width; this.player.width = data.width;
this.player.height = data.height; this.player.height = data.height;
...@@ -155,7 +152,12 @@ export default { ...@@ -155,7 +152,12 @@ export default {
this.playing = false; 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); // console.log('ptz', arrow);
this.$emit('ptz-control', 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!