ios - 我用AVPlayer播放本地视频在切换前后台状态的时候有几率会先出现启动图片再跳回播放界面是为啥?
PHP中文网
PHP中文网 2017-04-18 09:34:31
0
1
349

播放视频中,切换前后台状态出现的异常现象

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
洪涛

This is normal. If a task does not end in time when switching to the background, the previous screenshot or startup screen will be displayed when you return to the app. The system will take a screenshot of the current app interface when it is placed in the background. However, if the app has other tasks that have not been completed or the video interface will cause the system to fail to take a screenshot, the startup screen will be displayed the next time it is activated. This is system behavior, and there are no rules to follow, so you think it is an abnormal situation.
If you want to prevent this situation, please check your app and pause or end all tasks when applicationWillResignActive, such as network requests, recording and playing audio and video, various background threads, etc. Of course, this cannot 100% guarantee that the system's screenshots will work properly. Some tasks will take time to pause, which will also cause the screenshots to fail.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template