Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audio-ended fired before position update #112

Open
Glarregle opened this issue Jun 29, 2022 · 4 comments
Open

audio-ended fired before position update #112

Glarregle opened this issue Jun 29, 2022 · 4 comments

Comments

@Glarregle
Copy link

Glarregle commented Jun 29, 2022

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
@Glarregle
Copy link
Author

I could fix this by setting positionInterval option to 10 milliseconds.

@jkeen
Copy link
Contributor

jkeen commented Jul 21, 2022

@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.

@Glarregle
Copy link
Author

@jkeen Thanks, we're on [email protected]. Can you tell me what package version of ember-stereo would work w/ it?

@jkeen
Copy link
Contributor

jkeen commented Jul 26, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants