I have started working on the PIP functionality for IOS. I finished my rendering with RTCMTLVideoView. Then I realised what I'd done wrong: MTKView/GLKView aren't supported in pip mode. Now I intend to Create frame render to display user's video instead of RTCMTLVideoView/RTCEAGLVideoView . But I can't proceed since I can't convert RTCVideoTrack to RTCVideoFrame. Any code fragments or branches where we can discover the idea/solution would be really appreciated.
/*
- get videoTrackObject
- convert RTCVideoTrack to RTCVideoFrame
- create pixelBuffer using RTCVideoFrame
- create CMSampleBuffer using CVPixelBuffer
- update in the localView/remoteview UI using cmSampleBuffer
- implement PIP related methods. */
I referred following links to achieve the pip for video calls: pip for webrtc video calls in ios adopting_picture_in_picture_for_video_calls accessing_the_camera_while_multitasking_on_ipad