summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-09-11 16:01:12 -0400
committerJules Laplace <jules@okfoc.us>2016-09-11 16:01:12 -0400
commit110e137f1f6a56f93e4edb57bfbdffc1384f78dc (patch)
tree673b725e987281fedbf25e35d5a07816354b1a76
parent7243fd7cf75e59b2ea45def413788020a663679f (diff)
working
-rw-r--r--env.js2
-rw-r--r--index.html5
-rw-r--r--js/vendor/StartAudioContext.js2
3 files changed, 4 insertions, 5 deletions
diff --git a/env.js b/env.js
index f25c14b..0b2670f 100644
--- a/env.js
+++ b/env.js
@@ -31,7 +31,7 @@ var environment = (function(){
}
environment.request_audio_context = function(){
var element = $("<div>", {"id" : "MobileStart"}).appendTo("body")
- var button = $("<div>").attr("id", "Button").text("Enter").appendTo(element)
+ var button = $("<div>").attr("id", "Button").html("Enter<br>(please unmute your phone)").appendTo(element)
StartAudioContext.setContext(Tone.context)
StartAudioContext.on(button)
StartAudioContext.onStarted(function(){
diff --git a/index.html b/index.html
index 91b0e3a..4fcc481 100644
--- a/index.html
+++ b/index.html
@@ -10,7 +10,7 @@ html,body { font-size: 12px; font-weight: normal; background: black; color: whit
circle { cursor: pointer }
input[type=text] { width: 30px }
#mobile_controls { display: none }
-.mobile #mobile_controls { display: inline }
+.mobile #mobile_controls { display: block; }
#MobileStart {
position: absolute;
@@ -34,7 +34,8 @@ input[type=text] { width: 30px }
width: 80px;
height: 80px;
text-align: center;
- line-height: 80px; }
+ line-height: 80px;
+}
</style>
</head>
diff --git a/js/vendor/StartAudioContext.js b/js/vendor/StartAudioContext.js
index 1823b04..0b2883f 100644
--- a/js/vendor/StartAudioContext.js
+++ b/js/vendor/StartAudioContext.js
@@ -78,7 +78,6 @@
StartAudioContext.onStarted = function(cb){
//if it's already started, invoke the callback
if (StartAudioContext.isStarted()){
- console.log("is started")
cb();
} else {
StartAudioContext._onStarted.push(cb);
@@ -148,7 +147,6 @@
* event has been triggered.
*/
function onTap(){
-
//start the audio context with a silent oscillator
if (StartAudioContext.context && !StartAudioContext.isStarted()){
var osc = StartAudioContext.context.createOscillator();