MediaPiPLifecycle

fun MediaPiPLifecycle(call: Call, pictureInPictureConfiguration: PictureInPictureConfiguration = PictureInPictureConfiguration(true))

Register a call media lifecycle that controls camera and microphone depending on lifecycles. The default behavior is like so:

  • camera/microphone will be disabled if the lifecycle is onPaused, and not on the PIP mode.

  • camera/microphone will be enabled if the lifecycle is onResumed, and not on the PIP mode.

Parameters

call

The call includes states and will be rendered with participants.


fun MediaPiPLifecycle(call: Call, enableInPictureInPicture: Boolean = false)

Deprecated

Use MediaPiPLifecycle with pictureInPictureConfiguration

Replace with

MediaPiPLifecycle(call, pictureInPictureConfiguration