iOS SDK How to change resolution video

I have tried to change the resolution of the iOS application to 320x120 11fps, but I think the way I did was not good because I changed the resolution in a hardcode on the ‘react-native-webrtc’ framework.

file WebRTCModule+RTCMediaStream.m
- (RTCVideoTrack *)createVideoTrack:(NSDictionary *)constraints {
RTCVideoSource *videoSource = [self.peerConnectionFactory videoSource];
[videoSource adaptOutputFormatToWidth:320 height:180 fps:11];
NSString *trackUUID = [[NSUUID UUID] UUIDString];
RTCVideoTrack *videoTrack = [self.peerConnectionFactory videoTrackWithSource:videoSource trackId:trackUUID];
RTCCameraVideoCapturer *videoCapturer = [[RTCCameraVideoCapturer alloc] initWithDelegate:videoSource];
VideoCaptureController *videoCaptureController
= [[VideoCaptureController alloc] initWithCapturer:videoCapturer
videoTrack.videoCaptureController = videoCaptureController;
[videoCaptureController startCapture];
return videoTrack;

I have added a line [videoSource adaptOutputFormatToWidth:320 height:180 fps:11];

what I want to ask is whether there is another better way to change the resolution without changing the default frameworks?