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

HTML5 Audio Position is lost after unlocking. #1736

Open
EthanShoeDev opened this issue Sep 5, 2024 · 0 comments · May be fixed by #1737
Open

HTML5 Audio Position is lost after unlocking. #1736

EthanShoeDev opened this issue Sep 5, 2024 · 0 comments · May be fixed by #1737
Labels

Comments

@EthanShoeDev
Copy link

The Problem

When howler unlocks the html5 audios, it loses the current position.
This causes problems when we:

  • Load an audio on page load.
  • Seek to a position in onload.
  • The user clicks the page, so audio is unlocked.
  • Current position is lost.

Reproducible Example

No response

Reproduction Steps

  • Load an audio on page load.
  • Seek to a position in onload.
  • The user clicks the page, so audio is unlocked.

Possible Solution

Save the currentPosition to a variable and assign it back after calling .load().

Context

When resuming playback from the last played position on page load, it is very confusing as to why the position is lost.

Howler.js Version

v2.2.4

Affected Browser(s)/Versiuon(s)

No response

EthanShoeDev added a commit to EthanShoeDev/howler.js that referenced this issue Sep 5, 2024
@EthanShoeDev EthanShoeDev linked a pull request Sep 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant