Fires once when the bar reaches 100% (from the live draw loop only, never a still frame).
(cb: () => void)
| 27 | |
| 28 | /** Fires once when the bar reaches 100% (from the live draw loop only, never a still frame). */ |
| 29 | onFinished(cb: () => void): () => void { |
| 30 | this.finishListeners.add(cb); |
| 31 | return () => { this.finishListeners.delete(cb); }; |
| 32 | } |
| 33 | |
| 34 | /** Idempotent — returns the existing stream if one is already running. */ |
| 35 | createStream(): MediaStream { |