Forum Moderators: open

Message Too Old, No Replies

Use JS to open .mpg file in WMP

         

shermania

3:51 am on Oct 26, 2004 (gmt 0)

10+ Year Member



I don't know if it's possible.

I want to open an .mpg file with a JS as follows:
<a href="javascript:;" onCLick="MM_openBrWindow('file_location','','width=262,height=220')">

Of coz a new browser opens and Quicktime is required.

The problem is:
What if I want to open in a Window Media Player instead of a Quicktime? How should I change the script (supposed that I am not able to change the file format into avi./mov.)?

Thanks a million~

BlobFisk

11:00 am on Oct 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, shermania!

One thing that you cannot do using a browser is override the users settings and/or preferences. If the user wants to use QT to view mpg's - let them!

Even if you use and embedded Media Player, if the user doesn't have it installed, they won't be able to see the movie. My advice is to allow the user to use whatever player they want to view the movie.

You could use an ActiveX to try and force the use of Media Player. MSDN has some good tutorials on this.

HTH

shermania

6:45 am on Oct 28, 2004 (gmt 0)

10+ Year Member



Got your point, BlobFisk.

U just gave that answer I want.

Again, thx a million!