mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 04:42:57 +00:00
Refactor playback selection strategy into dedicated service
Extracted the complex playback logic from `js/app/playbackCoordinator.js` into a new `js/services/playbackStrategyService.js`. This improves maintainability by separating the orchestration logic from the application glue code. The coordinator now delegates to the service, passing a context object for UI interactions and state synchronization. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
fc25801811
commit
0da9401235
3 files changed
+422
-267
No files matched your search
@@ -6,6 +6,7 @@ import { createWatchHistoryRenderer } from "../historyView.js";
|
||||
import WatchHistoryController from "./watchHistoryController.js";
|
||||
import WatchHistoryTelemetry from "../services/watchHistoryTelemetry.js";
|
||||
import PlaybackService from "../services/playbackService.js";
|
||||
import PlaybackStrategyService from "../services/playbackStrategyService.js";
|
||||
import AuthService from "../services/authService.js";
|
||||
import DiscussionCountService from "../services/discussionCountService.js";
|
||||
import CommentThreadService from "../services/commentThreadService.js";
|
||||
@@ -350,6 +351,10 @@ export default class ApplicationBootstrap {
|
||||
},
|
||||
},
|
||||
});
|
||||
app.playbackStrategyService = new PlaybackStrategyService({
|
||||
playbackService: app.playbackService,
|
||||
logger: devLogger,
|
||||
});
|
||||
app.activePlaybackResultPromise = null;
|
||||
app.activePlaybackSession = null;
|
||||
|
||||
|
||||
Reference in new issue
Block a user