Commit Graph

596 Commits

Author SHA1 Message Date
Ramón Souza
60efe4794a
Merge pull request #15790 from JoVictorNunes/issue-15760
fix: mute external video when in echo test
2022-10-26 13:32:18 -03:00
Ramón Souza
43cf7cfc69 adjust audio/video dropdown position 2022-10-24 14:44:33 -03:00
Joao Victor
caa8667526 fix: mute external video when in echo test 2022-10-06 11:45:52 -03:00
KDSBrowne
9c6a6298e2 update menu ids to be unique 2022-10-05 21:54:59 +00:00
prlanzarin
b3eebbb926 fix(audio): retry gUM without pre-set deviceIds on OverconstrainedError(s)
There are some situations where previously set deviceIds (
local/session storage) may become stale. This causes an unexpected
behavior where audio is temporarily borked until the user clears their
local storage.
This issue has been seen more recently on Safari endpoints when switching
back-and-forth breakout rooms in environments running under iframes.
Also seen randomly on endpoints with virtual input devices.

This centralizes audio gUM calling into a single method that retries the
gUM procedure without pre-set deviceIds only if the initial call fails
due with an OverconstrainedError - hopefully circumventing the issue.
2022-09-15 19:25:30 +00:00
prlanzarin
ec1879f96b fix(audio): add inputDeviceId enforcement for post-join/gUM
Extract the deviceId again from the stream to guarantee consistency
between stream DID vs chosen DID. That's necessary in scenarios where,
eg, there's no default/pre-set deviceId ('') and the browser's
default device has been altered by the user (browser default != system's
default).
2022-08-24 14:39:09 +00:00
prlanzarin
89e814d570 fix(audio): centralize device change code, add rollbacks, surface errors
There's no rollback procedure in case a device switch fails right now,
nor does the code entrypoints that call the switching procedures wait
for resolution or failure before marking the new device as chosen. That
may cause inconsistent states in a couple of ways:
  - No rollback: switch fails, audio is still on but no actual
    microphone input is being transmitted
  - Not waiting for resolutions: inconsistent chosen devices on failures
Device switching errors are also not surfaced to the end user

This commit:
  - Adds device rollback and proper resolution/failure response
    awaits to try and make the state a bit more consistent.
  - Centralizes the input device switching code to be reused between
    different bridges
  - Centralizes device ID state management in audio-manager to try and
    mantain them a bit more consistent across the board
  - Surface device switching failures to the end user
  - Guarantee device IDs are set to the session storage on all
    appropriate scenarios
2022-08-24 13:28:27 +00:00
Ramón Souza
c48e942a62
Merge pull request #15488 from ramonlsouza/fix-dialin-button-styles
fix(styles): adjust dial-in button styles
2022-08-08 10:49:19 -03:00
Ramón Souza
eb19199235 adjust dial-in button styles 2022-08-04 14:17:45 -03:00
Ramón Souza
9e219d9cb3 adjust cc icon position 2022-08-02 17:33:53 -03:00
Anton Georgiev
ca0195585f
Merge pull request #15441 from antonbsa/audio-tests
test: Add new audio tests
2022-08-02 11:07:04 -04:00
prlanzarin
6c8b097eba fix: add option to disable transcription in mobile, extend support check
Mobile endpoints are flaky with the WebSpeechAPI:
  - iOS versions that support it are borking our outbound audio when it's
    enabled
  - Android speech recognition has flaky locale detection and speech
    transcription
Additionally: the support check is not checking the WebSpeechAPI
availability properly, so older devices (eg iOS 12) are flagged as
supported even though they aren't.

This commit adds a configuration flag (public.audioCaptions.mobile) to
control transcription availability on mobile. False by default.
Also extends the setSpeechVoices support check and
hasSpeechRecognitionSupport method to prevent false positives.
2022-07-20 17:20:54 +00:00
Arthurk12
e93b9739de style(captions): adds border to toggle button 2022-07-20 17:20:53 +00:00
Arthurk12
c96b53093c feat(captions): adds locale settings
Adds two new flags to the settings file which change the way the locale
flag is used:

