diff --git a/packages/html/html/src/components/media-volume-range.ts b/packages/html/html/src/components/media-volume-range.ts index f50615ca..a039a4d4 100644 --- a/packages/html/html/src/components/media-volume-range.ts +++ b/packages/html/html/src/components/media-volume-range.ts @@ -23,13 +23,17 @@ export class VolumeRangeBase extends HTMLElement { this._input.min = '0'; this._input.max = '1'; this._input.step = '0.01'; - this._input.addEventListener('input', this.handleInput.bind(this)); + this._input.addEventListener('input', this); this.appendChild(this._input); } - handleInput() { - if (this._state) { - this._state.requestVolumeChange(parseFloat(this._input.value)); + handleEvent(event: Event) { + const { type } = event; + const state = this._state; + if (state) { + if (type === 'input') { + state.requestVolumeChange(parseFloat(this._input.value)); + } } }