audioVideoMediaProjectionDualStreamer

@RequiresApi(value = 29)
suspend fun audioVideoMediaProjectionDualStreamer(context: Context, mediaProjection: MediaProjection, firstEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), secondEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), defaultRotation: Int = context.displayRotation): DualStreamer

Creates a DualStreamer with the screen as video source and audio playback as audio source.

Parameters

context

the application context

mediaProjection

the media projection. It can be obtained with MediaProjectionManager.getMediaProjection. Don't forget to call MediaProjection.stop when you are done.

firstEndpointFactory

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

secondEndpointFactory

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

defaultRotation

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