473,386 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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
2 4910
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Anise | last post by:
I have a question concerning embedding a windows media player into a web application in .net.. I download Windows Media Player 10 and its SDK On the .ascx page I placed a windows media player...
1
by: Stephen Adam | last post by:
Hi there, Have spent a while trying to find out how to connect to Windows Media Player through COM. Unfortunately there doesnt seem to be much stuff about it on the web. What I need to do is...
19
by: Tony | last post by:
I'm working on project that plays movies using Windows Media Player and I'm controlling everything with JavaScript. Per the client I only need to support IE 6 or greater which happens to make...
1
by: Mark C | last post by:
How do you close windows media player in a web page after its played. I have added a windows media player to my web page as: <object id="Player"...
0
by: dongarbage | last post by:
Hi there, I've created a user control to put in a web page. I'd like to add a windows media player control to the user control that I've created. But, for some reason, the user control does not...
3
by: Muhammad Ammad Saleem | last post by:
Hi, I just want to know how to control the Windows Media Player Control using JScript in an ASP .NET page? I have tried going through the Windows Media Player SDK but there is no proper help...
0
by: PRIYU4U31 | last post by:
hi sir, i want to embed windows media player & photoshop in my project which is in c# & asp .Net. I dont know how to add it.plz reply early..
2
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.