mherger;352071 Wrote: 
> > - (same question as above) get player state
> 
> SqueezeJS.Controller.playerStatus - it's an object (or hash) with the
> following items:
> 
> playerStatus = {
>       // if power is undefined, set it to on for http clients
>       power:     (response.power == null) || response.power,
>       mode:      response.mode,
>       rate:      response.rate,
>       current_title: response.current_title,
>       title:     response.playlist_tracks > 0 ?
> response.playlist_loop[0].title : '',
>       track:     response.playlist_tracks > 0 ?
> response.playlist_loop[0].url : '',
>       index:     response.playlist_cur_index,
>       duration:  parseInt(response.duration) || 0,
>       canSeek:   response.can_seek ? true : false,
>       playtime:  parseInt(response.time),
>       timestamp: response.playlist_timestamp
> };
> 
> It doesn't deliver the full list of track information. This is queried
> every 5 seconds, then passed to the UI elements.
> 
> > - get track duration
> 
> Doesn't exist (yet). The following would do:
> 
> SqueezeJS.UI.PlaytimeDuration = Ext.extend(SqueezeJS.UI.Playtime, {
>       onPlaytimeUpdate : function(playtime){
>               if (this.el && playtime)
>                       
> this.el.update(SqueezeJS.Utils.formatTime(playtime.duration));
>       }
> });
> 
> Will add it if it is what you were thinking of.
> 
> > - get track title without track number
> 
> This currently doesn't exist. Needs a change in the parser.
> 
> 
> > - get track number
> 
> SqueezeJS.UI.TrackNo = Ext.extend(SqueezeJS.UI.Component, {
>       onPlayerStateChange : function(result){
>               this.el.update(result.playlist_loop[0].tracknum ?
> result.playlist_loop[0].tracknum + '. ' : '');
>       }
> });
> 
> 
> > - get album name without year
> 
> SqueezeJS.UI.AlbumTitle = Ext.extend(SqueezeJS.UI.Component, {
>       onPlayerStateChange : function(result){
>               this.el.update(SqueezeJS.SonginfoParser.album(result, 
> this.noLink));
>       }
> });
> 
> > - get album year
> 
> SqueezeJS.UI.AlbumYear = Ext.extend(SqueezeJS.UI.Component, {
>       onPlayerStateChange : function(result){
>               this.el.update(SqueezeJS.SonginfoParser.year(result, 
> this.noLink));
>       }
> });
> 
> > - display a progress bar
> 
> new SqueezeJS.UI.PlaytimeProgress('yourHTMLElement');
> 
> > - use different images for buttons and/or progress bar
> 
> That's beyond the scope of this mail... take a look at slimserver.css.
> Styles starting with x-... are overwriting ExtJS defaults. Eg. x-btn
> etc.
> 
> > - get the same information for individual tracks within current
> > playlist
> 
> Don't have an answer for this right now. All the defined components
> listen to the status query, which is about the currently playing track
> only. You'd probably have to overwrite the base class
> SqueezeJS.UI.Component, which adds the listener. Not an easy change I
> guess.
> 
> > - display playlist controls
> 
> Like fwd/rwd? They're covered in the tutorial. What else?
> 
> I'll add the above components to 7.3. Until then you might want to add
> them to your template.
> 
> -- 
> 
> Michael

I like the idea of showing track title without the track number.  Right
now, when poll this data, some of my tracks show up as "1-7 TrackTitle"
for example.  Maybe, it is the tagging my MP3's.


-- 
starfleetcommand
------------------------------------------------------------------------
starfleetcommand's Profile: 
http://forums.slimdevices.com/member.php?userid=20604
View this thread: http://forums.slimdevices.com/showthread.php?t=53975

_______________________________________________
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to