File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -399,13 +399,13 @@ - (void)requestAccessForMediaType:(NSString *)mediaType
399
399
-(void )getDisplayMedia : (NSDictionary *)constraints
400
400
result : (FlutterResult)result {
401
401
NSString *mediaStreamId = [[NSUUID UUID ] UUIDString ];
402
- RTCMediaStream *mediaStream
403
- = [self .peerConnectionFactory mediaStreamWithStreamId: mediaStreamId];
402
+ RTCMediaStream *mediaStream = [self .peerConnectionFactory mediaStreamWithStreamId: mediaStreamId];
404
403
405
404
RTCVideoSource *videoSource = [self .peerConnectionFactory videoSource ];
406
-
407
405
FlutterRPScreenRecorder *screenCapturer = [[FlutterRPScreenRecorder alloc ] initWithDelegate: videoSource];
408
406
407
+ [videoSource adaptOutputFormatToWidth: (NSUInteger )[UIScreen mainScreen ].bounds.size.width height: (NSUInteger )[UIScreen mainScreen ].bounds.size.height fps: 30 ];
408
+
409
409
[screenCapturer startCapture ];
410
410
411
411
// TODO: Unified interface
@@ -415,7 +415,6 @@ -(void)getDisplayMedia:(NSDictionary *)constraints
415
415
RTCVideoTrack *videoTrack = [self .peerConnectionFactory videoTrackWithSource: videoSource trackId: trackUUID];
416
416
[mediaStream addVideoTrack: videoTrack];
417
417
418
-
419
418
NSMutableArray *audioTracks = [NSMutableArray array ];
420
419
NSMutableArray *videoTracks = [NSMutableArray array ];
421
420
You can’t perform that action at this time.
0 commit comments