修复切换画质bug

This commit is contained in:
Harvey Zack committed 2018-11-22 13:16:00 +08:00
1 parent d4b9fc4d29
commit 88533c1023
8 files changed
+116 -138

No files matched your search

@@ -1,28 +0,0 @@
export default function switchMix(art, player) {
const {
refs: { $video },
i18n,
notice,
isPlaying,
option,
} = art;
Object.defineProperty(player, 'switch', {
value: (url, name = 'unknown') => {
if (url !== option.url) {
const { currentTime } = player;
art.emit('beforeMountUrl', url);
$video.src = player.mountUrl(url);
option.url = url;
player.playbackRateRemove();
player.aspectRatioRemove();
player.seek(currentTime);
if (isPlaying) {
player.play();
}
notice.show(`${i18n.get('Switch video')}: ${name}`);
art.emit('switch', url);
}
},
});
}