- forceLocale: (true/false) => If true, enforces the transcription
  language to be the locale content field and jumps the language
selector
  in audio modal.
- defaultSelectLocale: (true/false) => If true, the default selected
  value in the dropdown language selector in audio modal will be defined
  by the locale content field.

In any case, if the locale flag holds an invalid value, it defaults to
disabled.
2022-07-20 17:20:53 +00:00
Arthurk12
da9adca229 fix(captions): talking indicator icon
Prevents the speech recognition from being initialized when the closed
captions feature is disabled.
2022-07-20 17:20:52 +00:00
Pedro Beschorner Marin
d553ca65cf feat(captions): use navigator language
If not set to use the default language, try to select the navigator
language as speech default locale.
2022-07-20 17:20:52 +00:00
Pedro Beschorner Marin
116c0d9a49 fix(captions): filter duplicated languages
Avoid multiple instances of the same language at the voices data.
2022-07-20 17:20:52 +00:00
Pedro Beschorner Marin
51eeb092b3 refactor(captions): configurable languages
Move the language collection to the HTML settings file. This data defines
the available languages available for the speech API.

These language tags are used to filter SpeechSynthesis' API `getVoices`
result. Tags must use BCP 47 format.

https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisVoice/lang
2022-07-20 17:20:52 +00:00
Pedro Beschorner Marin
b52c67d7a7 feat(captions): first pass on recording
Add the main server-side adapter for using the legacy closed captions
recording process with the audio captions data.
2022-07-20 17:20:52 +00:00
Pedro Beschorner Marin
1064aab84d style(captions): add background alpha
Add some transparency to the background color.
2022-07-20 17:20:51 +00:00
Pedro Beschorner Marin
fb48e61d6d feat(captions): add talking indicator feedback
Inform other users about who are the current talkers with the speech
recognition enabled.
2022-07-20 17:20:51 +00:00
Pedro Beschorner Marin
df184b542c feat(captions): add unsupported warning
Add a disclaimer for users on browsers that do not provide speech synthesis'
voices.
2022-07-20 17:20:51 +00:00
Pedro Beschorner Marin
307ab6ea40 feat(captions): add author avatar
Include captions' author avatar at the live feedback to improve identification.
2022-07-20 17:20:50 +00:00
Pedro Beschorner Marin
d00909751a refactor(captions): change getVoices routine
In some cases, `getVoices` returns an empty array even if the browser's vendor
has full support for speech synthesis. Add a trigger call to initiate the
voices fetching process.

As drafted, `getVoices` can be an asynchronous call and monitoring it
depends on the support of a `voiceschanged` event. Although many of the
main vendors support voices, this event is not (yet) by Safari.

https://wicg.github.io/speech-api/#dom-speechsynthesis-getvoices
https://wicg.github.io/speech-api/#eventdef-speechsynthesis-voiceschanged
https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/voiceschanged_event
2022-07-20 17:20:50 +00:00
Pedro Beschorner Marin
d6dc66f57e feat(captions): language selector
Replace the checkbox with a selector up with 3 languages: en-US, es-ES and pt-BR.

Add setting option to enable by default with predetermined locale.
2022-07-20 17:20:50 +00:00
Pedro Beschorner Marin
5671bd7d3c fix(captions): check for voices
Avoid enable audio transcription if the browser's vendor does not provide
voices data.

This should prevent false positives for browsers such as Chromium and
Brave.
2022-07-20 17:20:49 +00:00
Pedro Beschorner Marin
e131925370 style(captions): font-family fallback
Add extra `sans` alternatives
2022-07-20 17:20:49 +00:00
Pedro Beschorner Marin
d688a2572f fix(captions): remove padding when no content
Avoid rendering the captions wrapper's padding when there's no data to
be displayed at the live feedback.
2022-07-20 17:20:49 +00:00
Pedro Beschorner Marin
f726cb0ad5 refactor(captions): UX improvements
Parse the audio transcript before broadcasting it's content back to the
client and the recording actor. Limiting by 8 words per line and max of
2 lines to avoid CPU intensive operations over this recurring event.

