How to play sequence video continuously on iPhone? - iphone

I'm trying to play two videos continuously using MPMoviePlayer. I let the second video play when the MPMoviePlayerPlaybackDidFinishNotification is posted.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:#selector(playSecondMovie)
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
The problem is when the first video stops, the view will go back to the previously view for a short while before play the next video.
Is there any idea about how to play video continuously or is it possible to get the image of the last frame in the first video?

The only way to have a youtube video play inside your own app is to create a UIWebView with the embed tag from Youtube for the movie you want to play as the UIWebView's content. UIWebView will detect that the embedded object is a Youtube link, and the web view's content will be the youtube preview for the video. When your user clicks the preview, the video will be shown in an MPMoviePlayerController. This is the technique described at the link that Muxecoid provided (http://iphoneincubator.com/blog/audio-video/how-to-play-youtube-videos-within-an-application), and this is (as far as I know of) the only way to have a youtube video play within an application. You can still have the Youtube application launch by passing the youtube URL to -[UIApplication openURL:], but of course this closes your own application which is often undesirable.
Unfortunately, there's no way to directly play a youtube video with MPMoviePlayerController because youtube does not expose direct links to the video files.

I've made a walkaround to solve the problem. The major idea is to add a fullscreen black view over the previous view before the first movie plays. So when the first movie ends playing the full screen will be black (This looks more natural than the previous view).
Some more modifications:
1 Another problem is that when I hides the status bar, the area will be white. So I also set the window color to black color.
2 When all the video finishes playing, the previous view is shown and the view frame will not leave space for status bar. So I change the view's orgin y to 20 before the status bar appears.
Hope this helps those who meet the same problem.

Related

play audio with controls in iOS

I'm building an App that plays a mp3 file (hosted on http://<somewhere>/<audio>.mp3) while the user is watching some changing labels (think about a lyrics app, which write the lyrics synchronised with the song).
In the bottom side of the screen I'd like to show the audio controls (play/pause, ff, rew), and a bar for indicating the downloaded part of the file and the playing point.
How is the easiest way to do it? I've already tried with AVAudioPlayer, AVplayer and MPMoviePlayerController, but none of them solved my problem.
You can use MPVolumeView Class.Read the documentation here http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPVolumeView_Class/Reference/Reference.html

Overlay on vimeo movie on iPad/iPhone not clickable

We have a embedded background movie on giardinohotelgroup.ch (if you click on a small movie, the whole movie starts)
On desktop everything works as expected (the topbar is overlapping the movie and the links are still clickable)
The problem is, the same functionality doesn't work on iPad/iPhone.
The links are clickable as long the movie didn't started. As soon the user pushs the playbutton the links are not clickable anymore.
Do someone know why? Should not be a z-index issue because the links are not behind the movie.
iOS does not allow interaction with any elements above a video when the native controls are used, which we do in the current version of our player. On the iPhone, when they hit play it will automatically go into full screen and there is no way to prevent that.

Tips on using webview to play an embedded Flash movie

I've tried (without success) to get a video to play within a webview. I can see the video thumbnail with the default play button overlaying the video.
When I click the play button - the entire video hi-lights in transparent yellowish/orange. Clicking play again causes the Play button to blink. The thumbnail always remains, but never plays. I can even see the timeline below the video with the play-head, etc. I can never touch the video controls, because every click treats the entire video like one big button - and hi-lights like mentioned above.
They are numerous videos to be played and they are not at YouTube, so launching the YT player with an intent isn't desired.
I'm using SDK 8 (2.2), runing on a 2.3.6 device, and Have the latest Flash Player 11.xxxxx installed.
Any suggestions?
Took another approach in the app.

Adding a YouTube video to my application

I am trying to embed a YouTube video in my application, and I am going through this tutorial as a start. I get the red screen when I run it on the stimulator, so I presume everything went well.
Now when the user taps on the screen while the video is playing I need a toolbar to appear, with a slider showing the length of the video (and the user could slide to his/her desired time on the video).
I need to know if this feature comes by default when you embed the YoutTube video, or do i have to code it? If i have to code it how should i do it? Any sample codes or tutorial?
The only way to show a YouTube video in an iOS app is by having it inside a UIWebView (that is what the tutorial walks you through). Once the user taps the "play" button, the video should go full screen and automatically present the standard video controls that you see when you play videos on iOS.
Youtube provides the HTML code for embedding videos in web pages. This HTML code will also produce a video when embedded in a UIWebView. While the video is playing, all of the standard Youtube video controls (Play, Pause, Time Slider) should also show up in the UIWebView.

Customizing the screen of Movieplayer in iPhone

I've few doubts regarding movie player app
How can I customize the screen size. I want only video or movie to be played only to half the screen and I want to add custom controls buttons to the remaining half of movie player.
In movie player example overlay view is there but how to change the name of the button and label in that and I'm unable to do that.
The MPMovePlayer UI cannot be modified. It plays fullscreen video, and provides the default controls. There's currently no way to do what you need in the official iPhone SDK.
Use this link for video player customization:
https://developer.apple.com/library/ios/samplecode/MoviePlayer_iPhone/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007798
download sample code and modify accordingly.