AVSampleBufferDisplayLayer не дает iPhone спатьIOS

Программируем под IOS
Ответить
Anonymous
 AVSampleBufferDisplayLayer не дает iPhone спать

Сообщение Anonymous »


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
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «IOS»