?
Solved

Embedded Windows Media Player

Posted on 2003-11-29
4
Medium Priority
?
711 Views
Last Modified: 2010-04-06
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.
0
Comment
Question by:molard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
Timbo87 earned 500 total points
ID: 9844567
Here is a complete document:

<html>
<head>
<script language="JavaScript" type="text/javascript">
function video(url)
{
      a = window.open("#","win1","height=300,width=400")
      a.document.open()
      output = "<center><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</a>
<br>
<a href="#" onClick="video('http://www.microsoft.com/office/greatmoments/asx/screen_300.asx')">Great Moments: Screen</a>
</body>
</html>

You can add links like this:
<a href="#" onClick="video('path_to_your_file.asx')">Click here for my movie</a>
0
 

Author Comment

by:molard
ID: 9844649
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.
0
 
LVL 15

Expert Comment

by:Timbo87
ID: 9844660
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>
0
 

Author Comment

by:molard
ID: 9844668
Thats exactly what I wanted thanks!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question