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