mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
添加更多异常处理
This commit is contained in:
1 parent
6d3e0b4567
commit
156519546f
2 files changed
+19
-4
No files matched your search
@@ -73,6 +73,7 @@ class ArtplayerToolThumbnail extends Emitter {
|
||||
this.emit('video', this.video);
|
||||
})
|
||||
.catch(err => {
|
||||
this.emit('error', err.message);
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
@@ -104,17 +105,21 @@ class ArtplayerToolThumbnail extends Emitter {
|
||||
});
|
||||
this.processing = true;
|
||||
runPromisesInSeries(promiseList)
|
||||
.then(() => {
|
||||
.then(() =>
|
||||
sleep(delay * 2)
|
||||
.then(() => {
|
||||
this.processing = false;
|
||||
this.emit('done');
|
||||
})
|
||||
.catch(err => {
|
||||
this.processing = false;
|
||||
this.emit('error', err.message);
|
||||
console.error(err);
|
||||
});
|
||||
})
|
||||
}),
|
||||
)
|
||||
.catch(err => {
|
||||
this.processing = false;
|
||||
this.emit('error', err.message);
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user