disconnectLocalSendTransportScreen

Disconnects the local send transport for screen sharing by closing the local screen producer and notifying the server.

Workflow:

  1. Close Local Screen Producer:

    • If an active local screen producer exists, it is closed

    • Local state is updated to reflect the closed producer

  2. Notify Server:

    • Emits closeScreenProducer event to the server

    • Emits pauseProducerMedia event to notify about paused screen sharing

Return

Result indicating success or failure

Example usage:

val options = DisconnectSendTransportScreenOptions(
parameters = myParameters
)

disconnectLocalSendTransportScreen(options).onSuccess {
Logger.e("DisconnectSendTransp", "Local screen disconnected")
}.onFailure { error ->
Logger.e("DisconnectSendTransp", "Failed: ${error.message}")
}

Parameters

options

Configuration options for disconnecting local screen transport