调整播放列表接口

This commit is contained in:
zhw2590582 committed 2019-05-01 10:57:49 +08:00
1 parent 941ab07c66
commit 6056e7a0c6
9 files changed
+223 -235

No files matched your search

@@ -1,13 +1,9 @@
import { clamp, errorHandle } from '../utils';
import { clamp } from '../utils';
export default function currentTimeMix(art, player) {
Object.defineProperty(player, 'currentTime', {
get: () => art.template.$video.currentTime || 0,
set: currentTime => {
errorHandle(
player.duration,
'Cannot set current time, the video seems to be not ready for mate information.',
);
art.template.$video.currentTime = clamp(currentTime, 0, player.duration);
},
});