Replace Calibri font family with Verdana to improve character spacing,
add relative sizing to the text content and a background padding.
2022-07-20 17:20:49 +00:00
Pedro Beschorner Marin
75969ec93c feat(captions): audio captions app
Add a server-side app for the audio captions feature and record proto-events
for this data.

As it is, only behaves as a pass-through module. The idea is to include all
the business intelligence in this app.
2022-07-20 17:20:48 +00:00
Pedro Beschorner Marin
0bc730b3e3 refactor(captions): improve recovery
Use the user's talking state to trigger a speech API recovery after long
periods of silence.
2022-07-20 17:20:48 +00:00
Pedro Beschorner Marin
944edf2ccf feat(captions): web speech prototype
Hardcoded pt-BR prototype for closed captions generated by the browser's
WebSpeech API.
2022-07-20 17:20:48 +00:00
Anton B
944e0b2981 test: add audio tests 2022-07-15 17:54:16 -03:00
Anton Georgiev
f2e25768c7
Merge pull request #15390 from ramonlsouza/merge25-26-jul14
chore: Merge v2.5.3 into v2.6
2022-07-15 11:43:17 -04:00
Ramon Souza
83d9feb9c0 fix missing import in audio controls 2022-07-15 11:41:11 -03:00
Ramon Souza
d08ff18add Merge remote-tracking branch 'upstream/v2.6.x-release' into merge25-26-jul14 2022-07-15 11:12:25 -03:00
Ramon Souza
db5ac1428a Merge tag 'v2.5.3' into merge25-26-jul14 2022-07-15 11:08:02 -03:00
Ramón Souza
267a6f5c9c
Merge pull request #15203 from ramonlsouza/improve-ghost-button-border
style: improve ghost buttons border in low density display
2022-07-15 12:06:59 +01:00
Paulo Lanzarin
3e8ccd370d
Merge pull request #15375 from prlanzarin/u26/fix/local-echo-gUM-block
fix(audio): block audio join while gUM isn't resolved (local echo)
2022-07-13 15:57:02 -03:00
prlanzarin
27896e74e6 fix(audio): block audio join while gUM isn't resolved (local echo)
The new local echo view doesn't block the "Join audio" button while
awaiting for getUserMedia permission to be granted/denied. That may
cause unexpected behavior when unattentive users just click "Join audio"
without granting or denying gUM.

This commit accounts for gUM resolution when deciding whether to block
the "Join audio" button. It also includes an extra "isConnecting" check
to it to avoid spam-clicking issues.
2022-07-13 14:35:37 +00:00
Ramón Souza
04386dfcd5
Merge pull request #15212 from gabriellpr/styling-buttons
style: Revised styles for our secondary buttons
2022-07-13 15:22:49 +01:00
prlanzarin
7b76d2e88f fix: change local echo Stop hearing locale to Stop audio feedback 2022-07-13 13:59:49 +00:00
prlanzarin
fba2c88494 fix(audio): make hearing a transient prop in local-echo
Prevents annoying console exceptions in dev mode
2022-07-12 16:37:36 +00:00
Anton B
d00699561f fix data-test props to same quote type 2022-07-11 17:35:14 -03:00
gabriellpr
f848d31014 modifying specific buttons
removing border and implementing box-shadow

adding transparent border

passing styles to common buttons

adding secundary color to component

updating color components
2022-07-07 10:45:54 -03:00
Anton B
d6f32f3422 Merge remote-tracking branch 'upstream/v2.6.x-release' into test-fixes-v2.6 2022-07-06 11:07:00 -03:00
Ramon Souza
29d597f7df Merge remote-tracking branch 'upstream/v2.6.x-release' into improve-ghost-button-border 2022-07-05 14:06:19 -03:00
Ramón Souza
a1ac9fe11d
Merge pull request #15293 from ramonlsouza/restore-audio-shortcuts
fix: audio shortcuts regression
2022-07-04 21:09:27 +01:00
Anton B
c71e5c9f74 test: fix all 2.6 tests and temporarily skip inconsistent ones 2022-07-01 17:55:32 -03:00
Ramon Souza
a29b651d9c restore audio mute / leave shortcuts 2022-06-29 15:19:30 -03:00