How to Embed a Streaming Windows Media Player

104 13
    • 1). Open your web page in Notepad or an HTML editor.

    • 2). Identify a location in the body section of the page where you want the Windows Media Player to appear. For example, you may want users to see it on the top of the page under the heading or in the middle of the page next to a photo.

    • 3). Add the following block of code to that location in the code:

      <OBJECT CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"

      STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">

      <PARAM name="ShowControls" value="true">

      <PARAM name="FileName" value="xyz.mp3">

      <PARAM name="autostart" value="true">

      <EMBED TYPE="application/x-mplayer2" src="xyz.mp3" NAME="MediaPlayer"

      WIDTH="200" ShowControls="1" autostart="1">

      </EMBED>

      </OBJECT>

      This code consists of an object block and an embed block. Change xyz.mp3 to the name of your media file in both blocks. Change the values for width and height to alter the dimensions of the player. Set Show Controls to "false" in the first block and "0" in the second block if you do not want the user to see the Media Player's controls. Set autostart to "false" in the first block and "0" in the second block if you do not want the audio or video to begin playing as soon as the page loads.

    • 4). Save the HTML file and open it in your browser. Test the Windows Media Player.

Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.