Hide Quicktime logo when using MPMoviePlayerController to play audio
John Love <[email protected]> Tue, 9 Aug 2011 11:30:29 -0400
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
Reference my iOS TabController app...
Apple docs state that the AVAudioPlayer class does not provide support =
for streaming audio based on HTTP URL's. AVAudioPlayer plays only music =
embedded in the iApp.
Given that, I do use MPMoviePlayerController to play these web stored =
audio/mp3 files which it can handle.
This definitely works. I start out with a UIView with the lyrics for the =
song. At the very bottom of this lyrics UIView is a "Play" button. The =
user taps this button and the audio/mp3 plays; however, the =
audio/QuickTime (( Q )) graphic comes to the foreground and the lyrics =
disappear and will stay away until the user taps "Done".
What I want to happen is that the audio/mp3 is played, but the lyrics =
stay in front.
BTW, I really don't think I need the "Done" button to be seen because =
the user can stop the audio by simply selecting another Tab.
Obviously this coming to the foreground for the AV Quicktime graphic =
makes sense because the MPMoviePlayerController object is primarily =
designed to play video and the video ought to come to the front. =
Therefore, it is consistent in that the Quicktime graphic also comes to =
the foreground.
BUT, I really do need a way to defeat the audio/QuickTime (( Q )) =
graphic coming to the front and keep the lyrics there.
I did insert code to determine if it was an audio file (mp3), versus a =
video file (mp4). So far so good ... and then if it was an audio file, =
within my actual playing segment, I have:
if ( NSClassFromString(@"MPMoviePlayerViewController") )
{
if (!isAudioFile)
{
[senderViewController
=
presentMoviePlayerViewControllerAnimated:moviePlayerViewController_];
}
}
=20
[moviePlayerController_ play];
It actually works, that is, I actually hear the mp3 in the background, =
with the lyrics staying in front and the audio/QuickTime (( Q )) graphic =
does not show =85
**BUT, what does happen is horrible, that is, the "Done" button shows =
over the lyrics** I talked about with some sort of unknown ??? letters =
there. The gibberish that appears looks line the "Done" label for the =
UIButton superimposed on which is the time remaining to finish the song.
FWIW, I really don't think I need a "Done" button because as soon as I =
go to another tab, either new music or a video, the music initially =
playing stops and the new AV file starts. If I press the Home button, =
the music stops playing, so I think I can get along without the Done =
button being around.
Any ideas to cover over the Done button ?? ... because right now I don't =
have a clue what to do.
John Love
Touch the Future! Teach!