mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-15 09:06:16 -08:00
fix(PKG-AUTO-THUMB-11): isolate frame handler cleanup failures
This commit is contained in:
1 parent
a8d19ce5ef
commit
eb6402fdca
16 files changed
+2892
-36
No files matched your search
@@ -165,17 +165,19 @@ function createFrameReader(job, video) {
|
||||
function clear() {
|
||||
const previous = pending;
|
||||
pending = void 0;
|
||||
video.onloadeddata = null;
|
||||
video.onseeked = null;
|
||||
if (!previous)
|
||||
return;
|
||||
const result = cleanupAll([
|
||||
() => {
|
||||
if (previous.timer !== null)
|
||||
video.onloadeddata = null;
|
||||
},
|
||||
() => {
|
||||
video.onseeked = null;
|
||||
},
|
||||
() => {
|
||||
if (previous && previous.timer !== null)
|
||||
clearTimeout(previous.timer);
|
||||
},
|
||||
() => {
|
||||
if (previous.frame !== null)
|
||||
if (previous && previous.frame !== null)
|
||||
video.cancelVideoFrameCallback(previous.frame);
|
||||
}
|
||||
]);
|
||||
|
||||
Reference in new issue
Block a user