Skip to content

Commit 0ac5482

Browse files
authored
🔀 Merge pull request #432 from richardfrost/watcher_updates
Watcher Mode Updates
2 parents e3cb1fe + 91a71ba commit 0ac5482

File tree

4 files changed

+246
-87
lines changed

4 files changed

+246
-87
lines changed

src/script/lib/globals.d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ interface AudioRule {
33
_dynamic?: boolean; // [Dynamic] Set to true on a dynamic rule
44
apfCaptions?: boolean; // [Cue] Display an HTML version of the caption/subtitle text: Requires videoCueHideCues = true
55
apfCaptionsSelector?: string; // [Cue] Selector for container that will hold the custom HTML captions
6+
apfCuesLabel?: string; // [Watcher.toCue] TextTrack label for APF Cues (Default: 'APF-Cues')
67
buildTarget?: string; // [All] Only allow rule to run on a specific buildTarget
78
checkInterval?: number; // [Watcher] Set a custom watch interval (in ms, Default: 20)
89
className?: string; // [Element] node.className.includes()
@@ -13,6 +14,7 @@ interface AudioRule {
1314
displayElementLevels?: number; // [Watcher] Number of levels (ancestors) to get _displayElement
1415
displayHide?: string; // [Element,ElementChild,Watcher] Display style for hiding captions (Default: 'none')
1516
displaySelector?: string; // [Element,ElementChild,Watcher] Alternate selector to hide/show captions
17+
displaySelectorParents?: number; // [Element,ElementChild,Watcher] Number of levels to go above displaySelector's element
1618
displayShow?: string; // [Element,ElementChild,Watcher] Display style for showing captions (Default: '')
1719
displayVisibility?: boolean; // [Watcher*] Use visibility to show/hide caption container
1820
dynamicClasslist?: string; // [Dynamic] Set when a dynamicTextKey is found
@@ -41,6 +43,7 @@ interface AudioRule {
4143
simpleUnmute?: boolean; // [Element,ElementChild,Text+,Watcher+] Simplify requirements for unmuting (should be first rule)
4244
subtitleSelector?: string; // [Element,ElementChild,Watcher] *Used for Filtering*: node.querySelectorAll()
4345
tagName?: string; // [Element*,ElementChild*] node.nodeName
46+
toCue?: boolean; // [Watcher] [BETA]: Convert page element captions to video textTrack cues
4447
unmuteDelay?: number; // [Element,ElementChild,Watcher] Positive number (in ms) to delay unmuting
4548
videoCueHideCues?: boolean; // [Cue] Remove/hide cues instead of setting textTrack.mode = 'hidden'
4649
videoCueKind?: string; // [Cue] Kind of video TextTrack ('captions', 'subtitles', etc.)
@@ -155,9 +158,10 @@ interface Version {
155158
}
156159

157160
interface WatcherData {
158-
filtered?: boolean;
161+
filtered: boolean;
159162
initialCall: boolean;
160163
skipped?: boolean;
164+
textResults: ReplaceTextResult[];
161165
}
162166

163167
interface WordOptions {

0 commit comments

Comments
 (0)