diff --git a/addon/services/stereo.js b/addon/services/stereo.js index 5a88bbb3..478a1efa 100644 --- a/addon/services/stereo.js +++ b/addon/services/stereo.js @@ -852,7 +852,7 @@ export default class Stereo extends Service.extend(EmberEvented) { } findSound(identifier) { - return this.soundProxy(identifier).value; + return this.soundProxy(identifier)?.value; //TODO: use a Proxy? it'd be neat to be able to 'find' a sound // that isn't loaded and attach events to it. diff --git a/addon/stereo-connections/hls.js b/addon/stereo-connections/hls.js index 3f1c0153..4a73cfc2 100644 --- a/addon/stereo-connections/hls.js +++ b/addon/stereo-connections/hls.js @@ -143,6 +143,7 @@ export default class HLSSound extends BaseSound { }); video.addEventListener('pause', () => this.trigger('audio-paused', { sound: this })); + video.addEventListener('ended', () => this.trigger('audio-ended', { sound: this })); video.addEventListener('durationchange', () => this.trigger('audio-duration-changed', { sound: this })); video.addEventListener('seeked', () => this.trigger('audio-position-changed', { sound: this, currentTime: this.currentTime })); video.addEventListener('timeupdate', () => this.trigger('audio-position-changed', { sound: this, currentTime: this.currentTime }));