MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / bindAudio

Method bindAudio

packages/playground/src/components/Waveform.ts:84–93  ·  view source on GitHub ↗
(audio: HTMLAudioElement)

Source from the content-addressed store, hash-verified

82 }
83
84 private bindAudio(audio: HTMLAudioElement): void {
85 if (this.audioElement === audio) {
86 return;
87 }
88 this.unbindAudio();
89 this.audioElement = audio;
90 audio.addEventListener('timeupdate', this.updateCursor);
91 audio.addEventListener('durationchange', this.updateCursor);
92 audio.addEventListener('seeked', this.updateCursor);
93 }
94
95 private unbindAudio(): void {
96 if (!this.audioElement) {

Callers 1

refreshMethod · 0.95

Calls 2

unbindAudioMethod · 0.95
addEventListenerMethod · 0.65

Tested by

no test coverage detected