#245077 - 31/12/2004 04:28
Empeg Web Lite - Stylesheet for Hijack's http server
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
I decided to write a cross-browser stylesheet for viewing the playlist information that Mark Lord outputs in an XML file from Hijack. You can find a webpage for the interface here. It does a bit more than just browse playlists, though. It will (once a second, in the background) update the webpage with the currently playing track information, basically serving as another display for the Empeg. There are simple pause, prev and next controls on the front page, too. Suggestions are welcome. I think that I might actually produce a few versions of this: one to serve as a daily web interface, a party interface (that lets people append songs only), etc. Also, it is possible to split stylesheet information out of the .xsl file, but it might get messier the more interfaces you have. Enjoy!
Attachments
244384-ewl1.jpg (270 downloads)
|
Top
|
|
|
|
#245078 - 31/12/2004 04:54
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: cushman]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Looks cool... But... Have you not seen charcoalgray99's web interface? It looks like the same type of thing. Were you aiming for something a little more lean and mean, or does yours do something secret that I'm not immediately seeing?
|
Top
|
|
|
|
#245079 - 31/12/2004 12:02
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: cushman]
|
carpal tunnel
Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
|
Just last night i was just thinking it'd be cool to have different skins or versions or skins of the charcoalgrey99 thing and this is perfect! For some reason, the Hijack version seems to run better than the C99 one, so I'd like to check this out. I think a "lite" version was in order. I'm going to DJ a little party tonight w. my empeg, maybe I can beta test it.
_________________________
Brad B.
|
Top
|
|
|
|
#245080 - 31/12/2004 12:22
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: cushman]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
Cripey! Ain't she a beauty!
Great job, Mark!
Can you also make a clickable remote control that works for "the rest of us"?
the CG99 interface has never worked correctly for me, since I don't use IE.
Cheers
|
Top
|
|
|
|
#245081 - 31/12/2004 12:31
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: cushman]
|
carpal tunnel
Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
|
Works great! Easy to install! One thing I like already is that I can use the "Pause" button to wake up the empeg. Normally, if the empeg is in Standby, the html interface won't wake the player up, so I need to launch empegface or emplode to do this. If we get a version w. remote, I could then turn Shuffle on and off..
_________________________
Brad B.
|
Top
|
|
|
|
#245082 - 31/12/2004 12:39
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: tonyc]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Oh yeah, I've seen it. I even discovered why it did not work with Mozilla a while ago (you can probably dig up the post). I wanted something lean and mean that works with Mozilla, so instead of hacking charcoalgrey's, I just rewrote one from scratch. Another goal was to have everything included in one single xsl file, and no images (hence the lite). Mine also uses a different method of displaying the currently playing track information. Mine displays the current track using text instead of the png available because text is easier to read. I'm using an XMLHttpRequest object which allows the browser to make http requests in the background. I use this for button presses and commands, too. It's asynchronous, so it won't lock up your browser while executing. GC99's used a lot of MS-specific hacks, and the javascript wasn't so cross-browser. And I wanted to learn xsl.
|
Top
|
|
|
|
#245083 - 31/12/2004 12:44
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: SE_Sport_Driver]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Quote: Just last night i was just thinking it'd be cool to have different skins or versions or skins of the charcoalgrey99 thing and this is perfect!
It should be easy to skin, you can actually download an .xml file from Hijack, edit the top to reference the .xsl file on your hard drive, and load it into your web browser to make changes. You won't get the track information at the top. The stylesheet is included in a style block, but you could also easily rip it out and load it from a .css file, too. I wanted to keep it all in one file for ease of install. The way I see it could work later is to have multiple xsl files loaded on your empeg (those would be the skins) and you switch between them by using the khttp_style entry in config.ini.
|
Top
|
|
|
|
#245084 - 31/12/2004 12:49
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: mlord]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Quote: Can you also make a clickable remote control that works for "the rest of us"?
I can, sure. I did not do this already because I did not want to include any images with the first version, just one xsl file. I intend to create several different versions of this interface, I'll work up something with a remote in it, too.
|
Top
|
|
|
|
#245085 - 31/12/2004 16:15
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: cushman]
|
carpal tunnel
Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
|
I assume it'd be easy to toss together a little index page with links to the various versions correct? We could have "lite.xml", "djver.xml", "remotever.xml", etc all in the root folder and select which one we want with the browser instead of a config option?
_________________________
Brad B.
|
Top
|
|
|
|
#245086 - 31/12/2004 17:25
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: SE_Sport_Driver]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Quote: I assume it'd be easy to toss together a little index page with links to the various versions correct? We could have "lite.xml", "djver.xml", "remotever.xml", etc all in the root folder and select which one we want with the browser instead of a config option?
Yup, I forgot about the style=xxx.xsl url switch. This could be done easily.
|
Top
|
|
|
|
#245087 - 01/01/2005 14:41
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: cushman]
|
member
Registered: 09/03/2003
Posts: 121
Loc: Iowa
|
I downloaded the file default.xsl and my browser downloaded it as default.xml. Once I renamed it back to default.xsl the following link http://192.168.0.243/?FID=101&EXT=.xml works fine except I don't see the currently playing track information. Is this because I am running Version 3alpha8?
|
Top
|
|
|
|
#245088 - 01/01/2005 17:07
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: Gleep]
|
carpal tunnel
Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
|
I had the same problem when i first started it up. Then I noticed I was playing back WMA tracks and only a few of them showed info. Once I jumped out of that album playlist and into the other 99.5% of my music, all info showed up properly.
I'm very eager to see the new stylesheets/skins. I don't so much want to see a graphical replica of the Rio remote, but I'l like access to its features like Shuffle, Tweak Order, etc. I'd also love to see a display of the current running order without having to have the empeg itself showing Now/next.
The current stylesheet worked well last night at my party. Guests enjoyed being able to choose music wirelessly.
Bruno
|
Top
|
|
|
|
#245090 - 01/01/2005 19:30
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: Gleep]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
What OS/Browser/Version are you running? Also, do you see any apparent javascript errors (either by using javascript: in the address bar in Mozilla/Netscape or by double clicking on any error icons in IE at the lower left hand corner of the status bar?
I've really only tested this stylesheet on Windoze in IE and Firefox. Other browsers may have quirks that I have not realized yet (why I labeled it ver 0.10).
I am unsure as to why WMA tracks do not work the same, either.. I don't have any WMA tracks but maybe I can make one or two to test on.
|
Top
|
|
|
|
#245091 - 01/01/2005 19:59
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: cushman]
|
carpal tunnel
Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
|
I'm using Firefox under Mac OS X.
By the way, it was perfect timing releasing this when you did. I came online last night specifically to search for the URL to Charcoalgray's stylesheet and this thread was the first hit in the search. It would have been a PITA had I installed CG's and have had problems with Firefox (I used to use it prior to my last update, but had only ever tried it with IE).
As I said, can't wait to see a good interface for parties.
Bruno
|
Top
|
|
|
|
#245092 - 01/01/2005 20:00
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: hybrid8]
|
old hand
Registered: 15/02/2002
Posts: 1049
|
This is great work! Thanks for sharing it. Very nice!
I think it would be cool to be able to type search strings into the interface and have it send the correct remote codes. I could, using Tony's ubiquitous example, just type Rush into a text field and the interface could send 7874 (or whatever). There are definitely remote features that I use a lot with the carcoalgrey99 interface.
I guess all I'm saying is that I like the idea of having remote-only features without necessarily having a copy of the remote in my browser. Using the keyboard for text was just an obvious example that came to mind. Checkboxes for shuffle, random, etc. That kind of thing.
Jim
|
Top
|
|
|
|
#245093 - 01/01/2005 20:34
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: Gleep]
|
pooh-bah
Registered: 15/01/2002
Posts: 1866
Loc: Austin
|
Quote: I have tried other playlists, but it has never displayed what is currently playing?
make sure you have [output] notify=1 set in your config.ini
|
Top
|
|
|
|
#245094 - 01/01/2005 22:44
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: RobotCaleb]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Quote: make sure you have [output] notify=1 set in your config.ini
Good catch! This may be the problem! Now to figure out the WMA stuff.
|
Top
|
|
|
|
#245095 - 02/01/2005 02:09
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: hybrid8]
|
member
Registered: 09/03/2003
Posts: 121
Loc: Iowa
|
I added the [notify] output=1 and it worked momentarily under FireFox. Then as soon as I changed the playlist it hasn't worked since. Doesn't work under Avant Browser either.
|
Top
|
|
|
|
#245096 - 02/01/2005 02:16
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: Gleep]
|
member
Registered: 09/03/2003
Posts: 121
Loc: Iowa
|
I figured it out. It works now that I have [output] notify=1. What doesn't work is if the currently playing information has "double quotes" around it. 'Single Quotes' seem to be alright. OggVorbis files work too, I don't have any WMA files loaded but maybe the person who was having trouble with them has tags with double quotes or some other character that messed it up.
Thanks!
|
Top
|
|
|
|
#245097 - 02/01/2005 03:22
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: Gleep]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Ah, it looks that Hijack is not escaping double quotes when displaying the tag fid:
<?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet type="text/xsl" href="/default.xsl"?> <item stylesheet="/default.xsl" host="192.168.2.68" allow_files="1" allow_commands="1" type="tune" tagfid="16851" fid="16850" length="3022385" year="1997" options="" genre="Pop" title="Schoolchildren Singing "Particle Man"" artist="They Might Be Giants" source="Then: The Earlier Years" comment="" tracknr="72" bitrate="fs192" samplerate="44100" codec="mp3" duration="2:05" offset="1666"/>
Quotes must be represented in XML by " or some other method.
I'll send a PM to mlord and see if he can escape these. I can't use the normal method to parse the output since it is not valid XML.
|
Top
|
|
|
|
#245098 - 02/01/2005 07:26
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: cushman]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31602
Loc: Seattle, WA
|
Quote: Schoolchildren Singing "Particle Man"
I need to find out which album this appears on so I can get it.
|
Top
|
|
|
|
#245099 - 02/01/2005 12:20
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: tfabris]
|
carpal tunnel
Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
|
Greetings! It is in the rest of the embedded tag data - Then: The Early Years track 72 (or disc 2, track 36)...
_________________________
Paul Grzelak 200GB with 48MB RAM, Illuminated Buttons and Digital Outputs
|
Top
|
|
|
|
#245100 - 02/01/2005 12:55
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: cushman]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
I'm on it.. Hijack v414 will be released shortly.
Cheers
|
Top
|
|
|
|
#245101 - 02/01/2005 15:45
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: cushman]
|
carpal tunnel
Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
|
Worked great at the New Years party. Some people were using the "previous" and "next" links to try to browse which made the songs jump around, but I can't really think of a way to get around that other than a brief little introduction before I turn over the keyboard and mouse to them. An "append" only version would be nice too. Good idea.
_________________________
Brad B.
|
Top
|
|
|
|
#245102 - 02/01/2005 16:09
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: SE_Sport_Driver]
|
enthusiast
Registered: 06/03/2003
Posts: 269
Loc: Wellingborough, UK
|
Quote: Some people were using the "previous" and "next" links to try to browse which made the songs jump around
How about turning off the navigation toolbar (either through the View->Toolbars menu or with Javascript), or putting the browser in Kiosk mode?
|
Top
|
|
|
|
#245103 - 02/01/2005 16:52
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: mdavey]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Quote:
Quote: Some people were using the "previous" and "next" links to try to browse which made the songs jump around
How about turning off the navigation toolbar (either through the View->Toolbars menu or with Javascript), or putting the browser in Kiosk mode?
He was talking about the links on the page itself.. there are NextTrack and PrevTrack controls on either side of a pause link that act like the Empeg's front buttons.
The party interface I was talking about would act something like this: Append only, and meant to be run in kiosk mode. When you load the party interface, somehow I would clear the currently running playlist, so everything starts from a blank slate. Then, when someone selects a tune, I could append that information to a list of songs in another frame so that we would have a running playlist. This would allow me to keep track of a running playlist without having to go to the dynamic data to get it. The only problem would be if someone refreshed the frame I use to keep the running playlist. If there was another good way to get a list of currently playing tracks, I could make it more robust, but for now this might do. Maybe we could write a small web service daemon that runs on the Empeg that would read the dynamic data partition, extract the list of currently playing tracks and output it in XML. I do not think anyone has yet done this kind of operation with the current playlist yet, though.
|
Top
|
|
|
|
#245105 - 02/01/2005 18:47
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: Gleep]
|
veteran
Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
|
Quote: Having a playlist view where you could remove and/reorder items would be AWESOME!
Not likely anytime soon. The player does not support removing items in the playlist, and the only re-ordering of items is inserting or the tweak functions.
|
Top
|
|
|
|
#245106 - 02/01/2005 20:37
Re: Empeg Web Lite - Stylesheet for Hijack's http server
[Re: cushman]
|
member
Registered: 09/03/2003
Posts: 121
Loc: Iowa
|
Don't the tweak functions remove things from the playlist?
|
Top
|
|
|
|
|
|