KaushaL.NET

Streaming Audio Files in ASP.NET

Posted by: Kaushal on: September 6, 2008

I was having a requirement to Stream Audio files in one of my on-going ASP.NET application; While I googled, I found that to Stream Audio files in a webpage, we need to use <object> tag.
The <object> element can support many different media types, like:

  • Pictures
  • Sounds
  • Videos
  • Other Objects

We just need to add the Windows Media Player reference using <object> tag with class ID. Windows Media Player comes in many different versions. The class IDs are different for different versions, with a list of parameters you can set (most of them are boolean and self explanatory).

For Windows Media Player 6.4; which I am using, classID should be clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95. The class ID for Windows Media Player 7 and later is: clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6. Many places on the internet it states that the class ID should be: clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95. This class ID is the old one, but it will work, because of backward compability. However, if you use the old class ID you will not be able to use the new features added to the component.

Below is Sample Code for adding <object> tag in your HTML design code which is having reference to Windows Media Player 6.4 with classID as clsid: 22D6F312-B0F6-11D0-94AB-0080C74C7E95.

Read More…

Leave a Reply

You must be logged in to post a comment.

Victims

  • 32,577 Hits

Calendar

September 2008
M T W T F S S
« Aug   Jan »
1234567
891011121314
15161718192021
22232425262728
2930  

Archives

KaushaL Parik (Microsoft MVP – ASP.NET)