Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Javascript Audio Player - Issues in firefox

Featured Replies

Hi All,

 

I'm currently building an audio player for a colient. Here's how it currently looks..

 

http://iplayer.playradiouk.com/?station=9

 

I'm currently trying to build the player in javascript instead of flash. No issues so far. I can play the stream and mute it/ajust the volume. Only problem is for some reason the controls don't seem to work in firefox. Here's the javascript..

 

	<script type="text/javascript">
//global
var muted;

	function videoPlay(){
		document.getElementById('VIDEO').controls.play();
	}
	function videoStop(){
		document.getElementById('VIDEO').controls.stop();
	}
	function MuteMe()
	 {
		x = VIDEO.settings.mute;
		if (x == 0)
		{
		   VIDEO.settings.mute =  "1";
		   document.getElementById('muter').src='/_images/player/play.jpg';
		}
		else
		{  
		   VIDEO.settings.mute =  "0";
		   document.getElementById('muter').src='/_images/player/mute.jpg';			   
		}
	 }
	 function VolumeUp()
	 {			  
		X = VIDEO.settings.volume;
		VIDEO.settings.volume = X +  10;	  
	 }

	 function VolumeDown()
	 {
		X = VIDEO.settings.volume;				  
		VIDEO.settings.volume = X - 10;
	 }		 
</script>

 

Anyone know why, or how I can fix this for Firefox users?

 

Cheers!

  • Author

Discovered you can't control WMP in anything other than IE due to the lack of activex in other browsers.

 

Can anyone suggest a javascript alternative to enable me to control the volume and mute?

 

Am I going to have to go down the flash root?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.