4444
4545 < div class ="pokerface ">
4646 < p class ="title "> Poker Face</ p >
47- < p class ="valueMeter-label "> Neutral</ p >
47+ <!-- < p class="valueMeter-label">Neutral</p> -- >
4848 < div class ="valueMeter " id ="neutralThreshold ">
4949 < i class ="bar "> </ i >
5050 < i class ="draggable-cursor "> </ i >
5151 </ div >
52- < p class ="valueMeter-label "> Exception</ p >
52+ <!-- < p class="valueMeter-label">Exception</p>
5353 <div class="valueMeter" id="exceptionThreshold">
5454 <i class="bar"></i>
5555 <i class="draggable-cursor"></i>
56- </ div >
56+ </div> -->
5757 </ div >
5858
5959 < div class ="video ">
@@ -395,7 +395,7 @@ <h4>Detections:</h4>
395395 winning = true ;
396396 $ ( '.pokerface' ) . removeClass ( 'nop' ) ;
397397 if ( last_play != "good" && isPlaying ) {
398- $ ( 'audio#audio-good' ) [ 0 ] . play ( ) ;
398+ // $('audio#audio-good')[0].play();
399399 last_play = "good" ;
400400 }
401401 }
@@ -404,10 +404,19 @@ <h4>Detections:</h4>
404404 winning = false ;
405405 $ ( '.pokerface' ) . addClass ( 'nop' ) ;
406406 if ( last_play != "bad" && isPlaying ) {
407- $ ( 'audio#audio-bad' ) [ 0 ] . play ( ) ;
407+ //$('audio#audio-bad')[0].play();
408+ stop ( ) ;
408409 last_play = "bad" ;
409410 }
410411 }
412+
413+ }
414+
415+ function playWin ( ) {
416+ $ ( 'audio#audio-good' ) [ 0 ] . play ( ) ;
417+ }
418+ function playLost ( ) {
419+ $ ( 'audio#audio-bad' ) [ 0 ] . play ( ) ;
411420 }
412421
413422 var isStarted = false ;
@@ -442,10 +451,15 @@ <h4>Detections:</h4>
442451
443452 $ ( '#countdown .values' ) . removeAttr ( 'disabled' ) ;
444453 $ ( '#detections-list' ) . html ( '' ) ;
445- updateSlider ( 'neutralThreshold' , 0 ) ;
446- updateSlider ( 'exceptionThreshold' , 0 ) ;
447- winning = true ;
448- $ ( '.pokerface' ) . removeClass ( 'nop' ) ;
454+ //updateSlider('neutralThreshold', 0);
455+ //updateSlider('exceptionThreshold', 0);
456+
457+ if ( winning ) {
458+ playWin ( ) ;
459+ }
460+ else {
461+ playLost ( ) ;
462+ }
449463 }
450464
451465 function pad ( number , length ) {
@@ -460,9 +474,9 @@ <h4>Detections:</h4>
460474 var timeValues = timer . getTimeValues ( ) ;
461475 $ ( '#countdown .values' ) . val ( pad ( timeValues . minutes , 2 ) + ':' + pad ( timeValues . seconds , 2 ) ) ;
462476
463- if ( timeValues . seconds <= 2 && $ ( 'audio#audio-end' ) [ 0 ] . paused ) {
464- $ ( 'audio#audio-end' ) [ 0 ] . play ( ) ;
465- }
477+ // if (timeValues.seconds <= 2 && $('audio#audio-end')[0].paused) {
478+ // $('audio#audio-end')[0].play();
479+ // }
466480 } ) ;
467481
468482 timer . addEventListener ( 'targetAchieved' , function ( e ) {
0 commit comments