-
Notifications
You must be signed in to change notification settings - Fork 137
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
Error "Uncaught TypeError: Cannot read property 'play' of undefined" #85
Comments
Hard to reliably reproduce (it is a race condition) but I have noted this behavior as well. I submitted a PR which moves that call into the closure that assigns the audio property. |
+1 |
Fixed in PR |
Is the fixed version available through bower? I don't see it |
Fix should be somewhere here: https://github.com/danielstern/ngAudio/pulls?q=is%3Apr+is%3Aclosed If not, please take a look and see if you can implement a fix / update the necessary bower versioning to make the fix available. |
I think you just need to push a new version / tag I still see the old code here for v1.7.0 https://github.com/danielstern/ngAudio/blob/1.7.0/app/angular.audio.js#L145-L153 |
Hey @danielcrisp, I added you as a collaborator, so please feel free to push the new tag. Cheers, |
Thanks, done |
When using the
ngAudio.play()
method with a remote resource, I receive the above error on my console (version is 1.7.0 on the latest Chrome).It fails at
audio.play();
, what leads me to the assumption thataudio
has not yet been initialized upon calling.Furthermore, I think I'm unable to set
ngAudio.unlock = false
as outlined at http://danielstern.github.io/ngAudio/#/docsThe text was updated successfully, but these errors were encountered: