Table of Contents
Switch Source Media Devices of Published Stream
A user may want to switch to alternate Media Devices for his published stream. Video API allows Media Device switching on the fly.
The APIs allows you to switch between Rear and Front Camera and to alternate available Microphone.
Method: static Future<void> switchMediaDevice(String deviceName)
Parameters:
@param Sting deviceName
– deviceName client end point needs to set
Event Listeners:
onNotifyDeviceUpdate
– This callback method notify on media device change.
EnxRtc.switchMediaDevice(‘deviceName’); // Switch to new Device // Listen when Device has been switched EnxRtc.onNotifyDeviceUpdate = (String deviceName) { };
Switch between Rear & Front Camera
If user looks to switch between Rear and Front Camera as a source for published Stream, use switchCamera()
method.
Method: static Future<void> switchCamera()
EnxRtc.switchCamera();