0 - fixed online one-loop - FIXED
Uses one fixed online audio source only: state.onlineUrls[0].
No hot-swap.
No graph mixer.
No safe background audio element.
On ping failure it does not switch to offline audio.
It keeps the same online loop source even when network checks fail.
1 - active one loop - ACTIVE
Uses one active audio element with one current source at a time.
In practice it starts with the current online source and stays on one loop source.
No hot-swap.
No graph mixer.
No safe background audio element.
On ping failure it can switch between online and offline via swapBlob().
2 - hot-swap loop - SWAP
Uses one main audio element.
Online mode alternates between two online loop blobs:
state.onlineUrls[0]
state.onlineUrls[1]
The swap happens on loop wrap.
No graph mixer.
No safe background audio element.
On ping failure it switches to offline blob.
When online returns it switches back to online blob logic.
3 - mix-swap graph - MIXSWAP
Uses the same hot-swap behavior as mode 2 for the main audio element.
Also builds a Web Audio graph:
media element -> media gain
generated bed buffer -> bed gain
both -> master -> destination
The extra bed is mixed underneath the main media.
In offline mode bed level is lower; in online mode bed level is a bit higher.
No separate safe background HTML audio element.
On ping failure it switches to offline blob.
6 - safe bg real audio + hot-swap - SAFE+SWAP
Uses two HTML audio elements:
1) main hot-swap audio element
2) separate background safe loop audio element
The background safe loop always uses state.onlineUrls[0].
The main audio element hot-swaps between onlineUrls[0] and onlineUrls[1] on loop wrap.
No Web Audio graph mixer.
This is the "safe bg real audio + hot-swap" test mode.
Source label on cover becomes:
SOURCE SAFE ON1 / HOT ON1 or SOURCE SAFE ON1 / HOT ON2
On ping failure the main audio can still switch mode,
but the extra safe background element remains the fixed safe loop source.