Commit Graph

13 Commits

Author SHA1 Message Date
Ramon Souza
ffbbae1ed4 close mute alert 2021-04-29 11:06:27 -03:00
Mario Jr
298c4afd4c Update .eslint rule to affect only a restricted scope 2021-04-16 15:24:14 -03:00
Mario Jr
e8d59ed14a fix: mic selection (firefox/all browsers) and muted alert when mic is changed
This commit contains three fixes: one already reported and two detected
during the investigation of the solution.
This started as a fix for firefox (#12023), but i also fixed the muted
alert/banner when device changes: the banner wasn't detecting device changes,
unless audio was deactived/actived.

There's another fix for the microphone stream: we now keep sender's track
disabled if it was already disabled for the sender's track of the previous
selected device.

Also did small refactor for eslint checking.

Some technical information: in sip bridge (bridge/sip.js), setInputStream and
liveChangeInputDevice function were both fully turned into promises, which
guarantees we have everything ready when it resolves to the respective values.
This helps AudioManager (audio-manager/index.js) to sequentially sets and
tracks the state of the current microphone stream (inputStream), when calling
liveChangeInputDevice function: we first set the current stream to null,
creats a new one and then set it to the newly created value - this is needed
because MutedAlert (muted-alert/component.jsx) can then gracefully
allocate/deallocate the cloned stream when it is set to a non-null/null value
(the cloned stream is used for speech detection with hark).
In MutedAlert we also make sure to enable the cloned stream's audio
tracks, just in case the user change the device when muted (audio track is
disabled in this case), which also leaves the cloned stream muted (we then
enable the track to allow speech detection).

Closes #12023
2021-04-16 10:45:40 -03:00
Mario Jr
3253980584 fix: when muted alert is active, can't click on 'Leave audio'
Closes #11913
2021-04-08 14:13:04 -03:00
Mario Jr
37e6755008 Fix muted banner being created for listen-only fallback stream
When listen only fallbacks from Kurento to FreeSWITCH, we must guarantee
the muted alert won't be created, speciallly because listen-only's fallback
uses a flow similar to microphone's. Client currently crashes when this
happens: this commit fixes this peoblem.
2021-03-31 16:25:07 -03:00
Mario Jr
4ad41bc8c5 Improvements in muted banner
We now stop the MediaStream (cloned/dummy input stream) when this is not
needed anymore.
We don't create/clone a new MediaStream when it already exists.
Fixed eslint warning in muted-alert/component.jsx
2021-03-31 16:25:04 -03:00
KDSBrowne
d3fa32e111 clone unmuted input stream for usage with hark 2021-01-30 17:04:07 +00:00
Anton Georgiev
ce8c733ec4 move the check to disable mutedAlert feature; temp disable it 2020-10-26 21:07:15 +00:00
KDSBrowne
77b71a4d1f fix duplicate css variables being loaded (improve imports) 2020-09-01 18:46:13 +00:00
KDSBrowne
0877604d00 improve notification position / prevent state update on unmounted component 2020-06-23 13:38:59 +00:00
KDSBrowne
b3b9a45b35 add config options for muted alert 2020-06-22 16:02:24 +00:00
KDSBrowne
d3284bb748 remove extra gUM call / pass stream from audio manager 2020-06-16 15:03:45 +00:00
KDSBrowne
061e522493 add notification when speaking while muted 2020-06-16 13:41:51 +00:00