diff --git a/opal/browser/audio/node.rb b/opal/browser/audio/node.rb index 8a0c7fe..7d9326c 100644 --- a/opal/browser/audio/node.rb +++ b/opal/browser/audio/node.rb @@ -71,6 +71,10 @@ def type=(type) def type `#@native.type` end + + def when_finished(&block) + `#@native.onended = block()` + end end class Delay < Base