AVtouch problem - ios

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.

Related

FSAudioController music transitions

I'm using FSAudioController to play mp3's from my service. I have a URL list and I'm playing songs by shuffling the list.
What I want to do is, 5 seconds before the current song ends, next song will start playing and there will be a soft transition between songs. But I couldn't find anything about how to play 2 songs at the same time.
I thought about using 2 different FSAudioController objects, but I wanted to ask if there is smarter way to do it first.
Thanks in advance!
Unfortunately FSAudioController does not support crossfade option so you will have to use 2 different FSAudioController objects.

Multiple movie files MPMoviePlayerController

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.

Do i need to stop MusicPlayerController first before i play to next song in iOS?

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.

Playing sections of a movie

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.

Multiple MPMoviePlayerController in one view

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.

Resources