mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-08-04 15:54:19 +00:00
Fix recording handling when it's disabled
This commit is contained in:
parent
1271aa8438
commit
535177bd46
3 changed files with 8 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -11,7 +11,10 @@ const recording = (() => {
|
|||
recButton = document.getElementById('btn-rec');
|
||||
|
||||
if (!userName || !recButton) {
|
||||
return {}
|
||||
return {
|
||||
isActive: () => false,
|
||||
getUser: () => '',
|
||||
}
|
||||
}
|
||||
|
||||
let state = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue