How to allow iPhone auto-lock while playing a video

后端 未结 2 756
没有蜡笔的小新
没有蜡笔的小新 2021-01-14 20:39

How can I allow iOS device to dim screen and auto-lock the device while playing a video with AVFoundation. Playing a video with AVPlayer disable screen auto-lock by default.

2条回答
  •  终归单人心
    2021-01-14 21:09

    I worked on the application where we used AVPlayer to display video backgrounds in application. Our solution was to stop video after some idle time. I mean implementing idle timer on our side. And then send message to all background players to stop them. It's the only good workaround I know.

提交回复
热议问题