diff --git a/ios/RCTWebRTC/RTCVideoViewManager.m b/ios/RCTWebRTC/RTCVideoViewManager.m index 102a1e58f..43e11b2be 100644 --- a/ios/RCTWebRTC/RTCVideoViewManager.m +++ b/ios/RCTWebRTC/RTCVideoViewManager.m @@ -8,7 +8,7 @@ #if TARGET_OS_OSX #import #else -#import +#import #endif #import #import @@ -67,7 +67,7 @@ @interface RTCVideoView : RCTView #if TARGET_OS_OSX @property(nonatomic, readonly) RTCMTLNSVideoView *videoView; #else -@property(nonatomic, readonly) RTCMTLVideoView *videoView; +@property(nonatomic, readonly) RTCVideoRenderingView *videoView; #endif /** @@ -124,7 +124,8 @@ - (instancetype)initWithFrame:(CGRect)frame { subview.wantsLayer = true; _videoView = subview; #else - RTCMTLVideoView *subview = [[RTCMTLVideoView alloc] initWithFrame:CGRectZero]; + RTCVideoRenderingView *subview = [[RTCVideoRenderingView alloc] initWithFrame:CGRectZero]; + subview.renderingBackend = RTCVideoRenderingBackendSharedMetal; _videoView = subview; #endif [self addSubview:self.videoView]; diff --git a/ios/RCTWebRTC/WebRTCModule.m b/ios/RCTWebRTC/WebRTCModule.m index 26944dd72..31a601983 100644 --- a/ios/RCTWebRTC/WebRTCModule.m +++ b/ios/RCTWebRTC/WebRTCModule.m @@ -124,6 +124,8 @@ - (instancetype)init { decoderFactory:decoderFactory audioProcessingModule:nil]; } + + _peerConnectionFactory.frameBufferPolicy = RTCFrameBufferPolicyCopyToNV12; _rtcAudioDeviceModuleObserver = [[AudioDeviceModuleObserver alloc] initWithWebRTCModule:self]; _audioDeviceModule = [[AudioDeviceModule alloc] initWithSource:_peerConnectionFactory.audioDeviceModule diff --git a/package-lock.json b/package-lock.json index 7429c421e..3468f6550 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@stream-io/react-native-webrtc", - "version": "137.2.0", + "version": "137.2.1-rc.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@stream-io/react-native-webrtc", - "version": "137.2.0", + "version": "137.2.1-rc.2", "license": "MIT", "dependencies": { "base64-js": "1.5.1", diff --git a/package.json b/package.json index 98cd717bd..a4abfbc4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stream-io/react-native-webrtc", - "version": "137.2.0", + "version": "137.2.1-rc.2", "repository": { "type": "git", "url": "git+https://github.com/GetStream/react-native-webrtc.git" diff --git a/stream-react-native-webrtc.podspec b/stream-react-native-webrtc.podspec index 4f79503bf..937ba2171 100644 --- a/stream-react-native-webrtc.podspec +++ b/stream-react-native-webrtc.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.swift_version = '5.0' s.dependency 'React-Core' # WebRTC version from https://github.com/GetStream/stream-video-swift-webrtc releases - s.dependency 'StreamWebRTC', '~>137.0.54' + s.dependency 'StreamWebRTC', '~>137.0.75' # Swift/Objective-C compatibility #https://blog.cocoapods.org/CocoaPods-1.5.0/ s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES'