MPMoviePlayerController - handle phone call

不羁岁月 提交于 2019-12-25 12:08:53

问题


I'm using MPMoviePlayerController to play a video. When a call comes, i want to pause and when he completes, i want to continue the video. I couldn't find relevant solution in my search. Is this something possible?

Its possible to handle the interruptions using AVAudioSessionDelegate "beginInterruption" and "endInterruption". But when I am setting the session to play back, my movie player sound is not heard at all. Does any one know the solution?


回答1:


There is a callEventHandler in Core Telephony framework. I hope, You could find what you want here.




回答2:


We've to set the session active after endInterruption.



来源:https://stackoverflow.com/questions/7331921/mpmovieplayercontroller-handle-phone-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!