switchDevice method
'audio' | 'video'
Implementation
Future<void> switchDevice(String kind, {required String deviceId}) async {
_constraints.deviceId = deviceId;
var prev = getTrack(kind);
var next = await getNewTrack(kind);
await updateTrack(next: next, prev: prev);
}