mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 06:31:20 -08:00
调整播放列表接口
This commit is contained in:
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);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user