Announcement
Collapse
No announcement yet.
Remote "NowPlaying" Display
Collapse
X
-
Remote "NowPlaying" Display
> Am I doing it in the correct place?
Hard to tell without a reasonably sized screenshot... https://gyazo.com/
to the rescue :-)
--
Michael
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
Comment
-
Originally posted by RussellMrgn View PostYou have to have the album showing on squeezebox server (Right Hand Pane) GUI, with the player that you have selected (if you have more than one). Then you open "The Now Playing" screen.
This is from the readme file:-
"This html may show a blank page when initially installed. To correct, launch the SqueezeCenter or SqueezeBox Server web interface in Internet Explorer on the
same computer used to display this html and select the player you wish this html to show. Then refresh do a CTRL-F5 to do a full refresh of this html. Not sure
why this step is necessary, but that is what I've found in my testing. Also, to change the player this html shows, from the same computer launch the SqueezeCenter
web interface and select the player to display. Then do a CTRL-F5 to do a clean refresh of this html page. The new player should now be displayed."
I'm using the nowplaying from MillmoorRon. Is it possible to hardcode the player which is presented?
Maybe it's here and I have just to change a litte:
Code:17 <script type="text/javascript"> 18 Ext.onReady(function(){ 19 SqueezeJS.Controller.init({player: playerid});
Thomas
This Quick & Dirty Solution with an unvisible IFRAME solved my problem, but I'm looking for a better way:
Code:</script> <IFRAME src="http://192.168.2.153:9000/?player=00:26:bb:3f:c9:7c" height="0" width="0" border="0" style="visibility:hidden;"> </body> </html>
ThomasLMS 8.4 on MacBookPro | 1x Raspberry Pi Zero 2 W + moOde 7 UPnP as USB-Player + TEAC UD-501 USB-DAC + Phonitor Mini Headphone Amplifier + AKG K812 Headphones | 5x Squeezbox Radio (Red, White, Black) | 1x Raspbery Pi4 + Allo Boss 2 + Arcam FMJ A22+P25 BiAmping + B&W Nautilus 805
Comment
-
Originally posted by mherger View Post> Am I doing it in the correct place?
Hard to tell without a reasonably sized screenshot... https://gyazo.com/
to the rescue :-)
--
Michael
Comment
-
Originally posted by Noel Hibbard View PostPut this line right after "SqueezeJS.Controller.init({player: playerid});":
Code:SqueezeJS.Controller.selectPlayer('00:00:00:00:01:02')
--
ThomasLMS 8.4 on MacBookPro | 1x Raspberry Pi Zero 2 W + moOde 7 UPnP as USB-Player + TEAC UD-501 USB-DAC + Phonitor Mini Headphone Amplifier + AKG K812 Headphones | 5x Squeezbox Radio (Red, White, Black) | 1x Raspbery Pi4 + Allo Boss 2 + Arcam FMJ A22+P25 BiAmping + B&W Nautilus 805
Comment
-
Michael,
I have finally got breakpoints to work in Firebug.
I set a breakpoint on the line
Code:this.el.update(myImage.src);
As suspected, the breakpoint in repeat does not occur when I press the repeat button, but if I press the shuffle button then both breakpoints are activated.
Any suggestions as to what is causing this?
Comment
-
Remote "NowPlaying" Display
> As suspected, the breakpoint in repeat does not occur when I press the
> repeat button, but if I press the shuffle button then both breakpoints
> are activated.
Oh, took me a while to understand... there are two events that might
change the behaviour: playlistchange and playerstatechange. Your code
only deals with player state changes. But you might want to implement
the onPlaylistChange handler, too. It can be identical (many of the
pre-defined components have an update method which is called from these
two).
--
Michael
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
Comment
-
Remote "NowPlaying" Display
Did you read my previous mail about onPlaylistChange?
Michael
> Am 02.08.2014 um 14:10 schrieb MillmoorRon <MillmoorRon.6i809z (AT) no-mx (DOT) forums.slimdevices.com>:
>
>
> Michael,
>
> If the playlist changes both repeat and shuffle icons update anyway.
>
> If I press the repeat button the onPlayerStateChange event just doesn't
> happen!
>
>
> ------------------------------------------------------------------------
> MillmoorRon's Profile: http://forums.slimdevices.com/member.php?userid=6413
> View this thread: http://forums.slimdevices.com/showthread.php?t=74270
>
>Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
Comment
-
Michael,
Yes, but maybe I didn't understand exactly what you meant!
I changed my code to:
Code:// Repeat Status Icon SqueezeJS.UI.RptStateIcon = Ext.extend(SqueezeJS.UI.Component, { onPlayerStateChange : function(status){ var myImage=document.getElementById('repeaticon'); if (status["playlist repeat"] == 1) myImage.src="icons/repeat.png"; else if (status["playlist repeat"] == 2) myImage.src="icons/repeat_all.png"; else myImage.src="icons/no_repeat.png"; this.el.update(myImage.src); }}); new SqueezeJS.UI.RptStateIcon({el: 'repeaticon', noLink: true}); SqueezeJS.UI.RptStateIcon = Ext.extend(SqueezeJS.UI.Component, { onPlaylistChange : function(status){ var myImage=document.getElementById('repeaticon'); if (status["playlist repeat"] == 1) myImage.src="icons/repeat.png"; else if (status["playlist repeat"] == 2) myImage.src="icons/repeat_all.png"; else myImage.src="icons/no_repeat.png"; this.el.update(myImage.src); }}); new SqueezeJS.UI.RptStateIcon({el: 'repeaticon', noLink: true});
When a new song starts both repeat and shuffle images update, but changing the status of 'repeat' during a song has no effect - unless 'shuffle' is changed.
Comment
-
Remote "NowPlaying" Display
> I changed my code to:
> // Repeat Status Icon
> SqueezeJS.UI.RptStateIcon = Ext.extend(SqueezeJS.UI.Component, {
....
>
> SqueezeJS.UI.RptStateIcon = Ext.extend(SqueezeJS.UI.Component, {
> onPlaylistChange : function(status){
You can't have two definitions for the same class. Only create one,
which then implements both methods.
--
Michael
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
Comment
-
Is this correct?
Code:// Repeat Status Icon SqueezeJS.UI.RptStateIcon = Ext.extend(SqueezeJS.UI.Component, { onPlayerStateChange : function(status){ var myImage=document.getElementById('repeaticon'); if (status["playlist repeat"] == 1) myImage.src="icons/repeat.png"; else if (status["playlist repeat"] == 2) myImage.src="icons/repeat_all.png"; else myImage.src="icons/no_repeat.png"; this.el.update(myImage.src); }, onPlaylistChange : function(status){ var myImage=document.getElementById('repeaticon'); if (status["playlist repeat"] == 1) myImage.src="icons/repeat.png"; else if (status["playlist repeat"] == 2) myImage.src="icons/repeat_all.png"; else myImage.src="icons/no_repeat.png"; this.el.update(myImage.src); } }); new SqueezeJS.UI.RptStateIcon({el: 'repeaticon', noLink: true});
Comment
Comment