mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Refactor Application to delegate state management to services
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
566c2dbf89
commit
bcacf46f8b
4 files changed
+60
-47
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user