ember-hifi
ember-hifi copied to clipboard
audio-ended fired before position update
I've found that audio-ended
event is fired but after it position
property is updated again. I have to keep track of the audio playing until it totally ends (to display progress). But how can I certainly track the audio position until its end?
Here an example of logs:
handleEnded(hifi) {
console.log('isPlaying', hifi.isPlaying);
console.log('service', hifi);
console.log('position', hifi.position);
console.log('duration', hifi.duration);
}
You'll see here, I get the position in the event as 1814.147 and then it updates again to 2263.946
isPlaying false
service Class { /* expand Class preview after around 1 sec */
...
_position: 2263.946
...
}
position 1814.147
duration 2263.946
I could fix this by setting positionInterval
option to 10 milliseconds.
@Glarregle Unfortunately I don't think anyone is maintaining this repository anymore. I forked this last year and updated it to modern standards making it way more ergonomic and I'd highly recommend you switch to using ember-stereo
instead. Interactive docs are at ember-stereo.com, and am actively supporting that.
@jkeen Thanks, we're on [email protected]. Can you tell me what package version of ember-stereo
would work w/ it?
@Glarregle The latest version requires 3.27 or higher, but I think if you pin ember-stereo to ~ 3.0.4
it should work on 3.24