Interface: UseCustomAudioSourceResult
Defined in: mobile-client/src/hooks/useCustomAudioSource.ts:48
Properties​
error​
error:
null|Error
Defined in: mobile-client/src/hooks/useCustomAudioSource.ts:70
The error that failed the last startStreaming or stopStreaming call, if any.
isStreaming​
isStreaming:
boolean
Defined in: mobile-client/src/hooks/useCustomAudioSource.ts:50
Whether the custom audio track is currently published.
startStreaming()​
startStreaming: () =>
Promise<void>
Defined in: mobile-client/src/hooks/useCustomAudioSource.ts:64
Create the custom audio track and publish it. Once this resolves the track is registered — pushed samples are streamed to the room right away when the peer is connected, or automatically once it connects. No-op when already streaming.
Returns​
Promise<void>
stopStreaming()​
stopStreaming: () =>
Promise<void>
Defined in: mobile-client/src/hooks/useCustomAudioSource.ts:68
Unpublish and release the custom audio track. No-op when not streaming.
Returns​
Promise<void>
track​
track:
null|CustomAudioTrack
Defined in: mobile-client/src/hooks/useCustomAudioSource.ts:57
Push handle for the published track; null until streaming starts. Hand
it to pushAudioSamples whenever your source produces audio. The handle
is plain and worklet-serializable, so it can be shared into a worklet and
pushed from there directly — no thread hop.