Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moshe maor kaltura patch 4 #777

Merged
merged 3 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/run_canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- master
- patch-version
paths-ignore:
- '.github/workflows/**'

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@ We use [SemVer](http://semver.org/) for versioning. For the versions available,

## License

This project is licensed under the AGPL-3.0 License - see the [LICENSE.md](LICENSE.md) file for details
This project is licensed under the AGPL-3.0 License - see the [LICENSE.md](LICENSE.md) file for details


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 { text-align: ${styles.textAlign}!important; }`, 0);
sheet.insertRule(`#${containerId} video.${engineClassName}::-webkit-media-text-track-display { ${styles.webkitTextCSS()} }`, 0);
sheet.insertRule(`#${containerId} video.${engineClassName}::cue { ${styles.toCSS()} }`, 0);
}

Expand Down
7 changes: 7 additions & 0 deletions src/track/text-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,17 @@ 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
Loading