I have multiple moviefiles. That i would like to make a playlist of. How can i assign the next and previous buttons to go to the next movie.
I've tried to find a solution for this for a long time, but i cant seem to find a answer for this?
And i'm not talking about dismissing the current MPMoviePlayerController and opening a new one with the new video.
You can use contentURL property of MPMoviePlayerController for playing new video.
If you set this property while a movie is playing, that movie pauses and the new movie begins loading. The new movie starts playing at the beginning.
Related
In my app , i have to play songs from iPod Library with MPMusicPlayerContrller's iPodMusicPlayer.
I just want to know , in my app , first song is playing from Album and when i want to play another song from Playlists that selected from UITableView do i need to use stop function [self.player stop]; before change next songs?
Or i can directly play without stop current playing song?
Thanks for your help.
no need to stop.my question is "Why to stop?". no,never nothing, there is no need of stop.
ios already given you facility of playing new song from playlist through the properties.
if you stops it & again play it,its just wastage of execution time.
Since you probably use skipToNextItem or skipToPreviousItem it's perfectly legit to use them directly.
Documentation for MPMusicPlayerController.
Is it possible to play sections of a movie without using timers to do the pausing and unpausing? For example I have a movie loaded into MPMoviePlayerController, the user taps and the first section of the movie is played then the movie is paused, on the second tap another section is played and so on. Setting the initialPlayBackTime and endPlayBackTime of MPMoviePlayerController doesn't help as endPlayBackTime gets updated only when stop is called (could it be a bug?), but stopping causes an annoying flicker.
I don't think so... You need the timer and that's it.
I have multiple MPMoviePlayerControllers in one view.
When a play one of them while there is already another one is playing,
the playing one is "Paused"(I'm not sure the real state it is, but more like "Stucked")
How can i know which one of the MPMoviePlayerControllers is Stucked?
Its restriction by apple, in single view controller only single movie player will get played. If one player is in play state and you are trying to play another then first player will get in pause/stop mode.
I am developing an iPhone application in which I play the videos using MPMoviePlayerController. Sometimes, some of the videos does not play immediately after I call play on MPMoviePlayerController.
I have called prepareToPlay and in the notified method of MPMediaPlaybackIsPreparedToPlayDidChangeNotification, I am calling play on MPMoviePlayerController.
How can I identify the problem here?
Try using the property movieSourceType and assign a proper value to it before running prepareToPlay.
From MPMoviePlayerController reference;
The default value of this
property is MPMovieSourceTypeUnknown.
This property provides a clue to the
playback system as to how it should
download and buffer the movie content.
If you know the source type of the
movie, setting the value of this
property before playback begins can
improve the load times for the movie
content. If you do not set the source
type explicitly before playback, the
movie player controller must gather
this information, which might delay
playback.
In my app, I select one song from tableView and played in default player,
and then when i back to playlist (i.e tableview) and select another song
then BOTH songs played simultaneously.
How I solve this problem ? I want to play when another song select then that selected song must played and previous one should be stopped.
Please HELP.
Thanks in advance.
Hurray Problem solved....
Problem: Multiple songs overlapping in player.
Reason : Multiple instance creation of AVAudioPlayer.
Solution: Create only one instance at launch, and when play called
then [audioplayer stop] then play (using flags avoid multiple creation).
Thanx to all.