Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Embedded Windows Media Player

Posted on 2003-11-29
4
Medium Priority
?
715 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
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…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

604 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