mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-10-27 11:35:23 -07:00
fix(overlay): poll cheap playback state in the open subtitle sidebar (#290)
This commit is contained in:
1 parent
7108e086ba
commit
a6d96e9966
14 files changed
+286
-108
No files matched your search
+13
-3
@@ -226,15 +226,25 @@ export interface SubtitleData {
|
||||
endTime?: number | null;
|
||||
}
|
||||
|
||||
export interface SubtitleSidebarSnapshot {
|
||||
/**
|
||||
* Per-tick sidebar state, served from main's cached state without mpv round-trips. When
|
||||
* `sourceKey` or `cuesRevision` differs from the last full snapshot's, the renderer fetches a
|
||||
* new `SubtitleSidebarSnapshot`.
|
||||
*/
|
||||
export interface SubtitleSidebarPlaybackState {
|
||||
sourceKey: string | null;
|
||||
cues: SubtitleCue[];
|
||||
currentTimeSec?: number | null;
|
||||
/** Bumps whenever main swaps in a different parsed cue array. */
|
||||
cuesRevision: number;
|
||||
currentTimeSec: number | null;
|
||||
currentSubtitle: {
|
||||
text: string;
|
||||
startTime: number | null;
|
||||
endTime: number | null;
|
||||
};
|
||||
}
|
||||
|
||||
export interface SubtitleSidebarSnapshot extends SubtitleSidebarPlaybackState {
|
||||
cues: SubtitleCue[];
|
||||
config: SubtitleSidebarSnapshotConfig;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user