AsyncMediaByteSource
Media bytes from caller code that may answer later: a Fetch response, a network client, a cache. It is the suspending form of MediaByteSource, opened through AsyncMediaRuntime.open.
Calls arrive one at a time. The runtime that opens the source owns it from the call of AsyncMediaRuntime.open, and calls close exactly once. One source object serves one open: the runtime refuses an object that it already holds.
A cancelled operation cancels the call in flight and calls close while that call may still be finishing. close must therefore stop the transport, and a call that returns after its cancellation must not write into the array it was given. Honor coroutine cancellation and put a limit on every wait: the runtime waits for a call to finish before it runs other work.
A source must not call the runtime that is reading it, from any of its methods.
Properties
The address the bytes came from when it differs from the address asked for, as after an HTTP redirect, or null. It is read once, when the source is opened. See MediaByteSource.location.
Functions
The tags that the bytes of the last read brought, or null. It is asked after every read that returned bytes, and only of the source given to AsyncMediaRuntime.open. See MediaByteSource.takeTags.