RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
39.35k stars 10.09k forks source link

Audio Jittering while recording on any mobile browser/FireFox cant record at all #14453

Open zigfighter opened 5 years ago

zigfighter commented 5 years ago

On any mobile browser recording audio in a room while the chat is bussy, the audio stutters and skips. Alone in a fresh room thers no problem, but in rooms with f.e. 26k Messages in and swiping the channels list while recording, the audio is heavily skipping. Checked all browsers(chrome, samsung, variants, Android-based and IOS behave the same) and only Firefox did mint audio at all times BUT since last update FF doesnt show the mic anymore, so Audio wont record at all.

Entering a room after a fresh reload OR scrolling up to lood more messages has no impact.

i tried the following already (after taking a backup) i deleted all medial message of channel -> no diffrence, i deleted alot of messages like 24000 of 26000 total -> no diffrence, i deleted ALL messages of channel -> bingo , clear audio (that might just have to do with what the chat thread does besides recording)

zigfighter commented 5 years ago

Screenshot_20190510-115342

zigfighter commented 5 years ago

this is from Android, fresh empty phone just FF installed.

geekgonecrazy commented 5 years ago

More details...

Can do this on any browser. Start audio recording and then start doing things that cause a lot of JavaScript to execute. Expand and collapse panels etc. then listen to output.

Current implementation seems to use an interval to record. My guess is event loop gets some extra tasks in it and it’s not getting a continuous recording.

zigfighter commented 5 years ago

Since last update, this Issue magicly vanished on my installation right now i cant reproduce any of the jittering effecs. i do some more testing now with various browsers on various devices and on wifi/various mobile connects.

geekgonecrazy commented 5 years ago

I don’t believe any changes have been made. Likely just not a lot of load at the time

zigfighter commented 5 years ago

Yup, i just reconfirmed it again.. just a fluke,.. its still there :-/ BUT i have another observation, apparently making Audios over Wifi is less stressfull then over mobile connect. i installed someting like a process explorer monitoring the Mobiles CPUs while trying to make audios and u can tie the jittering to the load of CPU if the phone decides the Chat running browser has its affinity to the same CPU that currently has most load of the mobile connection (which is usualy multi-threaded, explains why sometimes it works). I am no trying to artificialy raise the load on the CPU that holds the browser/java and see if i can start an audio and then rasie CPU load to the point where its starts doing odd stuff... IF that can help with nailing down the problem.