AVSampleBufferDisplayLayer не дает iPhone спать ⇐ IOS
AVSampleBufferDisplayLayer не дает iPhone спать
AVPictureInPictureController.ContentSource from iOS15 is useful for playing AVSampleBufferDisplayLayer in the PiP window.
AVPictureInPictureController(contentSource: .init(sampleBufferDisplayLayer: sampleBufferDisplayLayer, playbackDelegate: self)) However, it prevents "display sleeps" when it's being played in PiP.
if it's used with a traditional AVPlayer, you can pause the playback and it goes to sleep soon just like Youtube app.
AVPictureInPictureController(playerLayer: playerLayer) We already tried several measure such as
bufferDisplayLayer.preventsDisplaySleepDuringVideoPlayback = false and
UIApplication.shared.isIdleTimerDisabled = false but in vain. Also tried to deplete the enqueued buffer here without any effect.
self.bufferDisplayLayer.enqueue(buffer) You can easily reproduce the symptom with iOS part from https://github.com/jazzychad/PiPBugDemo
Источник: https://stackoverflow.com/questions/781 ... m-sleeping
AVPictureInPictureController.ContentSource from iOS15 is useful for playing AVSampleBufferDisplayLayer in the PiP window.
AVPictureInPictureController(contentSource: .init(sampleBufferDisplayLayer: sampleBufferDisplayLayer, playbackDelegate: self)) However, it prevents "display sleeps" when it's being played in PiP.
if it's used with a traditional AVPlayer, you can pause the playback and it goes to sleep soon just like Youtube app.
AVPictureInPictureController(playerLayer: playerLayer) We already tried several measure such as
bufferDisplayLayer.preventsDisplaySleepDuringVideoPlayback = false and
UIApplication.shared.isIdleTimerDisabled = false but in vain. Also tried to deplete the enqueued buffer here without any effect.
self.bufferDisplayLayer.enqueue(buffer) You can easily reproduce the symptom with iOS part from https://github.com/jazzychad/PiPBugDemo
Источник: https://stackoverflow.com/questions/781 ... m-sleeping
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение