Embed Windows Media Player into a web page...?

B

benmourra

Hi all,

I'm trying to create a web page using VS2005, ASP.NET 2.0, that will
allow me to choose from a list of media files on my computer and then
play my selection within an embedded Windows Media Player on the page.

I've been able to eventually find out how to embed the player into the
page by manually inserting code into the source view of my aspx file.
It plays the file specified in the source view, but I'd like to be able
to dynamically select a media file from a drop down list and then have
it play, at runtime. Any ASP.NET 2.0 Media Player gurus out there?

Any ideas/comments/suggestions would be greatly appreciated! (I'd like
to get some sleep eventually...)

Thanks in advance,
Ben


PS. For those who are interested, I got it working by inserting this
code into the source of my aspx file:
<OBJECT ID="MediaPlayer" WIDTH="320" HEIGHT="240"
CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading
Windows
Media Player components..." TYPE="application/x-oleobject" VIEWASTEXT>
<PARAM NAME="FileName" VALUE="file:///C:/MovieClip.avi">
<PARAM name="autostart" VALUE="false">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="true">
<PARAM name="ShowDisplay" VALUE="false">
<EMBED TYPE="application/x-mplayer2" NAME="MediaPlayer">
</EMBED>
</OBJECT>
 
I

inlay

Use COM... wmp.dll and then dynamically create a player object to play
files. It works for me, but only problem I am having is that I can't
get it to stop :(... it goes on playing until the file comes to an end,
even if I close the browser!
 
B

benmourra

Yeah, that's happening for me too! I'd like the user to be able to use
the builtin buttons, but all the samples i could find involve hiding
the WMP buttons and creating your own Start, Pause and Stop buttons..
Even in the SDK for Windows Media Player.. Or maybe I'm not looking in
the right places?

When you say dynamically what do you mean exactly? Are you using
client-side scripting to dynamically change the file being played or
are you doing it via Postback?

Thanks for posting a reply, inlay..

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top