Skip to content

Commit 78751f6

Browse files
author
Lanny McNie
committed
Minor demo updates
Signed-off-by: Lanny McNie <[email protected]>
1 parent 51fe447 commit 78751f6

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

examples/JustPlay.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,8 @@ <h1>Sorry!</h1>
8484
}
8585

8686
function playSound(event) {
87-
if (event.src == src) { // note that callback and event listener return the same event
88-
soundInstance = createjs.Sound.play(event.src); // start playing the sound we just loaded, storing the playing instance
89-
displayStatus.innerHTML = "Playing source: " + event.src; // let the user know what we are playing
90-
}
87+
soundInstance = createjs.Sound.play(event.src); // start playing the sound we just loaded, storing the playing instance
88+
displayStatus.innerHTML = "Playing source: " + event.src; // let the user know what we are playing
9189
}
9290

9391
</script>

examples/TestSuite.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ <h1>Sorry!</h1>
285285
$("#pauseBtn").click(function(event){
286286
var instance = getInstance();
287287
if (instance == null) { return; }
288-
instance.paused ? instance.resume() : instance.pause();
289-
$("#pauseBtn").attr("value", instance.paused ? "Resume" : "Pause");
288+
instance._paused ? instance.resume() : instance.pause();
289+
$("#pauseBtn").attr("value", instance._paused ? "Resume" : "Pause");
290290
});
291291
$("#muteBtn").click(function(event){
292292
var instance = getInstance();
@@ -481,7 +481,7 @@ <h1>Sorry!</h1>
481481
setPosSlider();
482482
audioInterval = setInterval(setPosSlider, intervalTime);
483483

484-
$("#pauseBtn").attr("value", instance.paused ? "Resume" : "Pause");
484+
$("#pauseBtn").attr("value", instance._paused ? "Resume" : "Pause");
485485
$("#muteBtn").attr("value", instance.getMute() ? "Unmute" : "Mute");
486486
} else {
487487
enableSet("instance", false);

0 commit comments

Comments
 (0)