setVideoDevice method

Future<void> setVideoDevice(
  1. int? index
)

Set current camera device by its index

Implementation

Future<void> setVideoDevice(int? index) async{
  if(index==null) return;
  _logs?.print('set videoDevice - $index');

  try {
    await SiprixVoipSdk().setVideoDevice(index);
    _selVideoIndex = index;
  } on PlatformException catch (err) {
    _logs?.print('Can\'t set videoDevice. Err: ${err.code} ${err.message}');
    return Future.error((err.message==null) ? err.code : err.message!);
  }
}