-
Notifications
You must be signed in to change notification settings - Fork 37
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
Repeats beginning of audio file in iOS #5
Comments
bump! I'm trying to do something pretty similar and co-incidentally experiencing the exact same problem...how did you "pause()" it? |
I used the sprite method and "mbAudio.pause()" on onMouseUp / touchEnd events. Example:
|
Wow...well that sucks for me! |
Hmm. Not working for you? I did that a year ago, a lot's changed about iOS since then. iOS/Safari was(is?) notoriously weird about playing sounds in-browser, latency issues, etc. |
Nope. I'm however trying to pause it in the play function |
I'm using this as a kind of piano playing mobile site with each note assigned in the sprite, but in iOS it will randomly play the very first one instead of it's intended note. When the note is repeatedly pressed it will eventually play the correct one, but this happens on every note and seems to happen randomly.
Has anyone else had this problem?
I've found a workaround that uses individual files for each note instead of sections of a larger file. This isn't ideal though because each note has to load on click now. Is there a way to silently preload/preplay the sounds without user interaction?
Update: I reverted back to using one audio file that has all the notes in it - except I used "mbAudio.pause()" instead of "mbAudio.stop()" and that solved the repeating problem. I guess stop makes the "playhead" move back to zero and that was causing the repeat.
The text was updated successfully, but these errors were encountered: