ExperimentalReadonly ExperimentalreadyThe host's answer to the subscription. Never rejects.
Readonly ExperimentalsubscriptionThe id the host knows this subscription by.
Experimental
true once nothing more will arrive: after PcmStream.unsubscribe,
when the host refused the subscription, or when the host stopped writing
and no new epoch followed within PCM_STREAM_END_GRACE_MS.
Experimental
Format of the buffer being written, or null until the first chunk of audio arrived.
Experimental
Called once when the stream ends; called at once if it already has.
Experimental
Called with the format of the first buffer and again for every later epoch. Returns a function that removes the listener.
Experimental
Copy out the frames written since the previous call, one Float32Array
per channel, with the number of frames the ring overwrote before they
were read, or that a format change discarded, in dropped. segments
says where media time restarts within the frames and what track time
each run begins at.
Returns null before the first buffer arrived, when nothing new was
written (playback stopped or paused), after the stream ended, or when the
host kept writing during every attempt; the next call tries again.
Experimental
Remove the subscription on the host and free the page's view. Safe to call more than once.
A live stream subscription. Poll PcmStream.read from
requestAnimationFrameor a timer; the host cannot signal the page when frames arrive.The buffers are read-only shared memory: PcmStream.read copies frames out of them, and the class releases each buffer when its epoch is superseded or the stream ends. Frames of the previous epoch that were not read before its successor arrived are discarded with it and counted in the
droppedof the next read that returns frames.