![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm using Windows Media Audio, via a WAX file, and I have some custom controls to start and stop the audio. While it works in IE, FF gives an error. The HTML looks like this: object id='obj' type='audio/x-ms-wax' style='position:absolute; left:0px; top:0px;' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codeBase='http://activex... blah width='100' height='100' param name='FileName' value='wma_sample.wax' param name='AutoStart' value='0' embed id='objff' type='audio/x-ms-wax' src='wma_sample.wax' autostart='0' width='100' height='100'></embed /object |
#3
| |||
| |||
|
|
Andrew Poulos wrote: I'm using Windows Media Audio, via a WAX file, and I have some custom controls to start and stop the audio. While it works in IE, FF gives an error. The HTML looks like this: object id='obj' type='audio/x-ms-wax' style='position:absolute; left:0px; top:0px;' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codeBase='http://activex... blah width='100' height='100' param name='FileName' value='wma_sample.wax' param name='AutoStart' value='0' embed id='objff' type='audio/x-ms-wax' src='wma_sample.wax' autostart='0' width='100' height='100'></embed /object The above code usually works, but you will find many validation errors if you check it at the W3C validator. Briefly, this code uses an ActiveX object for browsers that support it(mainly IE). The ActiveX path is valid code for browsers that support it. For the many browsers that do not support ActiveX for the WMP, the embed path is automatically taken. This usually works, but embed is a hangover from the browser war era and has never been part of official W3C html. Hence the validation errors you will get. However this can all be avoided. See http://www.cwdjr.info/souearly/mixedtestRoot.php and view the source code. This code will work for the WMP using a .wax [snip] |
#4
| |||
| |||
|
|
Thanks for the code but my problem is not playing WMA/WAX files in Firefox it's starting and stopping them using JavaScript. |
#5
| |||
| |||
|
|
Andrew Poulos wrote: Thanks for the code but my problem is not playing WMA/WAX files in Firefox it's starting and stopping them using JavaScript. Sorry, but I do not exactly know what you mean. It would help if you gave a working page so that people could see exactly what is going on and exactly what you need to do. The built in controls in the WMP object as I illustrated will of course allow you to start or stop the WMP at will by clicking the player button. This works for IE6 and recent versions of Firefox, Opera, Netscape, and Mozilla browsers. Your answer leads me to think that you may wish to start or stop automatically upon some event happening rather than by clicking a start/stop button, but without a working code, I cannot be sure. |
#6
| |||
| |||
|
|
cwdjrxyz wrote: Andrew Poulos wrote: Thanks for the code but my problem is not playing WMA/WAX files in Firefox it's starting and stopping them using JavaScript. Sorry, but I do not exactly know what you mean. It would help if you gave a working page so that people could see exactly what is going on and exactly what you need to do. The built in controls in the WMP object as I illustrated will of course allow you to start or stop the WMP at will by clicking the player button. This works for IE6 and recent versions of Firefox, Opera, Netscape, and Mozilla browsers. Your answer leads me to think that you may wish to start or stop automatically upon some event happening rather than by clicking a start/stop button, but without a working code, I cannot be sure. There's nothing wrong, as such, with your code. It's just that I don't want to have the standard WMP controls visible. There's a minimal custom interface that's to use JavaScript to control the playback. |
#7
| |||
| |||
|
|
There's nothing wrong, as such, with your code. It's just that I don't want to have the standard WMP controls visible. There's a minimal custom interface that's to use JavaScript to control the playback. I am still not certain I understand exactly what you are wishing to do without a working example. Since you mentioned a minimal interface, I just wanted to show you an example of the minimal standard WMP built in control that is reduced to a start/stop button. See http://www.cwdjr.info/dhtml/7veilsDance.html . |
![]() |
| Thread Tools | |
| Display Modes | |
| |