Google Answers Logo
View Question
Q: Windows Media Player, onclick javascript and multiple files for one embeded play ( No Answer,   0 Comments )
Subject: Windows Media Player, onclick javascript and multiple files for one embeded play
Category: Computers > Graphics
Asked by: emcp-ga
List Price: $7.50
Posted: 11 Aug 2005 15:56 PDT
Expires: 11 Aug 2005 22:04 PDT
Question ID: 554656
I have been working on embeding windows media player into a page of my
website. I have embeded the player and would like to give visitors the
option of selecting which video they want to view by clicking any
number of images on the page. So, I would like each image to initiate
an individual video in the player. It doesnt make sense for me to have
more than one bulky player embeded on one page. I havent worked with
Javascript so I know it is really poorly written.

Isolated this is an example of the code I am using that distinguishes
one of the images I would like visitors to click.

                  <P>  <a
onclick="parent.player.PlayIt(this.href);return false"><IMG height=160
                  width=160></a>  </P>  

And, the player I would like the video to play in

<script type="text/javascript">  
function PlayIt(what){
document.getElementById("music1").innerHTML='<object id="mediaPlayer"
width="450" height="400" '
      +'classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" '
      +'standby="Loading Microsoft Windows Media Player components..."
      +'<param name="fileName" value="'+what+'">'
      +'<param name="autoStart" value="true">'
      +'<param name="showControls" value="true">'
      +'<param name="loop" value="true">'
      +'<embed type="application/x-mplayer2" '
      +'pluginspage="" '
      +'showcontrols="true" width="450" height="400" '
      +'src="'+what+'" autostart="true" loop="true">'
<span id="music1">
<object id="mediaPlayer" width="450" height="400" 
      standby="Loading Microsoft Windows Media Player components..."
      <param name="fileName" value="">
      <param name="autoStart" value="false">
      <param name="showControls" value="true">
      <param name="loop" value="true">
      <embed type="application/x-mplayer2" 
      showcontrols="true" width="450" height="400" 
      src="" autostart="false" loop="true">

This code is coming from, 

Thanks Much, met me know if more clarification is needed.

Request for Question Clarification by sublime1-ga on 11 Aug 2005 16:39 PDT

I don't know if I can speak for all your viewers, but right
now, the videos load in an independent media player window,
which I, personally, much prefer to embedded players.

The issue I'd be more concerned about is that the download
speed for your videos is averaging only about 125KB/sec, 
which makes for a long wait for these large files.


Clarification of Question by emcp-ga on 11 Aug 2005 20:50 PDT

thanks for your interest. I hadn't really thought of just leaving as
is there with the browswer handling it. That might be the best way to
do it, certainly gives the vistor more control over the content and
makes my life easier. Yeah, the transfer speed is pretty slow. They
are on a free server right now. I am waiting until the site is "done"
to subscribe to a webhosting service that will hopefully provide
better service. Would you recommend a cost effective hosting service
with quick transfer speeds?

Clarification of Question by emcp-ga on 11 Aug 2005 20:52 PDT
when i do a new wmv encodings of the current divx files I will slim them down too.

Request for Question Clarification by sublime1-ga on 11 Aug 2005 21:44 PDT

Yeah, the files are pretty large, and probably at a higher
resolution then they need to be. The floating Windows Media
Player opened to almost full-screen size, which is really
bigger than the clarity of the videos can handle.

I forgot to mention, too, that as far as embedding goes,
I don't think I've ever seen an embedded player set up to
play more than one video. When there's more than one 
video, there's usually a separate page that opens up for
each one, with the player embedded in that page.

As for hosting, I can't recommend any site from experience,
but here's a good place to narrow down what you want:


Request for Question Clarification by sublime1-ga on 11 Aug 2005 21:49 PDT
This site might be even better:

Clarification of Question by emcp-ga on 11 Aug 2005 22:04 PDT
Thanks, very appreciated.
There is no answer at this time.

There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  

Google Home - Answers FAQ - Terms of Service - Privacy Policy