-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: janusweb
action: commit
revision:
path_from:
revision_from: 524572f10c616cae0547f733051dd06d2ebb4bf5:
path_to:
revision_to:

git.thebackupbox.net

janusweb

git://git.thebackupbox.net/janusweb

commit 524572f10c616cae0547f733051dd06d2ebb4bf5
Author: James Baicoianu <james_github@baicoianu.com>
Date:   Sun Apr 24 00:56:56 2022 -0700

    Dispatch event when sound ends

diff --git a/scripts/sound.js b/scripts/sound.js

index 9747921fd321ce5962ddaf8d5f0127e15df0c73b..

index ..96eb2bc962705cc0342ef1233c69485c7827b192 100644

--- a/scripts/sound.js
+++ b/scripts/sound.js
@@ -210,8 +210,11 @@ elation.require(['janusweb.janusbase'], function() {
     }
     this.updatePlaying = function(ev) {
       this.playing = (this.audio ? this.audio.isPlaying : false);
-      if (ev.type == 'ended' && this.singleshot)  {
-        this.die();
+      if (ev.type == 'ended') {
+        this.dispatchEvent({type: 'sound_ended'});
+        if (this.singleshot)  {
+          this.die();
+        }
       }
       return this.playing;
     }

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 16:24:15 2024