View Full Version : Play Links in Embeded Video Player
pssparkman
12-03-2007, 09:36 AM
I know that this has probably been asked before, but I did a search and couldn't find just what I needed. If you can help or provide a good post that covers this than thanks. But..
I have a selection menu of audio and video and I would like it when the user selects the link of something that it would play inside an embeded media player on my website. I know how to get the media player in my website, but don't know how to get it where when a user selects a link from the menu list that it goes and plays in the media player. Any suggestions/help.
Thanks.
pssparkman
12-03-2007, 07:52 PM
Any body know how to play a Link inside an embedded Windows Media Player?
didz93
12-03-2007, 08:27 PM
It's pretty easy to do that.
Firstly make sure your media player has an ID attribute (I use mplayer in my example). Then on each link specify this attribute: onClick="document.all.mplayer.filename=document.all.this.href;"
Here's one I made earlier!
<a href="bbgirl.mp3" onClick="document.all.mplayer.filename=document.all.this.href;">Aqua - Barbie Girl</a><BR>
<a href="notme.mp3" onClick="document.all.mplayer.filename=document.all.this.href;">Shaggy - Wasn't Me!</a><BR>
<a href="http://url or path to your media" onClick="document.all.mplayer.filename=document.all.this.href;">Artist - Song Title</a><BR>
<OBJECT id="mplayer" height="230" width="230" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<PARAM NAME="AutoStart" VALUE="0">
<PARAM NAME="Filename" VALUE="">
<PARAM NAME="Enabled" VALUE="1">
<PARAM NAME="PlayCount" VALUE="1">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="1">
<PARAM NAME="ShowStatusBar" VALUE="1">
</OBJECT>
I only registered on this forum to answer this question!
pssparkman
12-03-2007, 11:20 PM
Thanks, I got it working.
The newest issues I have is that I have only a certain amount of space to show these videos and need to scale down the viewing size. I have the player set to the size that I will allow, the question I have though is:
How do I get the videos to automatically fit the predefined player size?
Update
Well I got it to play in a fix video size. For some reason I can't get some video sizes to play, specifically avi files. Is there anything that can be done to assure that these avi files will play.
didz93
12-04-2007, 07:02 PM
Have you tried:
<PARAM NAME="stretchToFit" VALUE="1> ?
I dont really know if this will help :confused:
pssparkman
12-04-2007, 08:03 PM
I did something like that, and at first it didn't work then a bit later I went back and it started to make all the videos play inside the player and not expand any further outside of it. Thanks.
didz93
12-04-2007, 08:58 PM
No problem :D
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.