File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff 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 >
Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments