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

Huge problem with .seek(number) to the end of html5 audio file #963

Closed
eugene-lazarev opened this issue May 22, 2018 · 2 comments
Closed

Comments

@eugene-lazarev
Copy link
Contributor

eugene-lazarev commented May 22, 2018

Hi @goldfire, thanks again for the best javascript player on the Github. I found another huge problem with html5 audio. Please take a deep look into it.

Formal sequence to reproduce problem:

  1. Open demo in Chrome (it has really simple and isolated code) with web-developer console: demo.zip;
  2. Playback is starting automatically;
  3. Please wait while track starts playing, then push the button (it uses howler‘s .seek(number) method with an argument-number larger than audio file duration; also works with an argument-number exact as howl’s .duration());
  4. One of two bugs happens randomly:
    4.1 Events onseek and onend are not firing;
    1
    4.2 Playback starts from the position about 3 seconds before the end, but howl.seek() (as well as howl._sounds[0]._node.currentTime) returns the time more than file‘s duration (look at the console):
    2

Those problems reproduces randomly in Chrome for me when I‘m trying to .seek(number) exactly on the end of the file or further.

I debugged it step-by-step and found the root of problem for the bug 4.1: Promise which you are creating at play method (you use play with internal flag inside seek) is not resolving, so runLoadQueue function didn‘t run. It looks like browser bug.

And I have no idea about bug 4.2.

Please let me know what do you think about that.

Thank you!

@eugene-lazarev
Copy link
Contributor Author

I believe those bugs are partly related to some issues with mp3 format or to some server settings or http protocol or something like this. I‘m not good with this kind of stuff. But I hope howler.js can fix it inside itself and give us brilliant working API 😈

@goldfire
Copy link
Owner

Thanks for the simple test case! This should be fixed shortly in v2.0.14.

ringcrl pushed a commit to ringcrl/howler.js that referenced this issue Apr 21, 2019
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