How to enable iPhone auto lock during MPMoviePlayer playback?

前端 未结 1 1616
余生分开走
余生分开走 2021-01-12 19:12

When I play a video with MPMoviePlayerController in my app my iPhone does not auto lock (tested OS 3.0 & 3.1.2). However, the application.idleTimerDisabled = NO, so this

相关标签:
1条回答
  • 2021-01-12 19:44

    That is a feature of MPMoviePlayerController; most people don't want their screens turning off after three minutes of video if they haven't touched it!

    I guess you could implement a custom controls overlay on top of your movie (explained in the default Apple movie player iPhone demo app) that consists of one invisible button that each time it is pressed resets a timer. If the timer triggers (eg after 3 minutes) you could pause/stop the video.

    0 讨论(0)
提交回复
热议问题