cameraSingleStreamer

@RequiresPermission(value = "android.permission.CAMERA")
suspend fun cameraSingleStreamer(context: Context, cameraId: String = context.defaultCameraId, audioSourceFactory: IAudioSourceInternal.Factory? = MicrophoneSourceFactory(), audioInputMode: StreamerPipeline.AudioInputMode = StreamerPipeline.AudioInputMode.CALLBACK, endpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), defaultRotation: Int = context.displayRotation, surfaceProcessorFactory: ISurfaceProcessorInternal.Factory = DefaultSurfaceProcessorFactory(), dispatcherProvider: IDispatcherProvider = DispatcherProvider()): SingleStreamer(source)

Creates a SingleStreamer with the camera as video source and an audio source (by default, the microphone).

Parameters

context

the application context

cameraId

the camera id to use. By default, it is the default camera.

audioSourceFactory

the audio source factory. By default, it is the default microphone source factory. If set to null, you will have to set it later explicitly.

audioInputMode

the audio output mode. By default, it is StreamerPipeline.AudioInputMode.CALLBACK.

endpointFactory

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

defaultRotation

the default rotation in Surface rotation (Surface.ROTATION_0, ...). By default, it is the current device orientation.

surfaceProcessorFactory

the ISurfaceProcessorInternal.Factory implementation. By default, it is a DefaultSurfaceProcessorFactory.

dispatcherProvider

the IDispatcherProvider implementation. By default, it is a DispatcherProvider.