PiPBugDemo icon indicating copy to clipboard operation
PiPBugDemo copied to clipboard

Is there a solution to this problem?

Open CivelXu opened this issue 3 years ago • 17 comments
trafficstars

About Feedback Apple FB9751461, Did you get a reply?

CivelXu avatar Jun 10 '22 03:06 CivelXu

I can't comment on whether @jazzychad got a reply to the bug report but I can confirm this still isn't working on tvOS 16 / Xcode 14 (as of the first beta).

bendodson avatar Jun 14 '22 09:06 bendodson

I haven't got a reply, but I will keep checking =/

jazzychad avatar Jun 14 '22 15:06 jazzychad

This is still broken in tvOS 16 release, right?

tmm1 avatar Sep 27 '22 19:09 tmm1

@tmm1 Yup.

bendodson avatar Sep 30 '22 10:09 bendodson

I have the same issue on tvOS 16

WoodyLiuAlfred avatar Jan 03 '23 03:01 WoodyLiuAlfred

Still a bug on macOS 13.1. Apple! Hurry up! @apple

LiYanan2004 avatar Jan 10 '23 15:01 LiYanan2004

Hi, I have simmilar issue. I have also implemented showing frames based on AVSampleBufferDisplayLayer. Did apple reply for your submission?

For iOS I started with solution based on AVPlayerLayer and

let asset = AVAsset(url: videoUrl)
        let item = AVPlayerItem(asset: asset)

        item.videoComposition = AVVideoComposition(asset: asset, applyingCIFiltersWithHandler: { [weak self] request in

and it is working for ios and macos (also with pip where I'm rendering CIImages) but for tvOS it is not working.

So I started with AVSampleBufferDisplayLayer and it is rendering propertly in my case but without PiP (webrtc frames rendered as CMSampleBuffer). I found in some discussion that for tvOS that there is required some special format of frames. Don't you think that it is possible? (To enable PiP). I have same output as you from API but I'm making frames quite differently. Should't be there any other way which might work and may be the right way to making frames?

fnuky avatar Jan 21 '23 13:01 fnuky

Has anyone been able to test this on tvOS 18 betas yet?

eric avatar Jun 23 '24 23:06 eric

Still not working as of macOS 15 beta 1, and tvOS 18 beta 1.

mman avatar Jun 24 '24 09:06 mman

I've submitted a DTS ticket with the PiPBugDemo and the response was:

Thank you for contacting Apple Developer Technical Support (DTS). We have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations.

If you would like for Apple to consider adding support for such features, please submit your suggestion via Feedback Assistant (https://feedbackassistant.apple.com/). For more information on Feedback Assistant, please visit https://developer.apple.com/bug-reporting.

It appears the only thing everyone can do is submit their own Feedback for Apple to believe this is important enough to address.

eric avatar Jun 30 '24 21:06 eric

Same here, been on this with DTS two years ago, talked to the media engineers during WWDC, filed multiple radars for each platform, all still open with "similar reports: None" :-)

mman avatar Jul 04 '24 11:07 mman

My recent submitted Feedback:

  • tvOS: FB14037110
  • macOS: FB14158567

Both also have "Recent Similar Reports: None".

eric avatar Jul 04 '24 23:07 eric

Hi guys, I finally achieved tvos PiP on tvos 18 with my webrtc transfer frames rendered in AVPlayerLayer LOOK :-)

Image

fnuky avatar Feb 21 '25 09:02 fnuky

@fnuky This is really exciting, however if I read the situation correctly, you must be actually feeding the video data directly somehow do the AVPlayerLayer somehow using private API? Last I tried feeding it into the public contents property of the CALayer (and thus AVPlayerLayer) it did not work.

Would you mind sharing in more detail how you do it? Thx, and much appreciated 🙏

mman avatar Feb 21 '25 13:02 mman

I'm using standart AVPlayerLayer without any private API.. I'm using API for CI filters (AVVideoComposition) to switch original frame to new one made from CMSampleBuffer while playing blank local video in loop with predefined buffer frequency.

isPictureInPictureActive is still false but manually calling startPictureInPicture is working and switch me to play video in PiP mode which is constructed from single frames made by app (in my case converting webrtc yuv buffers). In PiP mode it is not as smooth as on foreground but it is working. Of course on real device.

So I'm this way able to use my app in background while playing video from Netflix.. My boss will be happy..

fnuky avatar Feb 21 '25 13:02 fnuky

Thanks @fnuky, that may be a clever workaround. Do I understand it right that you wanted to say that isPictureInPictureAvailable is still being reported as false?

mman avatar Feb 25 '25 10:02 mman

Thanks @fnuky, that may be a clever workaround. Do I understand it right that you wanted to say that isPictureInPictureAvailable is still being reported as false?

In short answer, yes

fnuky avatar Feb 25 '25 12:02 fnuky