MPMoviePlayerController vs. UIMoviePlayerController?
Hi Guys,
I am having some small troubles with MPMoviePlayerController. In my searches online I see that there is something called UIMoviePlayerController. Is that the official class to use for playing movies on the iPhone? Or did MPMoviePlayerController supplant UIMoviePlayerController?
The reason I ask is that I can only play a movie once. If the User hits the 'done' button, the next movie to be played is not played (it looks as though the movie will play, but then I just get a blank screen). I saw in some forums that this can be solved by calling
UIMoviePlayerController most likely references the controls that are optionaly displayed over your movie player. MPMoviePlayerController is indeed the class you wish to use.
That is not done through software. You just really need the right cables. A quick search revealed this as a possible accessory but I cannot confirm if they work as advertised
I actually have the right cable from Apple. Playing movies through the iTunes interface on the iPhone works fine. But it does not simply mirror whatever is on the screen - and I can't get anything I do in my own apps to appear on the 'second' screen (ie through the AV cable)
when i play video file am hearing only audio..but the video display is not coming...do u have any idea why it is happening like that...am playing mp4 file.
N.B., another issue with MPMoviePlayerController is that it seems to be a singleton instance. Loading a bunch and putting them into an NSDictionary (for instance to cache the headers for instant playback later) does not work. You only ever get the first one to play...
I actually know exactly whats going on with your video player because I had the same problem. If you cannot see it and it is playing, check your code crafeully and step through it. What was happening with me is a second MPMoviePlayerController was being created but not played.. Alas your move video is playing but another empty movie player is being played over top. Anyways thats what the problem was when I did it. It may be hard to prove or to find the reason, but I strongly believe that is the issue, especially since you are getting sound and not video.
Has anybody had any luck using MPMoviePlayerController to play online videos? I can play local movies just fine, but when I put the same file on a server and try to play the file using the URL to it, the playback ends as soon as it starts.
I'm having a few problems with MPMoviePlayerController myself. I'm able to play a video without any sound (.m4v compressed at H.264), but if a video does have sound it will not load in the application at all. Does MPMoviePlayerController actually support videos with sound? Or do I need to incorporate other controllers to run the audio?
I am very new to this, but I am struggling to find useful documentation on the matter.
I'm having a few problems with MPMoviePlayerController myself. I'm able to play a video without any sound (.m4v compressed at H.264), but if a video does have sound it will not load in the application at all. Does MPMoviePlayerController actually support videos with sound? Or do I need to incorporate other controllers to run the audio?
I am very new to this, but I am struggling to find useful documentation on the matter.
I have been able to play movies with sound just fine using just MPMoviePlayerController.
The interface is so simple that it's hard to get anything wrong which is why I think that my problem has to do with a server setting of some sort.
I found that MPMoviePlayerController is VERY picky when it comes to the encoding of the file.
The best way I found to get this right was to open the movie in Quicktime and do an export for iPhone.
Then use this new exported version in your application.
I tried all sorts for days before I worked this out.
Thanks Ben, that seems an easier way of doing it. I'm still getting the problem though, but I've learned the problem could be with the iPhone Simulator rather than the code/video. I've read it can be a bit glitchy with this sort of thing. I'll try it out on a real device when I get the chance.
I really am having problems. I want a video to be displayed after a UIButton or a UIBarButtonItem is clicked. The video i have is streaming off of my dropbox. I know everything i need on that end. I just can't figure out how to play videos with the click off a button.
I have tried so many can someone tell me what i need to write in the .h, .m and delegate if needed. I have tried to make it using many methods and they all give me errors and warnings.