PIPKit icon indicating copy to clipboard operation
PIPKit copied to clipboard

more detail about AVPIPKitVideoController

Open fukemy opened this issue 4 years ago • 3 comments

Hi, can u explain more about AVPIPKitVideoController, im trying to implement webRTC call and startPIP, but the result is only white screen. My targetView is mainRemoteView( to display caller video)

fukemy avatar Jan 04 '22 07:01 fukemy

Flow

AVPIPKitUsable.pipTargetView -> UIImage(VideoProvider) -> CMSampleBuffer(VideoProvider) -> BufferLayer(VideoProvider) AVPictureInPictureController(w. BufferLayer) (VideoController)

can you check if the image(mainRemoteView -> UIImage) is valid?

Kofktu avatar Jan 04 '22 09:01 Kofktu

sorry if my knowledge is wrong. I saw u convert UIView -> UIImage -> CMSampleBuffer -> BufferLayer


        guard let buffer = targetView?.uiImage.cmSampleBuffer(preferredFramesPerSecond: preferredFramesPerSecond) else {
            return
        }

i am ensure my mainRemoteView is valid. here is more about my mainRemoteView


    @IBOutlet weak var mainRemoteView : WebRTCViewWithoutButton!

about WebrtcViewWithoutButton

final class WebRTCViewWithoutButton: UIView, RTCVideoViewDelegate {
    
    var videoView = RTCEAGLVideoView(frame: .zero)
    

mainRemoteView still displaying caller's video in fullScreen, but when enterPIP it's only show white screen

fukemy avatar Jan 04 '22 09:01 fukemy

AVPIPKitRenderer You can make your own renderer and use it in v1.0.1

Kofktu avatar Jan 08 '22 11:01 Kofktu