[UPDATE] hide toggle on mobile devices
mobile devices can't start automatically, starting sound only works with a touch event. so we don't create the object and remove the toggle from footer
This commit is contained in:
parent
fd8cd88b12
commit
9a3791bd42
@ -9,6 +9,9 @@ $(document).ready(function(){
|
||||
// check if the default plugins can be loaded, if not, disable button and don't load soundjs
|
||||
if (!createjs.Sound.initializeDefaultPlugins()) {
|
||||
$('#togglesound').hide();
|
||||
// don't create object and hide toggle on mobile devices. must be started inside a touch event, else sound doesn't start
|
||||
} else if (createjs.Sound.BrowserDetect.isIOS || createjs.Sound.BrowserDetect.isAndroid || createjs.Sound.BrowserDetect.isBlackberry) {
|
||||
$('#togglesound').hide();
|
||||
} else {
|
||||
var audioPath = "{/literal}{$PATH}{literal}/audio/";
|
||||
var manifest = [ {id:"ding", src:"ding.ogg"} ];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user