Show stats in the Guide menu & refactor

This commit is contained in:
redphx
2024-06-01 10:11:06 +07:00
parent 60cadb4b04
commit ed3c4041ff
16 changed files with 467 additions and 299 deletions

View File

@@ -268,7 +268,8 @@ function setupStreamSettingsDialog() {
{
pref: PrefKey.STATS_QUICK_GLANCE,
onChange: (e: InputEvent) => {
(e.target! as HTMLInputElement).checked ? StreamStats.quickGlanceSetup() : StreamStats.quickGlanceStop();
const streamStats = StreamStats.getInstance();
(e.target! as HTMLInputElement).checked ? streamStats.quickGlanceSetup() : streamStats.quickGlanceStop();
},
},
{
@@ -520,7 +521,6 @@ export function setupStreamUi() {
window.addEventListener('resize', updateVideoPlayerCss);
setupStreamSettingsDialog();
StreamStats.render();
Screenshot.setup();
}