Skip to content

Commit

Permalink
fix: Fire audio-ended event when fixed length audio ends using HLS co…
Browse files Browse the repository at this point in the history
…nnection
  • Loading branch information
jkeen committed Sep 11, 2021
1 parent f768a04 commit f3d66b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addon/services/stereo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions addon/stereo-connections/hls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }));
Expand Down

0 comments on commit f3d66b0

Please sign in to comment.