LIVE: a YouTube API that does not load offers Try again

A blocked or slow (over 5 s) IFrame API load reads as offline, reason
`api`, so both LIVE views show "Stream is offline" with Try again, which
loads the API afresh: the loader keeps no failed load. Embedding refused
by the video's owner (errors 101 and 150) stays unavailable. Tests cover
the loader's reuse and its retry after an error or a timeout.
This commit is contained in:
Denis Groshev committed 2026-11-20 13:12:14 +01:00
1 parent 07e89a7024
commit 7b7eb2318a
5 files changed
+94 -7

No files matched your search

+2 -2
View File
@@ -157,10 +157,10 @@ test('a timer that fires after playback began changes nothing', async () => {
assert.deepEqual(states.at(-1), { state: 'playing', reason: null });
});
test('an API that does not load leaves the stream unavailable', async () => {
test('an API that does not load reads as offline, which Try again can change', async () => {
const { states, settle } = fixture({ apiFails: true });
await settle();
assert.deepEqual(states.at(-1), { state: 'unavailable', reason: 'api' });
assert.deepEqual(states.at(-1), { state: 'offline', reason: 'api' });
});
test('destroy empties the host, destroys the player and silences later events', async () => {