← API
Function
pickSourceOrder
Signatures
- pickSourceOrder ( urls: unknown ): voidReturn the URL list reordered for fallback loading: codecs the browser claims it can play first (in user-given order), unknowns/unsupported last. canPlayType is a hint, not a hard filter — some browsers under-report support, and decodeAudioData accepts a few extras. So we keep all URLs in the result; ordering merely biases the first attempts toward what's most likely to succeed. Pair with Decoder.loadFirst() to walk the list and fall through on per-URL fetch/decode failures.