Refactor Application to delegate state management to services

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-08 00:36:05 +00:00
1 parent 566c2dbf89
commit bcacf46f8b
4 files changed
+60 -47

No files matched your search

+9
View File
@@ -1,6 +1,7 @@
import { userLogger } from "../utils/logger.js";
import { safeDecodeURIComponent } from "../utils/safeDecode.js";
import { PLAYBACK_START_TIMEOUT } from "../constants.js";
import { getCurrentVideo, setCurrentVideo } from "../state/appState.js";
// js/services/playbackService.js
/**
@@ -285,6 +286,14 @@ export class PlaybackService {
this.probeCacheTtlMs = PROBE_CACHE_TTL_MS;
}
get currentVideo() {
return getCurrentVideo();
}
set currentVideo(value) {
setCurrentVideo(value);
}
log(...args) {
try {
this.logger(...args);