mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-17 10:01:20 -08:00
添加更多异常处理
This commit is contained in:
1 parent
6d3e0b4567
commit
156519546f
2 files changed
+19
-4
No files matched your search
@@ -270,6 +270,8 @@
|
||||
sleep(delay).then(function () {
|
||||
_this3.emit('video', _this3.video);
|
||||
}).catch(function (err) {
|
||||
_this3.emit('error', err.message);
|
||||
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
@@ -309,14 +311,22 @@
|
||||
});
|
||||
this.processing = true;
|
||||
runPromisesInSeries(promiseList).then(function () {
|
||||
sleep(delay * 2).then(function () {
|
||||
return sleep(delay * 2).then(function () {
|
||||
_this4.processing = false;
|
||||
|
||||
_this4.emit('done');
|
||||
}).catch(function (err) {
|
||||
_this4.processing = false;
|
||||
|
||||
_this4.emit('error', err.message);
|
||||
|
||||
console.error(err);
|
||||
});
|
||||
}).catch(function (err) {
|
||||
_this4.processing = false;
|
||||
|
||||
_this4.emit('error', err.message);
|
||||
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user