Changes the timer auto-stop threshold from 90% to 100% of user count
to prioritize the timer alert sounding for all users over the timer state
being consistent.
Also, puts the user count fetch back to where it was to avoid a race
condition where the number of users when setting the observer is
different than when the timer ends(i.e. users've joined or left the
meeting while the timer was running) causing the timer not to stop or
stop prematurely.
There was a legacy attribute being used to find active users in the meeting.
This wrong attribute caused the returned number of users to be 0 which
makes the timer stop prematurely and, possibly, not to issue the timer beep.
Also adds a missing argument to updateTimer and moves the find call to
the Users collection to a external function, so it doesn't get executed
every time an user notifies timer has ended.
Sets conditions for calling play and stop music to avoid being called
repeatedly.
Groups all stop calls into a point to make the code cleaner.
Avoid recreating new audio tag whenever the timer song changes.
Filters users collection by 'online' connection status and describes when/how
server detects that the timer has ended to automatically stop it.
Also, fixed a corner case that when timer alarm was disabled, clients didn't
notify that the timer ended.
When user enters meeting with music already playing, an event listener is set
to play the music only after user interaction.
Also, to keep timer more cohesive and reduce complexity of the condition for
playing music, timer automatically stops after 90% of users notify that the
timer has expired.
Adds a music player for ambient sound which can be turned on and off using a
toggle located inside timer panel. When stopwatch is selected, this toggle is
automattically turned off.
There are a couple of hardcoded UA checks targeted at iOS endpoints
introduced circa 2.2-beta. One of those pops up an "unsupported" toast
when the device joins a conference - the other blocks camera
sharing.
Those checks are outdated since we transitioned to minBrowserVersions
approach that redirects the client to an unsupported view upon join. I
also assume the checks are bugged since, in some environments, it flags
iPadOS endpoints as iOS and version-checks it to a hardcoded "12.2"
threshold (which is incompatible with iPadOS versioning). That caused
camera sharing not to work, which is a false negative.
I consider the checks to be outdated, so I removed all references to
them.