From 43ab4c65628293577bf7643eb05343bd64f921ed Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 26 Sep 2014 09:55:44 -0400 Subject: [PATCH] Don't let people pause --- assets/scripts/africa.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/scripts/africa.js b/assets/scripts/africa.js index e47e0aa..d359c95 100644 --- a/assets/scripts/africa.js +++ b/assets/scripts/africa.js @@ -7,11 +7,9 @@ function toggle() { if(playing) { sound.pause(); playing = false; - control.className = 'icon-play'; } else { sound.play(); playing = true; - control.className = 'icon-pause'; } } @@ -24,7 +22,10 @@ function makeItPlay() { sound = new Howl({ urls: ['assets/audio/africa.ogg', 'assets/audio/africa.m4a'], autoplay: true, - loop: true + loop: true, + onplay: function() { + control.style.visibility = 'hidden'; + } }); setTimeout(enableToggle, 2500); }