Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Older Safari: Handle speech sample rate errors, reuse audio context #111

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

Merged
merged 2 commits into from
Feb 23, 2024

Conversation

microbit-matt-hillsdon
Copy link
Contributor

@microbit-matt-hillsdon microbit-matt-hillsdon commented Feb 22, 2024

  • Workaround for modspeech doesn't work on iPad Safari 13.x and 14.1 (works on 14.5) #110 where we've observed that the sample rate of 19000 isn't supported. We'll aim to increase the sample rate in a separate PR but this will at least mean the simulator isn't put in a bad state.
  • Reuse the audio context created after the user interaction, as there are limits to how many you can create on Safari 13 (4 in my BrowserStack testing). I think we always intended to do this, but careful review needed as this is a more significant change than I was anticipating. We already had clean up code for the nodes when the board stops. We never cleaned up the context. So I think we were assuming it lived forever. If this doesn't work out then an alternative is to try closing the old one before creating the new one.

We'll aim to increase the sample rate but this will at least mean the
simulator isn't put in a bad state.
Copy link

Copy link

netlify bot commented Feb 22, 2024

Deploy Preview for distracted-dubinsky-fd8a42 ready!

Name Link
🔨 Latest commit 2246983
🔍 Latest deploy log https://app.netlify.com/sites/distracted-dubinsky-fd8a42/deploys/65d7b39a99f850000808d8d8
😎 Deploy Preview https://deploy-preview-111--distracted-dubinsky-fd8a42.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@microbit-matt-hillsdon microbit-matt-hillsdon changed the title For older Safari be defensive about speech Older Safari: Handle speech sample rate errors, reuse audio context Feb 23, 2024
@microbit-matt-hillsdon microbit-matt-hillsdon marked this pull request as ready for review February 23, 2024 09:35
Copy link
Contributor

@microbit-robert microbit-robert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

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

Successfully merging this pull request may close these issues.

2 participants