disconnect Send Transport Video
Disconnects the send transport for video by closing the video producer and notifying the server.
This function handles both remote and local video transport disconnection. It manages producer lifecycle, updates UI state, and ensures proper cleanup of video resources.
Workflow:
Local Transport Disconnection:
Disconnects local video transport if available
Closes local video producer
Remote Transport Disconnection:
Closes remote video producer if it exists
Notifies server about closed producer
UI State Update:
Updates main window if needed based on screen state
Repopulates user media display
State Cleanup:
Sets video producer references to null
Updates all relevant state parameters
Return
Result indicating success or failure
Example usage:
val options = DisconnectSendTransportVideoOptions(
parameters = myParameters
)
disconnectSendTransportVideo(options).onSuccess {
Logger.e("DisconnectSendTransp", "Video transport disconnected successfully")
}.onFailure { error ->
Logger.e("DisconnectSendTransp", "Disconnection failed: ${error.message}")
}Parameters
Configuration options for disconnecting video transport