Posts

Post not yet marked as solved
1 Replies
234 Views
Following the steps in "Explore HLS variants in AVFoundation" WWDC21 video I have noticed that the URLSession:aggregateAssetDownloadTask:willDownloadToURL: delegate method is not triggered. I can't find an alternate delegate method that would let us know what the download path is so that we can utilize that path for offline playback. The fileURL on the download task's progress property is always nil. The download does occur because if I create a repeating 1 second timer and print out the progress property I can see the progress of the download reach 100%.
Posted
by jblaker.
Last updated
.
Post not yet marked as solved
0 Replies
279 Views
I know that if you want background audio from AVPlayer you need to detatch your AVPlayer from either your AVPlayerViewController or your AVPlayerLayer in addition to having your AVAudioSession configured correctly. I have that all squared away and background audio is fine until we introduce AVPictureInPictureController or use the PiP behavior baked into AVPlayerViewController. If you want PiP to behave as expected when you put your app into the background by switching to another app or going to the homescreen you can't perform the detachment operation otherwise the PiP display fails. On an iPad if PiP is active and you lock your device you continue to get background audio playback. However on an iPhone if PiP is active and you lock the device the audio pauses. However if PiP is inactive and you lock the device the audio will pause and you have to manually tap play on the lockscreen controls. This is the same between iPad and iPhone devices. My questions are: Is there a way to keep background-audio playback going when PiP is inactive and the device is locked (iPhone and iPad) Is there a way to keep background-audio playback going when PiP is active and the device is locked? (iPhone)
Posted
by jblaker.
Last updated
.
Post not yet marked as solved
0 Replies
335 Views
Automatic Picture in Picture fails on iOS 14 when the container view of the original video is too small. Have others experienced this problem? Specifically, it looks like Automatic PiP fails when the container view is narrower that the safe area and when the container view height is less than 57% of its width (16:9). Is a minimum container view size documented anywhere?
Posted
by jblaker.
Last updated
.
Post not yet marked as solved
0 Replies
258 Views
We have a FairPlay license set up that requires a renewal request every so often. After we receive the first AVContentKeyRequest we schedule an event x seconds in the future which will trigger a renewExpiringResponseDataForContentKeyRequest: on the AVContentKeyRequest. After calling renewExpiringResponseDataForContentKeyRequest our AVContentKeySessionDelegate has its contentKeySession:didProvideRenewingContentKeyRequest: delegate method triggered and we can then request a new license from our license server. We ran across an issue where when AirPlay is active and we've received a new AVContentKeyRequest once AirPlay begins, when we attempt to call renewExpiringResponseDataForContentKeyRequest: for it, contentKeySession:didProvideRenewingContentKeyRequest: is never triggered. I have observed this on both an AppleTV 4 running tvOS 13 and an AppleTV 3 running 7.5.
Posted
by jblaker.
Last updated
.