Skip to content

Commit

Permalink
⚡ Reset supported captions found on video removal
Browse files Browse the repository at this point in the history
  • Loading branch information
richardfrost committed Oct 6, 2022
1 parent 194d06c commit cfc3db0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/script/webFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ export default class WebFilter extends Filter {

handleRemovedNodesOnMutePage(removedNodes: NodeList) {
removedNodes.forEach((node) => {
if (node.nodeName == 'VIDEO' && this.audio.supportedCaptions) {
this.audio.supportedCaptionsFound(false, true);
}

// Remove APF Captions if the removed node was the last one we processed
if (this.audio.apfCaptionsEnabled) {
if (node == this.audio.lastProcessedNode || node.contains(this.audio.lastProcessedNode)) {
Expand Down

0 comments on commit cfc3db0

Please sign in to comment.