mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-09-01 13:37:57 +00:00
fix(sync): close episode lobby without ready race
This commit is contained in:
@@ -451,7 +451,15 @@ test('local media input cancels an in-flight canonical recovery', async ({ conte
|
||||
value: () => {
|
||||
const attempts = Number(video.dataset.koalaDelayedPlayAttempts || '0') + 1;
|
||||
video.dataset.koalaDelayedPlayAttempts = String(attempts);
|
||||
return nativePlay().then(() => new Promise(resolve => setTimeout(resolve, 400)));
|
||||
return nativePlay().then(() => new Promise((resolve, reject) => setTimeout(() => {
|
||||
if (video.paused) {
|
||||
const error = new Error('play interrupted by local pause');
|
||||
error.name = 'AbortError';
|
||||
reject(error);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
}, 400)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user