Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Adding Songs While in The Background [iOS]
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rahul kishore  
View profile  
 More options Jun 8 2012, 11:22 am
From: Rahul kishore <rahul.kish...@gmail.com>
Date: Fri, 8 Jun 2012 08:22:05 -0700 (PDT)
Local: Fri, Jun 8 2012 11:22 am
Subject: Adding Songs While in The Background [iOS]
Hey There,
  While I've been able to get the currently playing song to continue
playing while the App is in the background by adding the right to key
to my info-plist, the system wide play/pause (when double clicking the
home button and swiping to reveal the left mulittasking menu) do not
change to my app's controls.  There's also no clear callbacks to the
app that allow for a new song to be queued up.
  Apple's audio session guide is all described by using AVFoundation
and the AVPlayer, but it doesn't appear that RDPlayer is a subclass of
AVPlayer.  Is it possible to implement the above two features? Is
there a piece of documentation that I should look at to understand how
to be able to play a new song while still in the background
specifically?

Cheers,
Rahul


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Devin Sevilla  
View profile  
 More options Jun 8 2012, 5:55 pm
From: Devin Sevilla <devin.sevi...@rd.io>
Date: Fri, 8 Jun 2012 14:55:31 -0700
Local: Fri, Jun 8 2012 5:55 pm
Subject: Re: [rdio-api] Adding Songs While in The Background [iOS]

On Fri, Jun 8, 2012 at 8:22 AM, Rahul kishore <rahul.kish...@gmail.com> wrote:
> Apple's audio session guide is all described by using AVFoundation
> and the AVPlayer, but it doesn't appear that RDPlayer is a subclass of
> AVPlayer.

You are correct, at this time RDPlayer does not use AVPlayer of
AVFoundation. It currently uses the Audio Toolbox portion of Core
Audio.

> Is it possible to implement the above two features? Is
> there a piece of documentation that I should look at to understand how
> to be able to play a new song while still in the background
> specifically?

I'll dig in deeper and figure out if this is possible using Audio
Toolbox or if I would need to switch to AVPlayer. Stay tuned.

--
Devin Sevilla
API Engineer, Rdio Inc.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chintan Patel  
View profile  
 More options Jun 18 2012, 2:06 pm
From: Chintan Patel <chintan...@gmail.com>
Date: Mon, 18 Jun 2012 11:06:51 -0700 (PDT)
Local: Mon, Jun 18 2012 2:06 pm
Subject: Re: [rdio-api] Adding Songs While in The Background [iOS]

Any update on this? I too need to change the song playing in the
background.

Right now the currently playing song plays in background but the app does
not play more songs after the first song ends playback.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andy Soell  
View profile  
 More options Jun 18 2012, 2:17 pm
From: Andy Soell <aso...@gmail.com>
Date: Mon, 18 Jun 2012 14:17:22 -0400
Local: Mon, Jun 18 2012 2:17 pm
Subject: Re: [rdio-api] Adding Songs While in The Background [iOS]
You must have missed the announcement earlier this month about the updated iOS SDK. Much better queue management in this new version. Check out the updated documentation at:

http://developers.rdio.com/media/static/developer/ios/docs/

On Jun 18, 2012, at 2:06 PM, Chintan Patel wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chintan Patel  
View profile  
 More options Jun 19 2012, 3:21 pm
From: Chintan Patel <chintan...@gmail.com>
Date: Tue, 19 Jun 2012 12:21:42 -0700 (PDT)
Local: Tues, Jun 19 2012 3:21 pm
Subject: Re: [rdio-api] Adding Songs While in The Background [iOS]

Andy,

Thanks for your reply and i am currently playing with the new SDK but
unable to implement the feature i want.

If possible, can you give me a general overview about how would i go about
changing the song while the app is in background with the new SDK version?
I do have a list of track keys to be played (4) but i want to be able to
not only change the track when one track finishes playing but also load new
tracks when the queue is about to get empty.

Right now i am not able to accomplish either.

Any help will be much appreciated.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andy Soell  
View profile  
 More options Jun 19 2012, 3:29 pm
From: Andy Soell <aso...@gmail.com>
Date: Tue, 19 Jun 2012 15:29:29 -0400
Local: Tues, Jun 19 2012 3:29 pm
Subject: Re: [rdio-api] Adding Songs While in The Background [iOS]
Happy to help. It sounds like our apps are fairly similar… here's what I'm doing in rrrrradio, the app I maintain:

1) When the stream starts, I call the RDPlayer:playSources: method with an array of tracks I want to play.
2) Every minute or so, I check a web site that I maintain that keeps an ongoing list of tracks to play, and I load them into an NSArray.
3) I find the index of the currently playing track in this array, and then call the RDPlayer:updateQueue:withCurrentTrackIndex: method. This is the key. This method basically takes the NSArray of tracks you pass to it and updates its own internal queue with new tracks it finds in that list. The player continues playing whatever it was already playing without any interruption. As you can see from the documentation (http://www.rdio.com/media/static/developer/ios/docs/interface_r_d_pla...) it does require you to know the index of the currently playing song. If you don't pass that in properly, you'll see an warning about it in the debug area of Xcode.

If what you're trying to do is *stop* playing the current song and move on to a different one while your app is in the background, your process will be similar. You can use the RDPlayer:updateQueue:withCurrentTrackIndex: method to update the queue so that the song you want to play comes up next, and then call the RDPlayer:next method to advance the player to the next track.

Hope that helps!

On Jun 19, 2012, at 3:21 PM, Chintan Patel wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chintan Patel  
View profile  
 More options Jun 19 2012, 3:35 pm
From: Chintan Patel <chintan...@gmail.com>
Date: Tue, 19 Jun 2012 12:35:58 -0700 (PDT)
Local: Tues, Jun 19 2012 3:35 pm
Subject: Re: [rdio-api] Adding Songs While in The Background [iOS]

Wow! Thanks for the super fast reply. I will give it a try and let you
know.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »