-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fixes safari browser missing buffer when using webaudio #1096
Conversation
why are these values (1 channel, 4095 samples) hard coded? I guess Safari doesn't supply these values somewhere? |
@thijstriemstra yea that's the problem it doesn't. Safari TP should return the correct buffer, but it's a long way until that will be available. For now that's the best we can do to fix it in safari. |
src/webaudio.js
Outdated
@@ -223,6 +223,11 @@ WaveSurfer.WebAudio = { | |||
|
|||
this.setLength(length); | |||
|
|||
if (!this.buffer.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a short comment regarding the Safari quirk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @entonbiba
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@katspaugh sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @entonbiba! |
* fixes safari browser missing buffer when using webaudio * return correct buffer * set samples to 4096 * add safari comment
* fixes safari browser missing buffer when using webaudio * return correct buffer * set samples to 4096 * add safari comment
@entonbiba can this workaround be removed yet? |
fixes #952 safari buffer undefined