load

suspend fun load(url: String = DEFAULT_URL)

Fetches and instantiates the codec module at url itself.

Convenient when nothing bundles the page. Under a bundler prefer attach, for the reason given there. Calling twice is a no-op rather than a second fetch, and so is calling again while the first call is still loading: every call that overlaps it waits for that same module. A call that stops waiting, because its coroutine was cancelled, leaves the load running for the others, and a load that fails is forgotten, so the next call tries again.

Throws

when a load of another address is still in flight. The module owns FFmpeg's global codec registry, so a page loads exactly one.