Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2010
    Posts
    21
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Jukebox - How to replay list & How to create non dropdown list

    09-01-10

    Not sure exactly where to post this thread as it involves HTML, Javascript and embedded media players. It probably would be more appropriate here as there is much Javascript involved....

    Hello,

    I am trying to construct a Jukebox for my website. I have spent considerable time all over the WEB and at this forum which addressed the issue in a 50 page thread. Please see:

    Embedded Windows Media Player

    I got a lot of ideas from this thread but still cannot figure a way to do the following within the Jukebox. These are my main two questions for everything below:

    1. How can I have the Jukebox cycle through all tunes and then start over from the beginning?

    2. How can I allow the user to select a tune from a list but not a drop down list, have the Jukebox start from the user’s selection and then play all songs to the end. Then as in #1, start over from the beginning?


    Per this thread I came away with basically two ways to assemble the jukebox. One uses links in a drop down list which the user can choose from. The other is to use an .m3u playlist. The user can only select a “playlist” from the drop down.

    Below, I have included the code for each Jukebox. To see the Jukeboxes in action please go to my website where I have posted some test pages exhibiting the jukeboxes that I am referring to.

    The following is the Jukebox which utilizes an .m3u playlist. If I end up using this idea I would like the tunes in the .m3u playlist to be displayed and allow the user to be able to choose a tune in the list. Then have the list play to the end of all tunes in the list. Then start over from the beginning of the list. After this code is the .m3u playlist.

    Go to url removed and click on the link that says:
    “Media Player Using an .M3U Playlist”

    Jukebox utilizing an .m3u playlist:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <style type="text/css">
    body {
    text-align:center;
    }
    </style>
    <script type="text/javascript">
    function PlayIt(what){
    player.document.getElementById('music').innerHTML='<object width="300" height="300" '
          +'classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" '
          +'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" '
          +'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">'
          +'<param name="url" value="'+what+'">'
          +'<param name="uiMode" value="full">'
          +'<param name="autoStart" value="true">'
          +'<param name="loop" value="true">'
          +'<embed type="application/x-mplayer2" '
          +'pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" '
          +'showcontrols="true" uimode="full" width="300" height="45" '
          +'src="'+what+'" autostart="true" loop="true">'
    +'</object>';
    }
    </script>
    </head>
    
    <body>
    <div id="music">
    <object width="300" height="300"
          classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
          codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
          standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
          <param name="url" value="">
          <param name="uiMode" value="full">
          <param name="autoStart" value="true">
          <param name="loop" value="true">
          <embed type="application/x-mplayer2"
          pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"
          showcontrols="true" uimode="full" width="300" height="45"
          src="" autostart="true" loop="true">
    </object>
    </div>
    <br>
    <br>
    <select name="player" onchange="PlayIt(this.value)">
    <option value="none">::Choose a Song::</option>
    <option value="JukeboxList.m3u">Jukebox List</option>
    </select><br>
    </html>

    Here is the .m3u playlist for the above code:


    Code:
    #EXTM3U
    #EXTINF:Bill Evans - G Waltz
    media/G Waltz.mp3
    #EXTINF:Dan Pincus - In Your Time
    media/In Your Time.mp3


    The following code is for the Jukebox that has a list of links in a dropdown list. If I go with this idea, I would like for the list not to be a dropdown list but just a list of tunes. The user should be able to click on any tune in the list and the player should start from that point, play all the remaining tunes in the list and then start from the beginning.

    Go to url removed and click on the link that says:
    “Media Player Using Links”



    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <style type="text/css">
    body {
    text-align:center;
    }
    </style>
    <script type="text/javascript">
    function PlayIt(what){
    player.document.getElementById('music').innerHTML='<object width="300" height="300" '
          +'classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" '
          +'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" '
          +'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">'
          +'<param name="url" value="'+what+'">'
          +'<param name="uiMode" value="full">'
          +'<param name="autoStart" value="true">'
          +'<param name="loop" value="true">'
          +'<embed type="application/x-mplayer2" '
          +'pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" '
          +'showcontrols="true" uimode="full" width="300" height="45" '
          +'src="'+what+'" autostart="true" loop="true">'
    +'</object>';
    }
    </script>
    </head>
    
    <body>
    <select name="player" onchange="PlayIt(this.value)">
    <option value="none">::Choose a Song::</option>
    <option value="media/GWaltz.mp3">G Waltz</option>
    <option value="media/InYourTime.mp3">In Your Time</option>
    <option value="http://urltosong3.mp3">Song 3</option>
    <option value="http://urltosong4.mp3">Song 4</option>
    <option value="http://urltosong5.mp3">Song 5</option>
    </select><br>
    <div id="music">
    <object width="300" height="300"
          classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
          codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
          standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
          <param name="url" value="">
          <param name="uiMode" value="full">
          <param name="autoStart" value="true">
          <param name="loop" value="true">
          <embed type="application/x-mplayer2"
          pluginspage="http://microsoft.com/windows/mediaplayer/en/download/"
          showcontrols="true" uimode="full" width="300" height="45"
          src="" autostart="true" loop="true">
    </object>
    </div>
    </html>


    Another idea I found on the WEB also uses an .m3u playlist. The good thing about it is that it lists all the tunes in the playlist which the user can then select from. This jukebox calls up an entire Windows Media Player. If I was to use this idea I would like to be able to disable the left side of the player where the user has options such as burning to CD, Media Guide, Radio Tuner etc…

    Go to url removed and click on the link that says:
    “Media Player Within an IFrame Using .m3u Playlist””


    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>JukeBox</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Expires" content="-1">
    </head>
    
    <body>
    
    <IFRAME name="frame" src="JukeboxList.m3u"
    width="100%"
    height="347"
    scrolling="no"
    frameborder="0">
    [Your user agent does not support frames or is currently configured not to display frames.]
    </IFRAME>
    
    </body>
    </html>

    Thanks!
    Dan
    Last edited by WA; 12-07-2010 at 09:03 AM.

  • #2
    New Coder
    Join Date
    May 2010
    Posts
    21
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Does anyone know how I can delete a thread that I started? It's an old thread.
    Last edited by dan2004; 12-03-2010 at 10:37 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •