We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3779
    • 5 Posts
    I installed this using the snippet. Does anyone know how to implement controls on the player--

    ex. <a href="javascript:window.document.flashObjec.playTrack();">Click to Play </a>

      • 18913
      • 654 Posts
      In my case, the snippet lives here
      [tt]assets/snippets/xspf [/tt]
      which itself has a subfolder called
      [tt]skins[/tt]
      So my call to the snippet looks like this
      [!XSPFjukebox? skin=`testskin`  &use_images=`1` &playlist_url=`assets/songs/testplaylist.xspf` &repeat_playlist=`0` &autoplay=`1` &shuffle=`0` !]

      where it is looking for testskin.xml in
      [tt]assets/snippets/xspf/skins/testskin[/tt]

      That xml file controls the layouts of the buttons/actions. In my case, the images for the buttons are in a the folder
      [tt]assets/snippets/xspf/skins/testskin/images[/tt]
      As you can infer, the songs and the playlist are in assets/songs.

      So to directly answer your question : look in the xml file.

      Hope this helps,
      Matt
        • 3779
        • 5 Posts
        Thanks! Is that where I should look to figure out how to have a link tell the player to play a certain track?

        My call is [!XSPFjukebox?skin=`Slim`!] -- which I’m happy with- Does what it needs to, but I’m looking to have a link outside of the player, tell the player to play a certain track-- does that make sense?

        So later in the page there would be a button after a song title-- Play Music-- and the player at the top of the page would play that track.

        -- I think it might have something to do with ID’s and javacript? not sure.


        Bryan
          • 18913
          • 654 Posts
          Take a look at the parameter list for XSPFJukebox - you’ll see that you can specify a single track.

          That said, where I needed to have a button that toggled play/stop for a single track, I used the mplayer snippet
          http://modxcms.com/extras/package/302

          XSPFjukebox I thought was just that - a jukebox. So if there is a "button" mode for it, I never explored it. Might have been good to know if that’s the case smiley

          Matt
            • 3779
            • 5 Posts
            Yeah, on Lacey’s website -- he has an example of using external links to control the jukebox. I believe it’s done via javascript. I just don’t know how to do it yet. I’ll post something up if I figure it out.