04-19-2023, 10:16 AM
Hi @Tim Curtis,
I just wanted to see if I could gather some information on this, so tried to reproduce...
If I do this on the browser, from my laptop, everything seems to work, that is: I can toggle "single" without breaking the UI...
Then it hit me... suddenly, instead of clicking anywhere in the middle of the menu item (horizontally, I mean...) I clicked on the check-mark itself, and that broke the whole thing.
To confirm this, I just restarted the UI, and clicked on the check-mark of "Consume", which I keep active... BUM, UI crashed again.
So, it is clicking on the check-mark that crashes the menu handler somehow... debugging javascript I came across something weird... see this
The following is the last CASE statement of the function handling the popup-menu commands, and after clicking on the check-mark, the relevant CASE is executed (say, "single"), and then the execution steps on the lambda callback of the post command below... such php (recorder-cmd.php) does not exist, hence the default-cover-v6.svg, IMO...
The real problem being, though, how is it possible for the code to execute 2 case statements, providing the first IS terminated with BREAK???
I'll have a look if it may appear to be a compressor/obfuscator issue...
I just wanted to see if I could gather some information on this, so tried to reproduce...
If I do this on the browser, from my laptop, everything seems to work, that is: I can toggle "single" without breaking the UI...
Then it hit me... suddenly, instead of clicking anywhere in the middle of the menu item (horizontally, I mean...) I clicked on the check-mark itself, and that broke the whole thing.
To confirm this, I just restarted the UI, and clicked on the check-mark of "Consume", which I keep active... BUM, UI crashed again.
So, it is clicking on the check-mark that crashes the menu handler somehow... debugging javascript I came across something weird... see this
The following is the last CASE statement of the function handling the popup-menu commands, and after clicking on the check-mark, the relevant CASE is executed (say, "single"), and then the execution steps on the lambda callback of the post command below... such php (recorder-cmd.php) does not exist, hence the default-cover-v6.svg, IMO...
The real problem being, though, how is it possible for the code to execute 2 case statements, providing the first IS terminated with BREAK???
Code:
case 'stream_recorder':
$('#menu-check-recorder').toggle();
if ($('#menu-check-recorder').css('display') == 'block') {
SESSION.json['recorder_status'] = 'On';
$('.playback-context-menu i').addClass('recorder-on');
}
else {
SESSION.json['recorder_status'] = 'Off';
$('.playback-context-menu i').removeClass('recorder-on');
}
$.post('command/cfg-table.php?cmd=upd_cfg_system', {'recorder_status': SESSION.json['recorder_status']}, function() {
$.post('command/recorder-cmd.php?cmd=recorder_on_off');
});
I'll have a look if it may appear to be a compressor/obfuscator issue...