Skip to content

naru-jpn/pip-battery-drain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This problem fixed above iOS16.4 :)

PiP Battery Drain

Sample project to reproduce PiP batery drain.

Detail

Problem that Picture-in-Picture incredibly use cpu resource on device above iOS16.1 is widely known.

I found PiP use huge cpu resource only when return specific value in a function related with AVPictureInPictureSampleBufferPlaybackDelegate.

func pictureInPictureControllerIsPlaybackPaused(_ pictureInPictureController: AVPictureInPictureController) -> Bool {
  // CPU usage become over 100% when return `false` here.
  return false
}

PiP will calm down if developers return true in above function, but developers control Play and Pause mark on video contents in PiP through that delegate method.

This is only the short term solution and there is tradeoff between user-control of contents and problem of battery.

About

Reproduce PiP Battery Drain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages