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

InvalidStateError after refreshing the page a second time #15

Open
nise opened this issue Jan 31, 2019 · 1 comment
Open

InvalidStateError after refreshing the page a second time #15

nise opened this issue Jan 31, 2019 · 1 comment

Comments

@nise
Copy link

nise commented Jan 31, 2019

If I open an refresh the webpage on a server Firefox comes with the following Error:
"InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable"

This error might be cause by accessing an audio file before it has been loaded. Event listeners should be used in order to avoid this:

myAudio.addEventListener('canplaythrough', function() {
    // do things with the audio like calling currentTime, duration, seek, ...
}, false);
@timobaumann
Copy link
Contributor

can you turn this into a patch or make a pull request? thanks.

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