mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 08:51:20 -08:00
add rotateMix
This commit is contained in:
1 parent
605771bea8
commit
abf60cfef6
5 files changed
+38
-16
No files matched your search
@@ -26,6 +26,7 @@ import flipMix from './flipMix';
|
||||
import lightMix from './lightMix';
|
||||
import miniMix from './miniMix';
|
||||
import loopMin from './loopMin';
|
||||
import rotateMix from './rotateMix';
|
||||
import { proxyPropertys } from '../utils';
|
||||
|
||||
export default class Player {
|
||||
@@ -58,6 +59,7 @@ export default class Player {
|
||||
lightMix(art, this);
|
||||
miniMix(art, this);
|
||||
loopMin(art, this);
|
||||
rotateMix(art, this);
|
||||
proxyPropertys(art, this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { def } from '../utils';
|
||||
|
||||
export default function rotateMix(art, player) {
|
||||
def(player, 'rotate', {
|
||||
get: () => 'rotate',
|
||||
});
|
||||
}
|
||||
@@ -8,14 +8,16 @@ export default function switchMix(art, player) {
|
||||
URL.revokeObjectURL(player.url);
|
||||
const { playing } = player;
|
||||
player.url = url;
|
||||
player.playbackRate = false;
|
||||
player.aspectRatio = false;
|
||||
art.once('video:canplay', () => {
|
||||
player.playbackRate = false;
|
||||
player.aspectRatio = false;
|
||||
player.flip = 'normal';
|
||||
player.autoSize = true;
|
||||
player.currentTime = currentTime;
|
||||
if (playing) {
|
||||
player.play = true;
|
||||
}
|
||||
});
|
||||
if (playing) {
|
||||
player.play = true;
|
||||
}
|
||||
if (name) {
|
||||
notice.show = `${i18n.get('Switch video')}: ${name}`;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user