molard
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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","he ight=315,w idth=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_yo ur_file.as x','My Title')">Click here for my movie</a>
<html>
<head>
<script language="JavaScript" type="text/javascript">
function video(url,title)
{
a = window.open("#","win1","he
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_yo
ASKER
Thats exactly what I wanted thanks!
ASKER