简体   繁体   中英

Video and headphones issue

I have a custom video player that works very well. I discovered a problem and would like to know if this is a problem of iOS or is there a way to solve. When I'm watching and listening to the video with headphones on and take off my headphones, the sound continues, but the video freezes.

I am using MPMoviePlayerController for video and AVAudioPlayer for audio.

Tks for help

You can get a callback when headphones are unplugged from the device. This might be a good starting point.

Check out this SO question: Headphones unplugged during playback cause bug on iPhone app

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM