setZoom static method

Future<void> setZoom(
  1. MediaStreamTrack videoTrack,
  2. double zoomLevel
)

Implementation

static Future<void> setZoom(
    MediaStreamTrack videoTrack, double zoomLevel) async {
  if (WebRTC.platformIsAndroid || WebRTC.platformIsIOS) {
    await WebRTC.invokeMethod(
      'mediaStreamTrackSetZoom',
      <String, dynamic>{'trackId': videoTrack.id, 'zoomLevel': zoomLevel},
    );
  } else {
    throw Exception('setZoom only support for mobile devices!');
  }
}