Fix recording handling when it's disabled

This commit is contained in:
Sergey Stepanov 2021-12-05 22:11:29 +03:00
parent 1271aa8438
commit 535177bd46
No known key found for this signature in database
GPG key ID: A56B4929BAA8556B
3 changed files with 8 additions and 9 deletions

View file

@ -250,7 +250,7 @@
const handleRecordingStatus = (data) => {
if (data === 'ok') {
message.show(`Recording ${recording.isActive() ? 'on' : 'off'}`, true)
message.show(`Recording ${recording.isActive() ? 'on' : 'off'}`)
if (recording.isActive()) {
recording.setIndicator(true)
}
@ -472,4 +472,4 @@
// initial app state
setState(app.state.eden);
})(document, event, env, gameList, input, KEY, log, message, room, settings, socket, stats, stream, utils);
})(document, event, env, gameList, input, KEY, log, message, recording, room, settings, socket, stats, stream, utils);

View file

@ -38,12 +38,8 @@ const message = (() => {
_popup();
}
const show = (text, force = false) => {
if (!force) {
utils.throttle(() => _proceed(text), 1000);
} else {
_proceed(text)
}
const show = (text) => {
_proceed(text)
}
return Object.freeze({

View file

@ -11,7 +11,10 @@ const recording = (() => {
recButton = document.getElementById('btn-rec');
if (!userName || !recButton) {
return {}
return {
isActive: () => false,
getUser: () => '',
}
}
let state = {