createAudioPlayer

Creates a new ColibrioAudioPlayer using the provided load configuration. If there is an existing ColibrioAudioPlayer, it will be destroyed.

Fails if the list of section start positions is not ordered for MediaSessionTimelineMode.Sections, or if the playback service is found to run in a different process from the caller (see AudioReadingSystemEngine).

That process check is best-effort: it cannot always read both processes, and a mismatch it misses is not reported here — this call then never returns, and every later call to it is blocked behind that one. Treat the same-process requirement as the contract, not this failure as the way to discover it.

Before it returns, this call measures the length of each segment whose length is unknown. It updates AudioTimeline.segments and AudioTimeline.approximateDurationMs. Listeners that you add to the returned player receive only later changes. See the segment lengths section of AudioTimeline.