AudioOnlySingleStreamer

class AudioOnlySingleStreamer(context: Context, endpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory()) : ISingleStreamer, IAudioSingleStreamer

A ISingleStreamer implementation for audio only (without video).

Parameters

context

the application context

endpointFactory

the IEndpointInternal.Factory implementation. By default, it is a DynamicEndpointFactory.

Constructors

Link copied to clipboard
constructor(context: Context, endpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory())

Properties

Link copied to clipboard
open override val audioConfigFlow: StateFlow<AudioConfig?>

The audio configuration flow.

Link copied to clipboard
open override val audioEncoder: IEncoder?

Advanced settings for the audio encoder.

Link copied to clipboard

Advanced settings for the audio processor.

Link copied to clipboard
open override val audioSourceFlow: StateFlow<IAudioSource?>

An audio source flow to access to advanced settings.

Link copied to clipboard
open override val endpoint: IEndpoint

Advanced settings for the endpoint.

Link copied to clipboard
open override val info: IConfigurationInfo

Configuration information

Link copied to clipboard
open override val isOpenFlow: StateFlow<Boolean>

Returns true if output is opened. For example, if the streamer is connected to a server if the endpoint is SRT or RTMP.

Link copied to clipboard
open override val isStreamingFlow: StateFlow<Boolean>

Returns true if stream is running.

Link copied to clipboard
open override val throwableFlow: StateFlow<Throwable?>

Returns the last throwable that occurred.

Functions

Link copied to clipboard

Adds a bitrate regulator controller to the streamer.

Link copied to clipboard
open suspend override fun close()

Closes the streamer endpoint.

Link copied to clipboard
open override fun getInfo(descriptor: MediaDescriptor): IConfigurationInfo

Gets configuration information

Link copied to clipboard
open suspend override fun open(descriptor: MediaDescriptor)

Opens the streamer endpoint.

Link copied to clipboard
suspend fun IOpenableStreamer.open(uri: Uri)
suspend fun IOpenableStreamer.open(uriString: String)

Opens the streamer endpoint.

Link copied to clipboard
open suspend override fun release()

Clean and reset the streamer.

Link copied to clipboard

Clean and reset the streamer synchronously.

Link copied to clipboard

Removes the bitrate regulator controller from the streamer.

Link copied to clipboard
open suspend override fun setAudioConfig(audioConfig: AudioConfig)

Configures only audio settings.

Link copied to clipboard
open suspend override fun setAudioSource(audioSourceFactory: IAudioSourceInternal.Factory)

Sets the audio source.

Link copied to clipboard
open suspend override fun startStream()

Starts audio/video stream.

Link copied to clipboard
suspend fun IOpenableStreamer.startStream(uriString: String)

Starts audio/video stream.

Link copied to clipboard
open suspend override fun stopStream()

Stops audio/video stream.