Player in buffering state indefinitely

118 views
Skip to first unread message

dawnerd

unread,
Apr 27, 2011, 12:13:19 AM4/27/11
to Rdio API
Hi all,

I've got an issue with the web playback api where the player reports
that it is buffering but the status never updates and no audio is
played. Just wondering if there's a way to debug what's going on
behind the scenes. As far as I know, I have a valid playback token. In
fact, most of the code was built based off the example app.

Here's the code I have:

var player;
var rdioListener = {
ready: function() {
console.log('player ready');
player = document.getElementById("CTplayer");
player.rdio_play('a254895')
},
playStateChanged: function(state) {
console.log('changed:', state);
}
};
var flashvars = {
playbackToken: playbackToken,
domain: encodeURIComponent('http://'+document.location.host),
listener: 'rdioListener'
};
var params = {
'allowScriptAccess': 'always'
};
swfobject.embedSWF("http://www.rdio.com/api/swf/", "CTplayer", "1",
"1", "9.0.0","", flashvars, params);

-

The ready event fires, and the playStateChanged state fires a few
times (2, 3).

Any insight on how to debug this?

Ian McKellar

unread,
Apr 27, 2011, 6:25:03 PM4/27/11
to rdio...@googlegroups.com
Hi there,

I made a version of this on my computer that I'm testing against localhost and that works for me.


I used a playback token that works for localhost and it works fine.

Then I put it up on a server of mine with an appropriate playback token and that works too:

There might be debug output in your firebug / web inspector / js console. What browser are you testing in?

Ian

-- 
Ian McKellar
Sent with Sparrow
--
You received this message because you are subscribed to the Google Groups "Rdio API" group.
To post to this group, send email to rdio...@googlegroups.com.
To unsubscribe from this group, send email to rdio-api+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rdio-api?hl=en.

dawnerd

unread,
Apr 27, 2011, 6:29:48 PM4/27/11
to Rdio API
The only debug output I get is from my console log of the play state.

I'm using the beta build of Chrome.

Is there anyway the playback token could be generated but be invalid?
Or if there's an invalid key would it even get to the buffer state?

Ian McKellar

unread,
Apr 27, 2011, 7:01:13 PM4/27/11
to rdio...@googlegroups.com
I don't think it would get to the buffer state if the token is invalid. When I invalidated my token I only went to state "2". Are you logged into rdio.com?

Have you tried my test at http://scratch.ianloic.com/pt/pt.html? Do you notice any significant differences between the code I posted and what you're using?

Ian

-- 
Ian McKellar
Sent with Sparrow

dawnerd

unread,
Apr 27, 2011, 7:09:38 PM4/27/11
to Rdio API
Yes, I am logged in. Just tried that url on a different computer than
the one I'm doing dev work on and it still didn't play (Chrome beta +
Firefox 4 osx). The code looks pretty much the same as what I have.

Here's my flash version: MAC 10,2,154,27



On Apr 27, 4:01 pm, Ian McKellar <ian.mckel...@rd.io> wrote:
> I don't think it would get to the buffer state if the token is invalid. When I invalidated my token I only went to state "2". Are you logged into rdio.com?
>
> Have you tried my test athttp://scratch.ianloic.com/pt/pt.html?Do you notice any significant differences between the code I posted and what you're using?

bmcfee

unread,
May 8, 2011, 3:28:55 PM5/8/11
to Rdio API
I'm also having the same problem, but only when I use the playback
token obtained through the api. When I use the token from hello-web-
playback, everything works fine.

I'm testing on Chromium 11.0.696.57 (Developer Build 82915) Ubuntu
10.10. I'm using the python bindings for the api to get the playback
token, and everything seems to be correct (aside from the constant
buffering).



On Apr 27, 3:25 pm, Ian McKellar <ian.mckel...@rd.io> wrote:

Dunkie

unread,
May 16, 2011, 3:07:05 PM5/16/11
to Rdio API
Ian, With the above test I get a the "player ready" and "changed: 2",
"changed: 3" in the log.
I get nothing displayed on the screen, is that the expected behavior?

On Apr 27, 7:01 pm, Ian McKellar <ian.mckel...@rd.io> wrote:
> I don't think it would get to the buffer state if the token is invalid. When I invalidated my token I only went to state "2". Are you logged into rdio.com?
>
> Have you tried my test athttp://scratch.ianloic.com/pt/pt.html?Do you notice any significant differences between the code I posted and what you're using?

