Forum Moderators: phranque
Does anyone know how to embed this into the page and have each video file just play in that window when you click on it?
Fortune Hunter
Well there is a simple solution but it doesn't encompass everything you want. It is really simple to have a media player play a file embedded in the web broswer by using the <embed> tag.
Here are some examples.
<EMBED SRC="MyMovie.mov", WIDTH=150, HEIGHT=250 CONTROLS=TRUE>
<EMBED SRC="DoomGame.ids", WIDTH=400, HEIGHT=300 SPEED=SLOW LEVEL=12>
This will not however display the player in the page and then play movies as you click them, as is the described behavior you wanted. But if you are willing to change the user experience then you can set up a page that has links to all the vidoes you want to have. Then you link them to a page that has the embed tag, using query string pass in the name and location of the video file and pass that dynamically to the SRC="" portion of the embed tag.
P.S. this will not always use Windows Media Player, it will use the default player for the browser using the enbed tag. People viewing your sites in linux or mac may not be haappy you are trying to force WMP on them.
Thanks, I have it set up the way you describe right now, but the client I am doing this for wants to have more control over the user experience and wants the media player embedded so you can control size of player and that it uses the player defined etc.
Does anyone know how to do what I am trying to accomplish?
Fortune Hunter
Its for WMP6 and WMP7 dated 2000 but if you look around there you may find they have code for the 9 and 10 series as well though i'd expect this will work for all of them.
You may want to explain to your client that even though they use windows media that deosn't mean that the rest of the world does. Don't make a mistake and abandon MAC and LINUX users who browse to your site. They may not be able to view the video you want and worse yet you may freeze their system with it. I know how happy I get when that happens to me.
The code I gave you allows to add certain buttons like volume control or pause and play. You will have to look those up though. Just search the internet for the embed tag arguments. And the beauty of it is it will use the media player plugin of users chioce rather then being forced to use something their platform may not support.
Thanks for your thoughts, but this client is only using my work on an internal intranet site that will be used to get news updates through the company. Everyone is a PC user with Windows Media player already installed.
However I hear what you are saying if the site was going to be a public site. I would never force Windows Player on a live site.
Fortune Hunter
Yes for a Intranet then you are good to do that. I am still not sure about having the media player embedded server side. I am guessing you will need the software on the server machine itself.
I know that if you are using asp.net then it will be very easy to do as it has built in stuff for Microsoft plugins. I looked at the link provided above and that may work as well.
If you run into any issues post back and I will try to bust them with you.
TYPE="application/x-oleobject"
CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">