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 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Windows Media Player with drop dwn menu

    First of all I know there was another similar thread here about this issue but I got lost it was so long. I am interested in imbedding a windows media player in my webpage that will work in all browsers and will be able to have a drop down menu in which my music files will be selectable for playing. This is a sample of the player code I tried but it only works in Internet Explorer and not Mozilla. This code has only one song listed for an example but it will take many more. It only works in IE and not Firefox apparently.


    <HTML>
    <HEAD>
    <TITLE></TITLE>

    </HEAD>

    <BODY>

    <div align=center>
    <SELECT id=cancion onchange=document.all.music.filename=document.all.cancion.value; size=1 name=Music>
    <OPTION selected>::::::::::::: Choose Your Song Here :::::::::::::</OPTION>
    <OPTION value=http://www.geocities.com/bryan1966us4/airsupplyallbymyself.wav>air supply - All by myself</OPTION>
    <OPTION value=http://url or path to your media>Artist - Song Title</OPTION>
    <OPTION value=http://url or path to your media>Artist - Song Title</OPTION>
    </SELECT><BR>
    <OBJECT id=music height=230 width=230 classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95>
    <PARAM NAME="AutoStart" VALUE="0">
    <PARAM NAME="Balance" VALUE="0">
    <PARAM NAME="DisplaySize" VALUE="0">
    <PARAM NAME="Filename" VALUE="">
    <PARAM NAME="Mute" VALUE="0">
    <PARAM NAME="SelectionStart" VALUE="-1">
    <PARAM NAME="SelectionEnd" VALUE="-1">
    <PARAM NAME="ShowControls" VALUE="-1">
    <PARAM NAME="ShowAudioControls" VALUE="-1">
    <PARAM NAME="ShowDisplay" VALUE="0">
    <PARAM NAME="ShowPositionControls" VALUE="-1">
    <PARAM NAME="Volume" VALUE="0">
    <PARAM NAME="AudioStream" VALUE="-1">
    <PARAM NAME="AutoSize" VALUE="0">
    <PARAM NAME="AnimationAtStart" VALUE="-1">
    <PARAM NAME="AllowScan" VALUE="-1">
    <PARAM NAME="AllowChangeDisplaySize" VALUE="-1">
    <PARAM NAME="AutoRewind" VALUE="1">
    <PARAM NAME="BaseURL" VALUE="">
    <PARAM NAME="BufferingTime" VALUE="5">
    <PARAM NAME="CaptioningID" VALUE="">
    <PARAM NAME="ClickToPlay" VALUE="-1">
    <PARAM NAME="CursorType" VALUE="0">
    <PARAM NAME="CurrentPosition" VALUE="-1">
    <PARAM NAME="CurrentMarker" VALUE="0">
    <PARAM NAME="DefaultFrame" VALUE="">
    <PARAM NAME="DisplayBackColor" VALUE="0">
    <PARAM NAME="DisplayForeColor" VALUE="16777215">
    <PARAM NAME="DisplayMode" VALUE="0">
    <PARAM NAME="Enabled" VALUE="-1">
    <PARAM NAME="EnableContextMenu" VALUE="-1">
    <PARAM NAME="EnablePositionControls" VALUE="-1">
    <PARAM NAME="EnableFullScreenControls" VALUE="0">
    <PARAM NAME="EnableTracker" VALUE="-1">
    <PARAM NAME="InvokeURLs" VALUE="-1">
    <PARAM NAME="Language" VALUE="-1">
    <PARAM NAME="PlayCount" VALUE="1">
    <PARAM NAME="PreviewMode" VALUE="0">
    <PARAM NAME="Rate" VALUE="1">
    <PARAM NAME="SAMILang" VALUE="">
    <PARAM NAME="SAMIStyle" VALUE="">
    <PARAM NAME="SAMIFileName" VALUE="">
    <PARAM NAME="SendOpenStateChangeEvents" VALUE="-1">
    <PARAM NAME="SendWarningEvents" VALUE="-1">
    <PARAM NAME="SendErrorEvents" VALUE="-1">
    <PARAM NAME="SendKeyboardEvents" VALUE="0">
    <PARAM NAME="SendMouseClickEvents" VALUE="0">
    <PARAM NAME="SendMouseMoveEvents" VALUE="0">
    <PARAM NAME="SendPlayStateChangeEvents" VALUE="-1">
    <PARAM NAME="ShowCaptioning" VALUE="0">
    <PARAM NAME="ShowGotoBar" VALUE=0">
    <PARAM NAME="ShowStatusBar" VALUE="0">
    <PARAM NAME="ShowTracker" VALUE="-1">
    <PARAM NAME="TransparentAtStart" VALUE="-1">
    <PARAM NAME="VideoBorderWidth" VALUE="0">
    <PARAM NAME="VideoBorderColor" VALUE="0">
    <PARAM NAME="VideoBorder3D" VALUE="0">
    <PARAM NAME="WindowlessVideo" VALUE="0">
    </OBJECT>
    </div>



    </BODY>
    </HTML>



    I am new to coding but there must be a code that will do what I desire. any help here for a noob coder?...I would be extremely grateful if you can help.

  • #2
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi - Hytek

    I have the same desire to play music files on my web-site with multi-browser capability. Please let me know if you have a solution. I have seen several 'solutions' suggested which include the 'embed' element try -

    (<!-- Multi WM Player at www.rainbow.arch.scriptmania.com/scripts/music/ -->
    Although it works well on Explorer I cant get it to work on Mozilla or netscape

    Cheers K

  • #3
    New Coder
    Join Date
    Mar 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by kevpennington View Post
    hi - Hytek

    I have the same desire to play music files on my web-site with multi-browser capability. Please let me know if you have a solution. I have seen several 'solutions' suggested which include the 'embed' element try -

    (<!-- Multi WM Player at www.rainbow.arch.scriptmania.com/scripts/music/ -->
    Although it works well on Explorer I cant get it to work on Mozilla or netscape

    Cheers K
    Try This it worked for me:::

    <!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">
    <script type="text/javascript"><!--
    function song(){
    document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+document.getElementById('cancion').value+"' name='MediaPlayer1' width='300' height='75' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
    }
    //-->
    </script>
    </head>
    <div id="jukebox">JUKEBOX<br><br>
    <select id="cancion" onchange="song()" size="1">
    <option value="none">::::::::::::: Choose Your Song Here :::::::::::::</option>
    <option value="http://urltosong1.mp3">Song 1</option>
    <option value="http://urltosong2.mp3">Song 2</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>
    <option value="http://urltosong6.mp3">Song 6</option>
    <option value="http://urltosong7.mp3">Song 7</option>
    <option value="http://urltosong8.mp3">Song 8</option>
    <option value="http://urltosong9.mp3">Song 9</option>
    <option value="http://urltosong10.mp3">Song 10</option>
    </select><br>
    <span id="music1"><embed type="application/x-mplayer2" id="music1"
    pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
    src=""
    name="MediaPlayer1"
    width="300"
    height="70"
    controltype="2"
    showcontrols="1"
    showstatusbar="1"
    AutoStart="0">
    </embed></span>
    </div>
    </body>
    </html>


  •  

    Posting Permissions

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