473,545 Members | 529 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Embedding Windows Media Player controls in Firefox

1 New Member
Hi,
I'm currently trying to build a website for a DJ friend of mine and I have come stuck with a couple of issues.
I've searched everywhere and put some code together but I still have problems.

I want to be able to map controls of the media player to images on the page
ie - when user clicks play image - song plays. I can currently get it working in IE but I can't get it to work in Firefox.

Problems:

1. The buttons (image buttons) will only work in IE only if
<PARAM name = "AutoStart" value="1">
if this is false then the buttons don't work.

In IE mp3 actually does not autoStart but in Firefox it does and I don't want that
Any ideas?

2 - when clicked the buttons work fine in IE
- in Firefox the buttons won't work.
Get the following error in Javascript debugger:
Player is not defined
var x = Player.playStat e;

Any ideas?

I tried document.getEle mentById but had no luck!

Javascript to play file
Expand|Select|Wrap|Line Numbers
  1. <SCRIPT> <!--
  2.  
  3.         function Play () {
  4.             var x = Player.playState;
  5.                 if (x == 2) { 
  6.                     Player.controls.play();                  
  7.                     } 
  8.                 else {                     
  9.                     Player.URL =  "tunes/Beethoven's Symphony No. 9 (Scherzo).wma";
  10.                     }         
  11.         }
  12.  
  13.        function Pause () {
  14.                  Player.controls.pause();           
  15.         } 
  16.  
  17.  
  18.        function VolumeUp () {
  19.              var x = Player.settings.volume; 
  20.              Player.settings.volume = x + 10;     
  21.         }        
  22.  
  23.         function VolumeDown () {                  
  24.             var x = Player.settings.volume;
  25.             Player.settings.volume = x - 10;
  26.         }
  27.  
  28. --> </SCRIPT>
  29.  

Code for player:
Expand|Select|Wrap|Line Numbers
  1. <OBJECT  ID="Player" width="0" height="0"  CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
  2. <PARAM name = "Volume"  value="50"> 
  3. <PARAM name = "AutoStart"  value="1">
  4. <PARAM name = "ShowDisplay" value = "false">
  5. <PARAM name ="ShowControls" value="false">
  6. <param name="DisplayMode" value="false">
  7.  
  8.  
  9. <embed type="application/x-mplayer2" pluginspage = "http://www.microsoft.com/windows/mediaplayer/"
  10. id ="Player" name="http://www.....com/Beethoven's Symphony No. 9 (Scherzo).wma"
  11. value="http://www.....com/Beethoven's Symphony No. 9 (Scherzo).wma"
  12. src="http://www.....com/Beethoven's Symphony No. 9 (Scherzo).wma"
  13. width="100"
  14. height="100"
  15. autostart ="false">
  16. </embed>
  17.  
  18. </OBJECT> 
  19.  
  20. <a href= javascript:Play() title ="Play">
  21.     <img src="play.png" border = "0" alt="Play" title ="Play"/></a>
  22.                     &nbsp;
  23. <a href= javascript:Pause() alt = "Pause"title ="Pause">
  24.     <img src="pause.png" border = "0" alt="Pause" title ="Pause"/></a>
  25.  
  26. <a href= javascript:VolumeDown() title ="Volume Down" alt="Volume Down" title ="Volume Down"/>-</a>
  27.         &nbsp;
  28. <a href= javascript:VolumeUp() alt = "Volume Up"title ="Volume Up" alt="Volume Up" title ="Volume Up"/>+</a>
  29.  
I've used <embed> tag to get the player to work in firefox.

Any help would be great!

Cheers
Oct 18 '07 #1
1 11603
acoder
16,027 Recognized Expert Moderator MVP
The following MozillaZine links may help:
Embedding Windows Media Player in Firefox
Windows Media Player
Nov 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

56
6872
by: alan b | last post by:
I copied it and tried to edit the movie.htm below in the <PARAM NAME=*** location of the file where the videoclip is on my hard drive. It is already recorded by Windows Media Player. My version is 9.0 although it is coded 5.0 in this htm file. Let me know if it is able to be fixed. *** denotes where it is edited to locate the path where...
5
4094
by: John | last post by:
I have a number of self-composed songs in mp3 format which are linked to their individual titles with <a href... The problem with this coding is that the songs open in a new window containing the media player transport control. I've tried embedding, but this is not suitable for multiple files. Ideally, I'd like visitors to have control over...
1
5522
by: sri2097 | last post by:
Basically, I want to check if a URL is playable or not (without actually playing it). i.e. given a URL I want to write an automation script to figure it out for me if it's playable or not. If you give a bad/invalid URL for windows media player to play a pop-up window shows us that it cannot be played. So I would want to catch that event.
5
21464
by: JulioHM | last post by:
Hi all, I'm trying to use WMP in FireFox and I have the following tag to embed the player into the html page. <EMBED TYPE="application/x-mplayer2" PLUGINSPAGE="http://microsoft.com/windows/mediaplayer/en/download/" ID="wmp" Name="wmp"
19
19233
by: Tony | last post by:
I'm working on project that plays movies using Windows Media Player and I'm controlling everything with JavaScript. Per the client I only need to support IE 6 or greater which happens to make things a bit easier. What I need to do is create a playlist and play it using JavaScript. I keep on getting close but not close enough to play the dang...
3
2898
by: alice | last post by:
I've been trying for a long time to figure this out, to have a page with several MP3 clips, and each one having a custom start and stop button next to them to play the track. I finally found a bit of code that does this, but it's made for only one mp3 file. I don't know enough about javascript to customize the code myself. I know there...
3
13650
by: Ollie Riches | last post by:
How do I embed a *.flv file (Flash Video) into an aspx page similar to embedding windows media player active x control? Cheers Ollie Riches
1
2124
by: xhunter | last post by:
I am streaming some files on my site (progressive http streaming), I use php to authenticate logged in users with sessions and cookies, and then send the stream to be opened. All my Quicktime and Real players files are working absolutely fine in all browsers, but the problem is, when it comes to Windows Media Player and Firefox, it doesn't...
5
3398
by: Anil Gupte | last post by:
How do I embed Windows Media Player so I can control it with VB code. I am familiar with embedding in a web page like this: *************** <embed src="Test.asx" width=320 height=300 autostart=True type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="MediaPlayer1" showcontrols=1...
0
7465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7805
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7416
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
4944
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.