By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,564 Members | 834 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,564 IT Pros & Developers. It's quick & easy.

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

P: n/a
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>

Mar 6 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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!

Mar 6 '06 #2

P: n/a
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

Mar 7 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.