Results 1 to 7 of 7

Thread: Play Links in Embeded Video Player

  1. #1
    Join Date
    Oct 2007
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Play Links in Embeded Video Player

    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.

  2. #2
    Join Date
    Oct 2007
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Any body know how to play a Link inside an embedded Windows Media Player?

  3. #3
    Join Date
    Dec 2007
    Location
    On the 3rd planet away from the Sun.
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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!
    HTML Code:
    <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!
    Last edited by didz93; 12-03-2007 at 08:56 PM. Reason: Needed to state purpose of posting.

  4. #4
    Join Date
    Oct 2007
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.
    Last edited by pssparkman; 12-04-2007 at 03:00 AM.

  5. #5
    Join Date
    Dec 2007
    Location
    On the 3rd planet away from the Sun.
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb

    Have you tried:
    <PARAM NAME="stretchToFit" VALUE="1> ?

    I dont really know if this will help

  6. #6
    Join Date
    Oct 2007
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  7. #7
    Join Date
    Dec 2007
    Location
    On the 3rd planet away from the Sun.
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No problem

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •