Windows Media : Seeking to Markers

Description Goal: To seek to markers within an ASF file in both Microsoft Internet Explorer and Netscape Navigator. The Active Streaming File (ASF) format has marker functionality built-in. Markers are points inside a piece of content that users can skip to, similar to a bookmark. By adding markers (using the ASFIndexer program, which is part of the Windows Media tool package), content authors can direct users to places within any given piece of content. Markers are like tracks on an audio CD. A CD player will play all of the tracks in order, but you can skip around to other tracks. The same is true of markers. Code to Include: We'll start with our generic cross-browser code embedding code. This code will instantiate the Media Player ActiveX control for browsers which support ActiveX, and the Media Player plug-in for browsers that don't: Next, we'll define a form and some buttons:

In the code above, all of the buttons make calls through JavaScript directly to the Media Player using the Document Object Model(DOM). They call the following function: This sample deals with setting the CurrentMarker property and getting the read-only MarkerCount properties. The CurrentMarker property's value is set to a Marker number and the player automatically goes there. The MarkerCount property is used to make sure that the code doesn't create an error in the page. Browser/Platform Compatibility This code will work with Internet Explorer 4+, and Netscape Navigator 4+ on platforms that support the Windows Media Player plug-in and ActiveX control.

Complete Article

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.