Creating a view overlay over MPMoviePlayerViewController - iphone

I am developing an app that plays internet radio. Owing to my lack of skill, i have only used the stock MPMoviePlayerController.
This is so far been able to play a few m3u streams (like the 'feeling floyd' station)
However, i was wondering if there was any way to have this MPMoviePlayerViewController to show me extra information.. like the song that is playing (which information i was able to extract form teh metadata.)
I can get this information all right, but how do i put it on the screen?
Can I make an overlay or something? (the centre of the MPMovieplayer is taken up by the quicktime background... it would be great if i could use an overlay on this space to show current music information or whatever.)
Is this overlay thing possible? if not, is there any other way?
Thank you very much!
V

If you want your own custom view over the player you can add it as a subview to the player's view as [player.view addSubview:yourView];

Get the moviePlayer property of MPMoviePlayerViewController. I think you should be able to to do this [moviePlayer.view addSubview:myView].

Related

Is it possible to play video continuiusly after go to other view and come back

I have a video on the first view that use 'MPMoviePlayerController'. I declare the video in 'viewDidLoad' method. I need the video play continuously when go to another view and come back. Is it possible? How?
yes it Possibe play video in background mode try this link
Hope it Help You

What tools and/or libraries should I use to make an animated book

I want to make a book rather like The Pedlar Lady for iPad. Each page has some rich text, and then an animation with sound effects that runs automatically after the user flips to a new page.
I have some idea how I could do that programmatically - Cocos2D is looking pretty useful - but what I don't know is how I could work with my artist. What tools could he use, and what would he deliver so that I can just slot each page's animation in with minimal effort.
Your artist can deliver you assets in the form of pngs, mp3s, and movies that have already been scaled to the target device. You can build the book mostly with Interface Builder. Use AVPlayer to play animations and audio on command. Alternatively (and with more memory use) you can animate images with UIImageView. If you need to move assets around the screen, you can use timers and change the origin of each asset's view.
Edit:
MPMoviePlayer is a simple option. The view can be added more directly, but I have found this to be convenient for layout; After configuring a view in IB:
moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:asset.path]];
moviePlayer.moviePlayer.controlStyle = MPMovieControlStyleNone;
[moviePlayerView addSubview:moviePlayer.view];
moviePlayer.view.frame = moviePlayerView.bounds;
Now that Apple is allowing Adobe's Flash -> App maker, you might want to look at that.

Is MPMoviePlayerController capable of playing a small movie really without any kind of overlay?

I need to play a movie without any overlay from the player. No play/stop buttons, no time line, no start/end time, no progress bar, nothing. Just the plain naked movie in a subview. The movie may then be covered by my own graphics. The documentation does say it's possible to disable controls. However, something like "remaining time" or a progress bar is not neccessarily a "control". Who knows?
Set the controlStyle property of the MPMoviePlayerController to MPMovieControlStyleNone and nothing will be displayed except the video.

How to keep MPMoviePlayerController open after movie ended?

If I use MPMoviePlayerController to play video in my iPhone app, it opens, loads the movie, plays it and then closes. Is it possible to force it to stay open after the movie finishes, so that user can replay it using its controls, instead of using controls in parent view? Also, is it possible to start MPMoviePlayerController in the paused mode?
thanks for any advice.
None of that is possible using the available API in the Pre-3.2 OS. One thing you could do is take a scerenshot of the last frame and stick that behind the movie so when it's done playing, it looks like it's still there, then just stick a button on it to replay. you could make an interface that looks/behaves similar to the standard movie player interface just for the play button if you need to.
For anyone stumbling over this now... There is a way to do this. Check out this question :)

iPhone. Is it possible to load a video file and select a specific frame?

Is it possible to load a short video file and - once loaded - select a specific frame and display that frame in a view? If there is no native support for this, how about an open source alternative?
Thanks in advance.
-Doug
I think that in iphone programming you're stuck with the fullscreen video solution proposed by apple. You could write your own controller to do it differently, but i think it could be difficult to achieve good performances and you're cut out of the app-store for sure.
edit:
looks like in iphone sdk 3.2 apple added something for you:
The MPMoviePlayerController class
defines an interface for managing the
playback of a movie. Playback occurs
either in full-screen mode or in a
custom view that is vended by the
movie player controller. You can
incorporate the view into your own
view hierarchies or use a
MPMoviePlayerViewController object to
manage the presentation for you.
and again
Behavior in iPhone OS 3.1 and Earlier
In iPhone OS 3.1 and earlier, this
class implemented a full-screen movie
player only. After creating the movie
player and initializing it with a
single movie file, you called the play
method to present the movie. (The
definition of the play method has
since moved out of this class and into
the MPMediaPlayback protocol.) The
movie player object itself handled the
actual presentation of the movie
content.
i haven't tested it yet but have a look at the official documentation under MPMoviePlayerController Class Reference, it may help.