INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: create a flash based now playing screen  (Read 2590 times)

Kid_Squid

  • Regular Member
  • Recent member
  • *
  • Posts: 18
  • nothing more to say...
create a flash based now playing screen
« on: April 15, 2006, 07:02:33 pm »

i didn't have alot of help in the third party plug-in forum so i thought i would ask here...

If I wanted to create a "Now Playing" screen in flash...how could I have it querry MC to find out:

- What is currently playing
- The cover art
or any other data fields stored in the MC database.

I know have to make it work on the flash side,need some help querying the data from mc.

Is this something that could be easily accomplished?

Thanks,

Squid
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: create a flash based now playing screen
« Reply #1 on: April 16, 2006, 03:52:37 am »

OK I don't think anyone's tried this one before...
If you look in the Display Plugins area there is a plugin called
 Arsenolite which allows you to load shockwave content.
I've no idea what it allows you to do or whether it even works
with MC 11.1 but I thought I'd let you know it's there.

From what I remember of Flash, it's got a scripting engine
as a kind of  back end...Directors got Lingo, Flash is something slightly different...
I've not done much so don't know huge amounts about it, and whether the ideas
are possible...
In order retrieve the data you need you've got two options as I see it...

1.  You need to import Media Centers Type Library (tlb file), then
use an Equivilent to GetObject to get a reference to the current instance of
Media Center.  With this you have the full SDK at your disposal.
From there you can poll Media Center once a second or so to check for
track changes and get information...

2. If you made your flash stuff in to a Track Info plugin,
you could place all the fields you require into the HTML ( They wouldn't need to be shown )
Every time a new track is played Media Center would regenerate this file.
You could check the date time of the last written Generated.HTML,
if it's changed you can then retrieve the information you require by
parsing the HTML... (Place all the info near the top of the file so you don't
need to read the entire file...)

Make sure you check out the Developer Pages link at the top of this board.
If you get stuck feel free to ask more questions(Not saying I can answer them)...
I'd imagine the 2nd option might be the easiest.

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71430
  • Where did I put my teeth?
Re: create a flash based now playing screen
« Reply #2 on: April 16, 2006, 07:01:14 am »

OK I don't think anyone's tried this one before...
If you look in the Display Plugins area there is a plugin called
 Arsenolite which allows you to load shockwave content.
I've no idea what it allows you to do or whether it even works
with MC 11.1 but I thought I'd let you know it's there.
MC11.1 should play shockwave natively.
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: create a flash based now playing screen
« Reply #3 on: April 16, 2006, 08:47:59 am »

MC11.1 should play shockwave natively.

Cheers Jim I was unaware of that,  although I mentioned it more
in case it had some method of passing a reference through to the content...
Unlikely I'd guess tho...

Kid_Squid

  • Regular Member
  • Recent member
  • *
  • Posts: 18
  • nothing more to say...
Re: create a flash based now playing screen
« Reply #4 on: April 16, 2006, 10:50:51 pm »

i would prefer to make this a stand-alone .exe
what will i need to poll mc?

thanks,

squid
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: create a flash based now playing screen
« Reply #5 on: April 17, 2006, 04:08:40 am »

Polling just means requesting the information every so often.
Once you've got a reference to Media Center this is easy.
However I've just had a quick look, and I don't think ActionScript
is that advanced.   However I stumbled across an alternative idea,
where other people have had similar problems.

It basically would involve setting up a little server which resides in an interface plugin
or even a c# script, which uses sockets to allow clients to request data.

The actionscript could then use sockets as a client to request and receive the data, and wouldn't even need to be on the same machine =)

If that sounds a little scary then I'd be happy to lend a hand
next week, kinda busy this week.
Sounds like a good challenge however!
The cover art may prove tricky, not sure if Actionscript could handle putting
an image back together...

Kid_Squid

  • Regular Member
  • Recent member
  • *
  • Posts: 18
  • nothing more to say...
Re: create a flash based now playing screen
« Reply #6 on: April 17, 2006, 09:51:53 am »

Action Scripting is a fairly advanced language and I have it doing quite a bit of data work.  We have wriitten many an application that uses flash as the front end to querry everything from a SQL server to propritary systems.

I guess what I really need some help with is what interface is there for me to poll from and in what format?  Can I get XML? Can I get a text file?  I was under the assumption that MC had a server of some sort that could be querried for this type of information...maybe I misunderstood.

Thanks,

Squid
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: create a flash based now playing screen
« Reply #7 on: April 17, 2006, 10:55:30 am »

JRiver provides a programming interface to Media Center through a Type Library file. (TLB) which is written in C++/COM I believe.
that provides the interfaces that plugins and other software can
use to perform operations including querying the playing now playlist.
It's explained in detail on the Developer Pages at the top of this board.

In order to use this interface however you need to be able to get a reference
to the Media Center Object, which is placed in the Running Object Table (ROT).
This procedure is called out of proc initialisation.

Many languages(Especially those provided by MS) provide a function to get
this object.  In C++ and VB it's GetObject();

Interface plugins get this reference passed directly to them. (In proc)
This is how the evillyrics/playing now style plugins work.

I don't think theres a way to import the type library or get the active object in Actionscript however.
I could be wrong I only did a quick search.  If you want to go down that route I think you'll just have to keep searching in that area..

As for Servers...
Short answer I don't think theres anything that does what you want. 
Here is what I believe each server that comes with MC does.
Library Server allows clients to play on the machine on a client machine running MC.
The UPNP server allows UPNP clients to do the same without MC.
TiVo server I think is the same but specifically for the TiVo product.
Remote Server allows the control of Media Center from another
computer via HTTP, this may possibly do what you want, but
I don't know if it's documented anywhere....

When you say you want the Flash stuff as .EXE
you could still have a trackInfo plugin running as a visualisation in the background.  The output from that would definitley contain the information your after, and would
probably be the easiest to do.  However it would require that the TrackInfo plugin be selected in MC.  The TrackInfo stuff is just HTML with keywords inserted,
so it's dead easy to setup to get the information you required.
Pages: [1]   Go Up