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
TTS Autoplay bug fix #56324
TTS Autoplay bug fix #56324
Conversation
68eaf5e
to
802c256
Compare
15a8e35
to
7cfa8e1
Compare
@@ -652,6 +652,33 @@ module SharedConstants | |||
} | |||
).freeze | |||
|
|||
VOICES = { |
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.
Resurrecting my old comment from the pre-LFS PR: Why are we putting these into shared_constants.rb
if none of these constants are referenced in Rails?
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 was because we had duplicated the VOICES
in both JavaScript and Ruby (in dashboard/app/models/concerns/text_to_speech.rb
) and that's what SharedConstants
are for.
What is missing is using the SharedConstants
version of VOICES
in the TextToSpeech
concern and removing it from there.
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.
Oh ok, makes total sense. We should probably open a ticket to do that, otherwise we haven't really improved the situation by moving them into shared_constants.
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.
LGTM
Creates a Queue for InlineAudios such as instructions and hints to prevent Text to Speech audio from playing all at once when Text to Speech is enabled in a course.
Before Audio Queue
Untitled.mov
After Audio Queue implementation
Screen.Recording.2024-04-01.at.12.35.07.PM.mov
Clicking hint while hint Audio is playing pauses hint audio, Clicking hint while another audio is playing adds to queue
Screen.Recording.2024-04-01.at.12.30.50.PM.mov
Links
Testing Story
Changes made to
InlineAudioTest.js
to include theAudioQueue
context. All tests pass.PR Checklist: