Skip to content

Commit

Permalink
Revert "fix(SUP-42112): Advanced Caption Settings not working in iOS" (
Browse files Browse the repository at this point in the history
…#779)

Reverts #773
  • Loading branch information
inbalvasserman authored May 29, 2024
1 parent 642fe24 commit 5f10b16
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion src/track/external-captions-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const VTT_POSTFIX: string = 'vtt';
class ExternalCaptionsHandler extends FakeEventTarget {

public static applyNativeTextTrackStyles(sheet: CSSStyleSheet, styles: TextStyle, containerId: string, engineClassName: string): void {
sheet.insertRule(`#${containerId} video.${engineClassName}::-webkit-media-text-track-display { ${styles.webkitTextCSS()} }`, 0);
sheet.insertRule(`#${containerId} video.${engineClassName}::-webkit-media-text-track-display { text-align: ${styles.textAlign}!important; }`, 0);
sheet.insertRule(`#${containerId} video.${engineClassName}::cue { ${styles.toCSS()} }`, 0);
}

Expand Down
7 changes: 0 additions & 7 deletions src/track/text-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,10 @@ class TextStyle {
attributes.push('font-family: ' + this.fontFamily);
attributes.push('color: ' + TextStyle.toRGBA(this.fontColor, this.fontOpacity));
attributes.push('background-color: ' + TextStyle.toRGBA(this.backgroundColor, this.backgroundOpacity));
attributes.push('font-size: ' + this.fontSize);
attributes.push('text-shadow: ' + this.getTextShadow());
return attributes.join('!important; ');
}

public webkitTextCSS(): string {
const attributes: Array<string> = [];
attributes.push('text-align: ' + this.textAlign);
attributes.push(`background: linear-gradient(0deg, ${TextStyle.toRGBA(this.backgroundColor, this.fontOpacity)}, ${TextStyle.toRGBA(this.backgroundColor, this.fontOpacity)})`);
return attributes.join('!important; ');
}
/**
* clones the textStyle object
* @returns {TextStyle} the cloned textStyle object
Expand Down

0 comments on commit 5f10b16

Please sign in to comment.