I use the MPMoviePlayerController to Play an Audio Stream. My code follows the example at:
Everything works fine, but while the stream is playing there is no "done" button to close the Player.
I tested it first with a normal .mp3 file. With the file the only
possibility I found is to skip to the end,
so the player gets the MPMoviePlayerPlaybackDidFinishNotification
notification
(but this won't work on an endless stream, since there is no timeline to
skip to the end).
I tried various styles like [mp setControlStyle:MPMovieControlStyleFullscreen];
with no succes.
In the documentation at MPMoviePlayerController Class stands:
This class plays any movie or audio file supported in iOS. This includes both streamed content and fixed-length files
Is there a possibility to display that button while playing some audio content, or has anyone another solution?
I tried to show you an screenshot but "new users can only post a maximum of two hyperlinks".
For playing file locally, remove
Other wise it will return
i found a solution by my self.
Using the
MPMoviePlayerViewController
class, instead ofMPMoviePlayerController
solved the problem: