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

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.

Related

How do I detect when the flash for the AVCaptureDevice has finished and still image capture has begun?

I am making a pretty simple/standard camera app that uses a AVCaptureVideoPreviewLayer. When the user presses a button, I call captureStillImageAsynchronouslyFromConnection on the AVCaptureStillImageOutput to capture an image. At the time that I capture the image, I animate a simple white UIView over the preview layer as an indication to the user that a photo is being captured, and hide it again after the image capture is complete.
My problem is that when the camera flash is on, I don't want to display the white view immediately because the photo capture doesn't actually happen until after the flash has gone off. Is there a way to determine that the flash has finished or that the image capture has actually begun? Perhaps via KVO, NSNotificationCenter, or something?
Try using KVO on the capturingStillImage property of AVCaptureStillImageOutput.
The documentation reads like that may be what you need.

AVPlayer - Benny Hill style speeded up video issue

I'm using AVPlayer to show a live stream. Works fine. Part of my app requires a modal view to appear over the video. Actually, it flips the video view to show the modal view. I want the video's audio to keep playing, which it does fine.
However, the problem is when I return to the video. The video's visuals speed up for a few seconds, Benny Hill style, to compensate for the period they were off the screen. Then the video starts playing normally. Is there a way to stop this speed up? If not, can I remove the visual element until the speeded up bit stops.

Creating a view overlay over MPMoviePlayerViewController

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].

Is it possible to play a video on iPhone and have a subtitles synchronized with it show up?

I want to add a "subtitles" to a video played in an iPhone app. I don't want those subtitles encoded into the video itself - ideally I'd love to have a view showing the video (with pause, play, volume and such standard controls) together with a view displaying the text that changes together with movie time changing.
If I drawn that, it's something like this,
So, basicly, I would need a way to get a method called when movie is playing, and then synchronize the text displayed on the label with the movie timing.
Anyone used a solution that was able to do it?
I've recently done something that syncs graphics to times in an audio track. The way I did it was by using the currentPlaybackTime property of the MPMediaPlayback interface (which the MoviePlayer controller should also conform to). This returns the seconds elapsed in the media, in a double (typedef'ed as NSTimeInterval). The actual synchronisation in my app was not done in notifications, as I couldn't find any resembling a "tick", but instead I created a timer, calling a function queried the currentPlaybackTime, and updated the graphics based on this.
In terms of your implementation, I would assume you have some kind of system for associating label text (subtitles) with a particular time. You could then compare the text's time range with the time returned from currentPlaybackTime to find the correct text to display.

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 :)