forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

More than you wanted to know about the Internet Radio Player

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
FreePlay



Joined: 04 Jan 2006
Posts: 71
Location: Schenectady, New York, USA

PostPosted: Sat Jan 19, 2008 7:54 pm    Post subject: More than you wanted to know about the Internet Radio Player Reply with quote

I've spent quite a bit of time fiddling with the Internet Radio Player plugin Sony added in firmware 3.80, as it offers many interesting new possibilities, such as a pseudo-XMLHttpRequest capability and directory scanning functions built into the web browser. It also appears to be the first public acknowledgement of the screenshot plugin, since there's a function (albeit a placeholder for the moment) with a name that implies that it's solely meant to be used for taking screenshots.

As part of the process I've been gradually documenting the various functions that we've been given with this plugin; a chart of everything I've discovered is available here in glorious, eye-burning color.

Last but not least, when you first set up the radio player, you'll download a .PRS file which contains information about the radio player you're using -things like the title, URL, author, copyright info, icon, etc. I reverse-engineered the .PRS format for kicks and wrote a tool for displaying information about .PRS files and spitting out the associated icon. Source/binaries for the tool are located here.

I know most people don't get excited about web portals, but there's a lot of power tucked away in the radio player plugin if you know how to properly flex its muscles.
Back to top
View user's profile Send private message
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Sat Jan 19, 2008 7:57 pm    Post subject: Reply with quote

*pats freeplay* Good boy :)
Back to top
View user's profile Send private message AIM Address
Hellcat



Joined: 24 Jan 2007
Posts: 84

PostPosted: Sat Jan 19, 2008 8:08 pm    Post subject: Reply with quote

Nice!

How did you get the function name? Bruteforcing NIDs?
How would one call all the functions? From a custom radioplayer .PRS?
Back to top
View user's profile Send private message
FreePlay



Joined: 04 Jan 2006
Posts: 71
Location: Schenectady, New York, USA

PostPosted: Sat Jan 19, 2008 8:20 pm    Post subject: Reply with quote

The function names are javascript; they're referenced as plain text in the radioshack.prx :)

You'd call them from a custom .PRS, yes. You edit your .PRS to point to whatever file you want, then add this in your html code:

Code:
<object name="psp" id="psp" type="application/x-psp-extplugin"></object>


Then you can script the 'psp' object however you want, using the functions I listed, e.g. 'psp.sysRadioPlayEffectSound()'. The functions are only available if you use the 'Internet Radio Player' icon in the XMB, though; the radioshack plugin isn't loaded otherwise.

Maybe this weekend I'll write a tool for making custom .PRS files based on plain text input. That'd be nice, I think.


Last edited by FreePlay on Sun Jan 20, 2008 2:25 am; edited 1 time in total
Back to top
View user's profile Send private message
Hellcat



Joined: 24 Jan 2007
Posts: 84

PostPosted: Sun Jan 20, 2008 2:20 am    Post subject: Reply with quote

I get the feeling that radio thingy will get a very nice "toy" to play with :D

Not bad! :up:
Back to top
View user's profile Send private message
FreePlay



Joined: 04 Jan 2006
Posts: 71
Location: Schenectady, New York, USA

PostPosted: Sun Jan 20, 2008 3:22 am    Post subject: Reply with quote

Here is what I know about the PRS format so far.
Back to top
View user's profile Send private message
FreePlay



Joined: 04 Jan 2006
Posts: 71
Location: Schenectady, New York, USA

PostPosted: Sun Jan 20, 2008 7:14 am    Post subject: Reply with quote

Fixed :)

I've made a program that lets you make and edit .PRS files. Enjoy.


Last edited by FreePlay on Mon Jan 21, 2008 7:42 am; edited 1 time in total
Back to top
View user's profile Send private message
Team-3GO



Joined: 21 Nov 2007
Posts: 17
Location: PSP-Development

PostPosted: Sun Jan 20, 2008 10:22 am    Post subject: Reply with quote

thanks for sharing the infos freeplay.
played around with the radio stuff for two days while i had sony 3.80.
now since there is 3.80 M33 its time to look at it again.
_________________
"Ignorance is the night of the mind, but a night without moon and star."
Back to top
View user's profile Send private message
zefie



Joined: 12 Feb 2008
Posts: 6

PostPosted: Tue Feb 12, 2008 1:35 pm    Post subject: Reply with quote

Thanks for the great player, FreePlay.

Here is my modification of your player code to enable metadata:

http://psp.zefie.com/radiotest.html
http://psp.zefie.com/zefie.prs

Edit: Screenshot


Javascript file:
http://psp.zefie.com/js/radioplayer.js

updateStreamTitle() is a modified version of one of Sony's javascript routines.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group