Skip to content

Commit

Permalink
✨ Add filteredText to FilteredVTTCue
Browse files Browse the repository at this point in the history
  • Loading branch information
richardfrost committed Sep 30, 2022
1 parent c03c54b commit 7088e04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/script/lib/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ interface DomainCfg {

interface FilteredVTTCue extends VTTCue {
filtered: boolean;
filteredText: string;
originalText: string;
position: number; // TextTrackCue
size: number; // TextTrackCue
Expand Down
1 change: 1 addition & 0 deletions src/script/webAudio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ export default class WebAudio {

const result = this.replaceTextResult(cue.text);
cue.originalText = cue.text;
cue.filteredText = result.filtered;
if (result.modified) {
cue.filtered = true;
if (rule.filterSubtitles) { cue.text = result.filtered; }
Expand Down

0 comments on commit 7088e04

Please sign in to comment.