当前位置: 动力学知识库 > 问答 > 编程问答 >

mpmovieplayercontroller - avaudioplayer interferes with mpmovieplayer on ipad

问题描述:

my app plays video and audio. however, i have a problem where once i play an audio file using avaudioplayer, the video refuses to play. when i play the video first, everything is fine. but if the audio is played first, any time i try to play the video it simply pops up the video player but will not play the actual video (you can use the scroller to go to any point in the video, but no playback will happen). this issue does not come up on the iphone, nor on the ipad simulator. clearly there is some resource conflict here, probably related to the audio, and i'd welcome some input on how to address it.

网友答案:

issue solved: i had to call the 'stop' rather than 'pause' method on the avaudioplayer before video playback. this undoes the play preparation and releases the audio resource that had apparently prevented the video from being played.

分享给朋友:
您可能感兴趣的文章:
随机阅读: