MPMoviePlayerController - handle phone call

2019-08-23 14:50发布

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?

2条回答
男人必须洒脱
2楼-- · 2019-08-23 15:10

We've to set the session active after endInterruption.

查看更多
走好不送
3楼-- · 2019-08-23 15:18

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

查看更多
登录 后发表回答