diff --git a/examples/Widgets.js b/examples/Widgets.js index f913b849..74455518 100644 --- a/examples/Widgets.js +++ b/examples/Widgets.js @@ -22,6 +22,29 @@ GUI.StartButton.prototype.buttonClicked = function(){ this.callback(); }; +/** + * a start button for mobile browsers which require a touchstart event + * to start the audio + */ +GUI.MobileStart = function(callback){ + if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { + this.element = $("
", {"class" : "StartButton"}) + .appendTo("#Container"); + this.button = $("