Commit e557c243 by 陈岩

feat: 修复全屏倾斜角度

1 parent 6ed0fb1e
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
}, },
mounted() { mounted() {
this.init(this.playUrl); this.init(this.playUrl);
// console.log('mounted', window.JessibucaPro.EVENTS); console.log('mounted', window.JessibucaPro);
}, },
beforeDestroy() { beforeDestroy() {
this.destroy(); this.destroy();
...@@ -104,12 +104,19 @@ export default { ...@@ -104,12 +104,19 @@ export default {
} }
}, },
registerEvent(playerIns) { registerEvent(playerIns) {
const _this = this
playerIns.on(JessibucaPro.EVENTS.videoInfo, (data) => { playerIns.on(JessibucaPro.EVENTS.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;
}); });
// 监听全屏时旋转
playerIns.on(JessibucaPro.EVENTS.fullscreen, (data) => {
const dom = document.querySelector('.vion-player.jessibuca-container.jessibuca-controls-show')
dom.style.transform = data? 'rotate(180deg)' : 'rotate(0deg)';
});
playerIns.on('play', () => { playerIns.on('play', () => {
console.log('on-play-success'); console.log('on-play-success');
this.$emit('play-success'); this.$emit('play-success');
...@@ -150,7 +157,6 @@ export default { ...@@ -150,7 +157,6 @@ export default {
}, },
getWatermarkBase64() { getWatermarkBase64() {
const data = getWatermarkCanvasImg(150, 48, '文安智能'); const data = getWatermarkCanvasImg(150, 48, '文安智能');
console.log('getWatermarkBase64', data);
}, },
delayPlay(url, isPlayback = false) { delayPlay(url, isPlayback = false) {
setTimeout(() => { setTimeout(() => {
...@@ -180,7 +186,6 @@ export default { ...@@ -180,7 +186,6 @@ export default {
} }
}, },
handleWheel(event) { handleWheel(event) {
console.log('handleWheel', event);
event.stopPropagation(); event.stopPropagation();
const direction = event.deltaY < 0; const direction = event.deltaY < 0;
this.zoom(direction); this.zoom(direction);
...@@ -245,7 +250,6 @@ export default { ...@@ -245,7 +250,6 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// 如果是播放状态 // 如果是播放状态
const isPlaying = this._jessibuca.isPlaying(); const isPlaying = this._jessibuca.isPlaying();
console.log('screenshot', isPlaying);
if (!this.player.height || !this.player.width || !isPlaying) { if (!this.player.height || !this.player.width || !isPlaying) {
reject(new Error('invaild data')); reject(new Error('invaild data'));
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!