Dunkie

unread,
May 16, 2011, 5:35:55 PM5/16/11
to Rdio API
Also, I notice that the sample provided here: https://github.com/rdio/hello-web-playback
Fails to do anything as well.
I just get Error calling method on NPObject!

On May 16, 3:07 pm, Dunkie <blairdun...@sympatico.ca> wrote:
> Ian, With the above test I get a the "player ready" and "changed: 2",
> "changed: 3" in the log.
> I get nothing displayed on the screen, is that the expected behavior?
>
> On Apr 27, 7:01 pm, Ian McKellar <ian.mckel...@rd.io> wrote:
>
>
>
> > I don't think it would get to the buffer state if the token is invalid. When I invalidated my token I only went to state "2". Are you logged into rdio.com?
>
> > Have you tried my test athttp://scratch.ianloic.com/pt/pt.html?Doyou notice any significant differences between the code I posted and what you're using?

Paul Lamere

unread,
May 17, 2011, 6:13:44 AM5/17/11
to Rdio API
FWIW, I had a similar problem that turned out to be because I was
using a playback token that was associated with a different domain
than the domain my application actually was on.

Paul

John Strawser Jr.

unread,
Jun 17, 2011, 2:26:57 AM6/17/11
to Rdio API
Is there anyway to check what domain the swf is expecting to be on?

I'm using a virtual host - anyway that could throw off the playback?

John Strawser Jr.

unread,
Jun 18, 2011, 1:11:01 AM6/18/11
to Rdio API
I gave it the wrong domain on purpose & ended up seeing an actual
ActionScript error in the console log, which was totally different
from the constant buffering state issue - I didn't see any errors.

On Jun 16, 11:26 pm, "John Strawser Jr." <johnstrawse...@gmail.com>
wrote:

John Strawser Jr.

unread,
Jun 18, 2011, 3:12:03 AM6/18/11
to Rdio API
I've also tried both the AS3 API & the JS API. Both get stuck on the
buffer state, 3. I thought maybe since I'm testing locally on a
different port, maybe that was it, but no luck. I tried posting to my
server & got the same buffer message.

On Jun 17, 10:11 pm, "John Strawser Jr." <johnstrawse...@gmail.com>

JGA

unread,
Jul 3, 2011, 4:03:59 PM7/3/11
to Rdio API
Any update on this? I'm getting the same issue?

On Jun 18, 12:12 am, "John Strawser Jr." <johnstrawse...@gmail.com>
wrote:
> I've also tried both the AS3 API & the JS API.  Both get stuck on thebufferstate, 3.  I thought maybe since I'm testing locally on a

JGA

unread,
Jul 3, 2011, 4:05:14 PM7/3/11
to Rdio API
Also, I'm getting the same issue here: http://scratch.ianloic.com/pt/pt.html

Troy Whiteley (@dawnerd)

unread,
Jul 4, 2011, 1:34:29 AM7/4/11
to Rdio API
When you make a request for the playback token, are you including the
port in the domain?

The only way I was able to get a valid token generated was by only
specifying the host. For example, my dev server http://crunchtune.com:8080
would become just crunchtune.com

Example Nodejs using node-rdio:

rdio.getPlaybackToken(auth_token, auth_token_secret, 'crunchtune.com',
function(){});

asdfghjkl

unread,
Dec 28, 2014, 1:48:01 PM12/28/14
to rdio...@googlegroups.com
Necroing this because I have the same problem. It goes to playState 3 and that's it. The demo page linked above does the same. It works on http://rdio.github.io/playback-console/ though.

Devin Sevilla

unread,
Jan 5, 2015, 4:15:41 PM1/5/15
to rdio...@googlegroups.com
Hello!

Have you generated a playback token for your domain name?

[1]: http://www.rdio.com/developers/docs/web-playback/overview/ref-playback-model

--
Devin Sevilla
API Engineer, Rdio Inc.
http://rdio.com/people/devin_s/
> --
> You received this message because you are subscribed to the Google Groups
> "Rdio API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rdio-api+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rdio-api/bd07fd65-3ff7-4d63-9462-8ba2957656d9%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages