Announcement

Collapse
No announcement yet.

Remote "NowPlaying" Display

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #76
    Still nothing!

    Am I doing it in the correct place?

    Click image for larger version

Name:	NowPlaying1.jpg
Views:	1
Size:	17.7 KB
ID:	1556893

    Sorry, can't get my screen shot to attach at full size!

    Comment


      #77
      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


        #78
        Is this better?

        Comment


          #79
          Originally posted by RussellMrgn View Post
          You 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."
          Hi,

          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>
          --
          Thomas
          Last edited by tfec; 2014-05-10, 16:51. Reason: Quick & Dirty Solution
          LMS 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


            #80
            Originally posted by tfec View Post
            Is it possible to hardcode the player which is presented?
            Put this line right after "SqueezeJS.Controller.init({player: playerid});":
            Code:
            SqueezeJS.Controller.selectPlayer('00:00:00:00:01:02')

            Comment


              #81
              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
              I must be doing something wrong - can't get any breakpoint to occur!

              Comment


                #82
                Originally posted by Noel Hibbard View Post
                Put this line right after "SqueezeJS.Controller.init({player: playerid});":
                Code:
                SqueezeJS.Controller.selectPlayer('00:00:00:00:01:02')
                Fine. Thank you. Thats it.

                --
                Thomas
                LMS 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


                  #83
                  Michael,

                  I have finally got breakpoints to work in Firebug.

                  I set a breakpoint on the line
                  Code:
                  this.el.update(myImage.src);
                  in both repeat and shuffle.

                  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


                    #84
                    Remote &quot;NowPlaying&quot; 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


                      #85
                      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!

                      Comment


                        #86
                        Remote &quot;NowPlaying&quot; 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


                          #87
                          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});
                          Is this what you intended?

                          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


                            #88
                            Remote &quot;NowPlaying&quot; 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


                              #89
                              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


                                #90
                                Remote &quot;NowPlaying&quot; Display

                                > Is this correct?

                                If it works, then yes :-).

                                --
                                --

                                Michael
                                Michael

                                "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
                                (LMS: Settings/Information)

                                Comment

                                Working...
                                X