March 6, 2000 - Embedding Media Player | WebReference

March 6, 2000 - Embedding Media Player

Yehuda Shiran March 6, 2000
Arrayed Buttons
Tips: March 2000

Yehuda Shiran, Ph.D.
Doc JavaScript

One method to play a streaming media is to embed the Windows Media Player in the Web page. The way to do it is by embedding an ActiveX control. Learn about ActiveX controls in Column 55, OLE Automation in JavaScript. Each object type supports a set of properties, methods, and events that is relevant to its role on the page. It is not a coincident that the HTML tag that embeds ActiveX controls is the <OBJECT> tag. Here is how the Media Player ActiveX control looks like:

<OBJECT 
  ID="mediaPlayer"  
  CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"  
  CODEBASE="https://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="fileName"   VALUE="https://msdn.microsoft.com/downloads/samples/Internet/imedia/netshow/smedia/NS3/JavaScript/Buttons/control.asx">
  <PARAM NAME="animationatStart" VALUE="true">
  <PARAM NAME="transparentatStart" VALUE="true">
  <PARAM NAME="autoStart" VALUE="true">
  <PARAM NAME="showControls" VALUE="true">
</OBJECT>

Learn more about the components of this tag in Column 51, A Streaming Media JukeBox.