mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-16 09:36:16 -08:00
add Artplayer.USE_RAF
This commit is contained in:
1 parent
6fc1532ada
commit
9ba838aa52
10 files changed
+105
-11
No files matched your search
@@ -118,9 +118,15 @@ export default function progress(options) {
|
||||
setBar('loaded', art.loaded);
|
||||
});
|
||||
|
||||
art.on('video:timeupdate', () => {
|
||||
setBar('played', art.played);
|
||||
});
|
||||
if (art.constructor.USE_RAF) {
|
||||
art.on('raf', () => {
|
||||
setBar('played', art.played);
|
||||
});
|
||||
} else {
|
||||
art.on('video:timeupdate', () => {
|
||||
setBar('played', art.played);
|
||||
});
|
||||
}
|
||||
|
||||
art.on('video:ended', () => {
|
||||
setBar('played', 1);
|
||||
|
||||
Reference in new issue
Block a user