Link to home
Start Free TrialLog in
Avatar of molard
molardFlag for United States of America

asked on

Embedded Windows Media Player

Hello. I have set up Windows 2003 Server with Windows Media Services enabled. I recently set it up so I could stream video from my computer also. What I would like to do is create a webpage with links to those videos but when you click a link it will open a small window with an embedded windows media player in it that will play the video. If you click another link it will open up that same window and play that different video. Similar to launch.yahoo.com but something very simple would work. I would like for this to be a simple html page or asp page because I run IIS on this server as well. Does anybody know how I could do this? Sorry I couldnt put more points up but I used just about all I had. Thank you for your time.
ASKER CERTIFIED SOLUTION
Avatar of Timbo87
Timbo87

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of molard

ASKER

You are awesome thanks! I will award you the points. One other question though. Is there a way that when I click on that link it will put the title of that video at the top of that window that pops up with the media player. Like for example I click Great Moments: Water. The window with the media player pops up. Can I set it up so that Great Moments: Water will display right above the player? And If i click Great Moments: Screen that title will also? Thank you again.
Avatar of Timbo87
Timbo87

Yes you can, but you can't really extract it from the link. It would require an extra parameter in the video() function like this.

<html>
<head>
<script language="JavaScript" type="text/javascript">
function video(url,title)
{
      a = window.open("#","win1","height=315,width=400")
      a.document.open()
      output = "<title>" + title + "</title><center>"
      output += title + "<br>"
      output += "<embed src = \"" + url + "\""
      output += " autostart=true"
      output += "></center>"
      a.document.write(output)
      a.document.close()
}
</script>
</head>
<body>
<a href="#" onClick="video('http://www.microsoft.com/office/greatmoments/asx/water_300.asx','Great Moments: Water')">Great Moments: Water</a>
<br>
<a href="#" onClick="video('http://www.microsoft.com/office/greatmoments/asx/screen_300.asx','Great Moments: Screen')">Great Moments: Screen</a>
</body>
</html>

So you would now link it like this:
<a href="#" onClick="video('path_to_your_file.asx','My Title')">Click here for my movie</a>
Avatar of molard

ASKER

Thats exactly what I wanted thanks!