View previous topic :: View next topic |
Author |
Message |
simbo Senior Member
Joined: 28 Jul 2006 Posts: 78 Location: UK
|
Posted: Tue Jul 17, 2007 10:00 pm Post subject: Pandora Remote 0.1.1 (Alpha) |
|
|
Here is the first Alpha release of my script to control [url=http://www.pandora.com]Pandora Radio[/url] via your phone.
What this script can do:-
- View details of the currently playing track, including album art
- Pause, Play, Next Track and Volume controls
- Thumbs Up/Down from the keypad
- Choose a Station to play
Now I've got you interested, let me explain why it's in Alpha:-
- This script will [u]only[/u] work if Pandora is running in Internet Explorer. Firefox etc are [u]not[/u] supported at the moment.
- For this script to run on Vista, you'll need to disable IE's Protected Mode (Tools/Options/Security). Disclaimer to follow. ;-)
- Pandora should be running before you start the script. You can use the included "Start Pandora" script if you're really lazy.
- To use the Choose Station functionality, you must first go into Settings and provide your Pandora User ID. To find out your User ID, go to the Pandora website and to Your Profile (this it [u]not[/u] the e-mail address you use to log into Pandora).
Controls:-
Up: Volume Up
Down: Volume Down
Right: Next Track
1: Thumbs Up (I like this track)
7: Thumbs Down (I don't like this track)
#: Help
*: Menu
Acknowledgements:-
- OpenPandora, for the original concepts behind this script.
- Jonas, for hosting the all-important event wrapper.
This is an early Alpha so any feedback would be useful. Enjoy!
Description: |
|
 Download |
Filename: |
Pandora.zip |
Filesize: |
6.31 KB |
Downloaded: |
1703 Time(s) |
Last edited by simbo on Wed Jul 18, 2007 9:26 am; edited 1 time in total |
|
Back to top |
|
 |
melquiades Junior Member
Joined: 24 Nov 2006 Posts: 50 Location: Washington, DC
|
Posted: Wed Jul 18, 2007 2:22 am Post subject: |
|
|
Very cool. Everything worked great for me except for my User ID. I tried changing it through: Menu/Settings/UserID, but stations which were not mine appeared in the station list.
Then I modified the following line in the script:
-------------------------------------------------------------------------------------------------------------
var StationFeedUrl = "http://feeds.pandora.com/feeds/people/(your name)/stations.xml";
--------------------------------------------------------------------------------------------------------------
I changed 'your name' to my user ID, and every thing is fine now. (You and I clearly enjoy different styles of music!)
Very nice work.
Mel
Last edited by melquiades on Wed Jul 18, 2007 12:12 pm; edited 1 time in total |
|
Back to top |
|
 |
simbo Senior Member
Joined: 28 Jul 2006 Posts: 78 Location: UK
|
Posted: Wed Jul 18, 2007 9:28 am Post subject: |
|
|
Whoops! Thanks for spotting, new version uploaded.
P.S. Some of my stations are for testing purposes, honest!
|
|
Back to top |
|
 |
simbo Senior Member
Joined: 28 Jul 2006 Posts: 78 Location: UK
|
Posted: Wed Jul 18, 2007 10:43 am Post subject: |
|
|
For the sake of my musical modesty, Mel, would you mind blanking out my User ID from your post? Otherwise I might think twice about creating a "Brotherhood of Man" station... am I showing my age?
Thanks!
|
|
Back to top |
|
 |
melquiades Junior Member
Joined: 24 Nov 2006 Posts: 50 Location: Washington, DC
|
Posted: Wed Jul 18, 2007 12:16 pm Post subject: |
|
|
I've changed it. Your secret groovy side is now safe. :)
Mel
|
|
Back to top |
|
 |
jae_63 Senior Member
Joined: 29 Mar 2006 Posts: 79 Location: Bethesda, MD
|
Posted: Thu Jul 19, 2007 9:10 pm Post subject: |
|
|
This is very wonderful and the code is nicely written ... thanks for your efforts.
I wanted to be able to do thumbs-up or thumbs-down from my Treo, so added the virtual keys ":o" and ":c" (palm Green and Calendar buttons), based upon the model in the PowerPoint remote software. Here are the diffs. It would be great if you would incorporate this (or equivalent functionality) into your next version.
Thanks again!
[code:1]
bash-3.2$ diff Pandora\ Remote.js Copy\ of\ Pandora\ Remote.js
192c192
< else if (theKey == "1" || theKey == ":o")
---
> else if (theKey == "1")
194c194
< else if (theKey == "7" || theKey == ":c")
---
> else if (theKey == "7")
439c439
< code[4] = new Array("1",":o");
---
> code[4] = "1";
443c443
< code[5] = new Array("7",":c");
---
> code[5] = "7";
445c445
< description[5] = "I don't like this track";
---
> description[5] = "I don'y like this track";[/code:1]
|
|
Back to top |
|
 |
simbo Senior Member
Joined: 28 Jul 2006 Posts: 78 Location: UK
|
Posted: Thu Jul 19, 2007 10:59 pm Post subject: |
|
|
[quote="jae_63"]It would be great if you would incorporate this (or equivalent functionality) into your next version.[/quote]
Sure, I'd be happy to do so (and thanks for spotting the typo :-)
|
|
Back to top |
|
 |
jae_63 Senior Member
Joined: 29 Mar 2006 Posts: 79 Location: Bethesda, MD
|
Posted: Fri Jul 20, 2007 6:29 pm Post subject: Re: Pandora Remote 0.1.1 (Alpha) |
|
|
[quote="simbo"]
- Jonas, for hosting the all-important event wrapper.
[/quote]
Simbo, could you please explain the event wrapper? I found the XML and looked at it, but don't understand how all the pieces fit together. This is only of interest to developers, I admit.
Can you also explain why your software only works with IE?
|
|
Back to top |
|
 |
simbo Senior Member
Joined: 28 Jul 2006 Posts: 78 Location: UK
|
Posted: Fri Jul 20, 2007 6:58 pm Post subject: Re: Pandora Remote 0.1.1 (Alpha) |
|
|
[quote="jae_63"]Simbo, could you please explain the event wrapper? I found the XML and looked at it, but don't understand how all the pieces fit together. This is only of interest to developers, I admit.[/quote]
The Pandora API uses an event broadcasting approach to pass information, with Flash objects as the "couriers". The event wrapper incorporates the Flash object to hook to Pandora's events and publicise the information as XML (I chose XML because I find it quick and easy to handle from Javascript). For reasons that escape me, the Flash object only works if remotely hosted.
[quote="jae_63"]Can you also explain why your software only works with IE?[/quote]
I'm using the Windows API to send commands to the Pandora player, which means I have to know the exact windows class hierarchy to get a handle on the Pandora player. To support multiple browsers would mean identifying the browser being used and having specific code for each browser. I'm not ruling out supporting other browsers in the future but for this release I chose to stick to one for simplicity. I'm happy to spend some time investigating incorporating other browsers but only if there is a strong demand to do so, otherwise I could end up with a real maintenance headache!
|
|
Back to top |
|
 |
navinrjohnson Newbie
Joined: 21 Jan 2007 Posts: 8
|
Posted: Sat Jul 21, 2007 5:05 pm Post subject: |
|
|
Hi, I was the one who requested the Pandora script a few weeks ago.
[b]A HUGE THANKS to Simbo! IT WORKS BEAUTIFULLY! [/b]I'm having ZERO technical problems. Just a couple enhancement requests to make it even better (not sure if these are possible):
- Have Pandora pause when you're on the phone.
- Ability to bookmark the song that's playing.
- Would be nice (not a big deal) to be able to use it with OpenPandora. (Honestly, having this script is much better than using OpenPandora, so I've just switched back to the web version of Pandora.)
|
|
Back to top |
|
 |
simbo Senior Member
Joined: 28 Jul 2006 Posts: 78 Location: UK
|
Posted: Sun Jul 22, 2007 5:58 pm Post subject: |
|
|
[quote="navinrjohnson"][b]A HUGE THANKS to Simbo! IT WORKS BEAUTIFULLY! [/b]I'm having ZERO technical problems.[/quote]
Thanks for the feedback! :-)
[quote]Have Pandora pause when you're on the phone.[/quote]
Yep, I plan to support phone events in an upcoming release.
[quote]Ability to bookmark the song that's playing.[/quote]
Unfortunately the current Pandora API doesn't support functionality like this. I'm looking into alternatives but don't hold your breath!
[quote]Would be nice (not a big deal) to be able to use it with OpenPandora.[/quote]
This is similar to supporting other browsers; short answer yes, if there's strong enough demand and it's technically feasible, but see my response to jae_63 for a more detailed explanation.
|
|
Back to top |
|
 |
navinrjohnson Newbie
Joined: 21 Jan 2007 Posts: 8
|
Posted: Sun Jul 22, 2007 6:48 pm Post subject: |
|
|
Thanks Simbo - Looking forward to future releases!
One other suggestion: since you can't go back in Pandora (i.e., play the previous song), why not put something else in place of the back button on the screen; perhaps thumbs up or thumbs down? Actually, it would be great to have both the thumbs up and down buttons on the screen. On my device (a Treo), I need to press the Option and X keys to get a 7 (thumbs down), option + E to get a 1 (thumbs up). Would be much nicer just to have a button on the screen. Thanks again.
|
|
Back to top |
|
 |
simbo Senior Member
Joined: 28 Jul 2006 Posts: 78 Location: UK
|
Posted: Sun Jul 22, 2007 7:04 pm Post subject: |
|
|
[quote="navinrjohnson"]since you can't go back in Pandora (i.e., play the previous song), why not put something else in place of the back button on the screen; perhaps thumbs up or thumbs down?[/quote]
I'm holding off on utilising the left/back button at the moment. From a usability standpoint Thumbs Up/Down is too commital - one slip (especially on those fiddly joysticks) and you've changed your station preferences.
[quote]it would be great to have both the thumbs up and down buttons on the screen. On my device (a Treo), I need to press the Option and X keys to get a 7 (thumbs down), option + E to get a 1 (thumbs up). Would be much nicer just to have a button on the screen.[/quote]
jae_63 suggested the palm Green and Calendar buttons as alternatives - would this work for you?
|
|
Back to top |
|
 |
0bvious Newbie
Joined: 25 Jul 2007 Posts: 2
|
Posted: Wed Jul 25, 2007 6:16 pm Post subject: |
|
|
Hello, I love the script, I was just wondering if there was any way to alter it slightly for '[url=http://openpandora.googlepages.com/]OpenPandora[/url]'?
( [url]http://openpandora.googlepages.com/[/url] )
Open Pandora is a standalone Pandora service, which means no need for full screen browser Pandora.
I made a script to load the OpenPandora program, and your remote seems to recognise that it is running, but none of the controls work for the standalone player.
There must be a simple way to alter the code so it will work? I would love to be able to use your script with OpenPandora
Thanks
|
|
Back to top |
|
 |
simbo Senior Member
Joined: 28 Jul 2006 Posts: 78 Location: UK
|
Posted: Wed Jul 25, 2007 7:10 pm Post subject: |
|
|
[quote="0bvious"]Hello, I love the script, I was just wondering if there was any way to alter it slightly for OpenPandora?[/quote]
navinrjohnson has beat you to it asking for this! :-) It's not quite a "simple" change unfortunately (see above for more details) but I'll investigate for a future release. Thanks for the feedback.
|
|
Back to top |
|
 |
|