Skip to content

Commit

Permalink
Implement configurable subtitle style
Browse files Browse the repository at this point in the history
  • Loading branch information
jwbuiter committed Jan 21, 2021
1 parent 5090b50 commit f72ab71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cast.js
Expand Up @@ -297,6 +297,13 @@ class Castjs {
mediaInfo.textTrackStyle.fontScale = 1.0;
mediaInfo.textTrackStyle.foregroundColor = '#FFFFFF';

// Overwrite default subtitle track style with user defined values
// See https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TextTrackStyle for a list of all configurable properties
mediaInfo.textTrackStyle = {
...mediaInfo.textTrackStyle,
...this.subtitleStyle
};

var tracks = [];
for (var i in this.subtitles) {
// chrome.cast.media.TrackType.TEXT
Expand Down
2 changes: 1 addition & 1 deletion cast.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f72ab71

Please sign in to comment.