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
Handle global audio play errors #4011
Conversation
492be1e
to
4eb09e9
Compare
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.
Signed-off-by: Olga Bulat <obulat@gmail.com>
0cbca6c
to
e5fce55
Compare
Based on the medium urgency of this PR, the following reviewers are being gently reminded to review this PR: @dhruvkb Excluding weekend1 days, this PR was ready for review 4 day(s) ago. PRs labelled with medium urgency are expected to be reviewed within 4 weekday(s)2. @obulat, if this PR is not ready for a review, please draft it to prevent reviewers from getting further unnecessary pings. Footnotes
|
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.
This is a very nice approach and super clean PR. Well done!
Fixes
Fixes #3487 by @sentry-io
Description
This PR creates a
playActiveAudio
function within the active media store to play the audio and correctly handle play errors for both theVAudioTrack
's and theVGlobalAudioTrack
's audio elements.I'm not sure about the location of this function. At first, I wanted to put it in a separate file, something like
utils/audio.ts
. However, this function needs access to set the store's message and also needs to be able to send a Sentry message. That's why I put it inside the active media store, and added the html audio element as a parameter. Suggestions on better placement welcome!I also fixed the error message showing the key instead of the string in the global audio player.
Testing Instructions
Use an iphone or an iphone simulator.
Run the app using
just frontend/run dev
Search for audios and select
OGG
in theExtensions
filters.Play an audio. You should see "This audio format is not supported by your browser" instead of "err_unsupported" in the waveform area.
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin