bitmovin-player-ui 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/css/bitmovinplayer-ui.css +1 -1
- package/dist/css/bitmovinplayer-ui.css.map +1 -1
- package/dist/js/bitmovinplayer-ui.js +1 -1
- package/dist/js/bitmovinplayer-ui.js.map +1 -1
- package/dist/js/framework/components/Icon.d.ts +2 -13
- package/dist/js/framework/components/Icon.js +2 -3
- package/dist/js/framework/components/RecommendationItem.js +1 -1
- package/dist/js/framework/components/buttons/Button.js +1 -1
- package/dist/js/framework/components/labels/Label.js +1 -1
- package/dist/js/framework/components/overlays/SubtitleOverlay.d.ts +6 -9
- package/dist/js/framework/components/overlays/SubtitleOverlay.js +121 -119
- package/dist/js/framework/components/seekbar/SeekBarLabel.js +2 -2
- package/dist/js/framework/components/settings/subtitlesettings/FontSizeSelectBox.js +5 -4
- package/dist/js/framework/main.d.ts +1 -1
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/AdClickOverlay.html +28 -28
- package/docs/classes/AdControlBar.html +31 -31
- package/docs/classes/AdCounterLabel.html +31 -31
- package/docs/classes/AdMessageLabel.html +31 -31
- package/docs/classes/AdSkipButton.html +27 -27
- package/docs/classes/AdStatusOverlay.html +31 -31
- package/docs/classes/AirPlayToggleButton.html +35 -35
- package/docs/classes/AudioQualitySelectBox.html +38 -38
- package/docs/classes/AudioTrackListBox.html +39 -39
- package/docs/classes/AudioTrackSelectBox.html +38 -38
- package/docs/classes/BackgroundColorSelectBox.html +38 -38
- package/docs/classes/BackgroundOpacitySelectBox.html +38 -38
- package/docs/classes/BrowserUtils.html +2 -2
- package/docs/classes/BufferingOverlay.html +31 -31
- package/docs/classes/Button.html +27 -27
- package/docs/classes/CastStatusOverlay.html +31 -31
- package/docs/classes/CastToggleButton.html +35 -35
- package/docs/classes/CastUIContainer.html +31 -31
- package/docs/classes/CharacterEdgeSelectBox.html +38 -38
- package/docs/classes/ClickOverlay.html +28 -28
- package/docs/classes/CloseButton.html +27 -27
- package/docs/classes/Component.html +25 -25
- package/docs/classes/Container.html +31 -31
- package/docs/classes/ControlBar.html +31 -31
- package/docs/classes/DynamicSettingsPanelItem.html +33 -33
- package/docs/classes/ErrorMessageOverlay.html +31 -31
- package/docs/classes/FontColorSelectBox.html +38 -38
- package/docs/classes/FontFamilySelectBox.html +38 -38
- package/docs/classes/FontOpacitySelectBox.html +38 -38
- package/docs/classes/FontSizeSelectBox.html +38 -38
- package/docs/classes/FullscreenToggleButton.html +35 -35
- package/docs/classes/HugePlaybackToggleButton.html +35 -35
- package/docs/classes/HugeReplayButton.html +27 -27
- package/docs/classes/I18n.html +2 -2
- package/docs/classes/Icon.html +25 -25
- package/docs/classes/ItemSelectionList.html +38 -38
- package/docs/classes/Label.html +31 -31
- package/docs/classes/ListBox.html +39 -39
- package/docs/classes/ListSelector.html +38 -38
- package/docs/classes/MetadataLabel.html +31 -31
- package/docs/classes/NavigationGroup.html +10 -10
- package/docs/classes/PictureInPictureToggleButton.html +35 -35
- package/docs/classes/PlaybackSpeedSelectBox.html +38 -38
- package/docs/classes/PlaybackTimeLabel.html +32 -32
- package/docs/classes/PlaybackToggleButton.html +35 -35
- package/docs/classes/PlaybackToggleOverlay.html +31 -31
- package/docs/classes/PlayerUtils.LiveStreamDetector.html +2 -2
- package/docs/classes/PlayerUtils.TimeShiftAvailabilityDetector.html +2 -2
- package/docs/classes/PlayerWrapper.html +4 -4
- package/docs/classes/QuickSeekButton.html +27 -27
- package/docs/classes/RecommendationItem.html +25 -25
- package/docs/classes/RecommendationOverlay.html +31 -31
- package/docs/classes/ReplayButton.html +27 -27
- package/docs/classes/RootNavigationGroup.html +10 -10
- package/docs/classes/SeekBar.html +36 -36
- package/docs/classes/SeekBarLabel.html +35 -35
- package/docs/classes/SelectBox.html +38 -38
- package/docs/classes/SettingsPanel.html +39 -39
- package/docs/classes/SettingsPanelItem.html +33 -33
- package/docs/classes/SettingsPanelNavigationGroup.html +10 -10
- package/docs/classes/SettingsPanelNavigationGroupConfig.html +2 -2
- package/docs/classes/SettingsPanelPage.html +33 -33
- package/docs/classes/SettingsPanelPageBackButton.html +29 -29
- package/docs/classes/SettingsPanelPageOpenButton.html +29 -29
- package/docs/classes/SettingsToggleButton.html +35 -35
- package/docs/classes/Spacer.html +25 -25
- package/docs/classes/SpatialNavigation.html +4 -4
- package/docs/classes/SubtitleListBox.html +39 -39
- package/docs/classes/SubtitleOverlay.html +31 -34
- package/docs/classes/SubtitleSelectBox.html +38 -38
- package/docs/classes/SubtitleSettingSelectBox.html +38 -38
- package/docs/classes/SubtitleSettingsPanelPage.html +33 -33
- package/docs/classes/SubtitleSettingsResetButton.html +27 -27
- package/docs/classes/TitleBar.html +31 -31
- package/docs/classes/ToggleButton.html +35 -35
- package/docs/classes/UIContainer.html +31 -31
- package/docs/classes/UIInstanceManager.html +14 -14
- package/docs/classes/UIManager.html +14 -14
- package/docs/classes/VRToggleButton.html +35 -35
- package/docs/classes/VideoQualitySelectBox.html +39 -39
- package/docs/classes/VolumeControlButton.html +33 -33
- package/docs/classes/VolumeSlider.html +36 -36
- package/docs/classes/VolumeToggleButton.html +35 -35
- package/docs/classes/Watermark.html +28 -28
- package/docs/classes/WindowColorSelectBox.html +38 -38
- package/docs/classes/WindowOpacitySelectBox.html +38 -38
- package/docs/enums/ButtonStyle.html +5 -5
- package/docs/enums/LabelStyle.html +4 -4
- package/docs/enums/MetadataLabelContent.html +3 -3
- package/docs/enums/NavigationDirection.html +2 -2
- package/docs/enums/PlaybackTimeLabelMode.html +5 -5
- package/docs/enums/PlayerUtils.PlayerState.html +2 -2
- package/docs/enums/UIUtils.KeyCode.html +2 -2
- package/docs/enums/ViewMode.html +3 -3
- package/docs/functions/ArrayUtils.remove.html +1 -1
- package/docs/functions/ErrorUtils.defaultMobileV3ErrorMessageTranslator.html +1 -1
- package/docs/functions/PlayerUtils.clampValueToRange.html +1 -1
- package/docs/functions/PlayerUtils.getCurrentTimeRelativeToSeekableRange.html +1 -1
- package/docs/functions/PlayerUtils.getSeekableRangeRespectingLive.html +1 -1
- package/docs/functions/PlayerUtils.getSeekableRangeStart.html +1 -1
- package/docs/functions/PlayerUtils.getState.html +1 -1
- package/docs/functions/PlayerUtils.isTimeShiftAvailable.html +1 -1
- package/docs/functions/StorageUtils.getItem.html +1 -1
- package/docs/functions/StorageUtils.getObject.html +1 -1
- package/docs/functions/StorageUtils.setItem.html +1 -1
- package/docs/functions/StorageUtils.setObject.html +1 -1
- package/docs/functions/StorageUtils.setStorageApiDisabled.html +1 -1
- package/docs/functions/StringUtils.replaceAdMessagePlaceholders.html +1 -1
- package/docs/functions/StringUtils.secondsToText.html +1 -1
- package/docs/functions/StringUtils.secondsToTime.html +1 -1
- package/docs/functions/UIFactory.buildCastReceiverUI.html +1 -1
- package/docs/functions/UIFactory.buildSmallScreenUI.html +1 -1
- package/docs/functions/UIFactory.buildSubtitleUI.html +1 -1
- package/docs/functions/UIFactory.buildTvUI.html +1 -1
- package/docs/functions/UIFactory.buildUI.html +1 -1
- package/docs/functions/UIUtils.traverseTree.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/ActiveUiChangedArgs.html +3 -3
- package/docs/interfaces/AdControlBarConfig.html +12 -12
- package/docs/interfaces/AdSkipButtonConfig.html +16 -16
- package/docs/interfaces/BufferingOverlayConfig.html +13 -13
- package/docs/interfaces/ButtonConfig.html +14 -14
- package/docs/interfaces/ClickOverlayConfig.html +15 -15
- package/docs/interfaces/CloseButtonConfig.html +15 -15
- package/docs/interfaces/ComponentConfig.html +11 -11
- package/docs/interfaces/ComponentFocusChangedEventArgs.html +2 -2
- package/docs/interfaces/ComponentHoverChangedEventArgs.html +2 -2
- package/docs/interfaces/ContainerConfig.html +12 -12
- package/docs/interfaces/ControlBarConfig.html +12 -12
- package/docs/interfaces/DynamicSettingsPanelItemConfig.html +19 -19
- package/docs/interfaces/ErrorMessageMap.html +1 -1
- package/docs/interfaces/ErrorMessageOverlayConfig.html +13 -13
- package/docs/interfaces/ErrorMessageTranslator.html +1 -1
- package/docs/interfaces/ExternalRecommendationLink.html +3 -3
- package/docs/interfaces/InternalUIConfig.html +15 -15
- package/docs/interfaces/LabelConfig.html +14 -14
- package/docs/interfaces/ListBoxConfig.html +17 -17
- package/docs/interfaces/ListItem.html +2 -2
- package/docs/interfaces/ListItemFilter.html +1 -1
- package/docs/interfaces/ListItemLabelTranslator.html +1 -1
- package/docs/interfaces/ListSelectorConfig.html +11 -11
- package/docs/interfaces/LocalizationConfig.html +3 -3
- package/docs/interfaces/MetadataLabelConfig.html +15 -15
- package/docs/interfaces/PlaybackTimeLabelConfig.html +16 -16
- package/docs/interfaces/PlaybackToggleButtonConfig.html +19 -19
- package/docs/interfaces/PlaybackToggleOverlayConfig.html +13 -13
- package/docs/interfaces/PlayerUtils.LiveStreamDetectorEventArgs.html +2 -2
- package/docs/interfaces/PlayerUtils.TimeShiftAvailabilityChangedArgs.html +2 -2
- package/docs/interfaces/QuickSeekButtonConfig.html +15 -15
- package/docs/interfaces/RecommendationConfig.html +4 -4
- package/docs/interfaces/RecommendationItemConfig.html +12 -12
- package/docs/interfaces/SeekBarConfig.html +19 -19
- package/docs/interfaces/SeekBarLabelConfig.html +12 -12
- package/docs/interfaces/SeekBarMarker.html +2 -2
- package/docs/interfaces/SeekPreviewArgs.html +3 -3
- package/docs/interfaces/SeekPreviewEventArgs.html +4 -4
- package/docs/interfaces/SettingsPanelConfig.html +15 -15
- package/docs/interfaces/SettingsPanelItemConfig.html +17 -17
- package/docs/interfaces/SettingsPanelPageConfig.html +13 -13
- package/docs/interfaces/SettingsToggleButtonConfig.html +20 -20
- package/docs/interfaces/SubtitleSettingSelectBoxConfig.html +11 -11
- package/docs/interfaces/SubtitleSettingsPanelPageConfig.html +13 -13
- package/docs/interfaces/TimelineMarker.html +6 -6
- package/docs/interfaces/TitleBarConfig.html +13 -13
- package/docs/interfaces/ToggleButtonConfig.html +18 -18
- package/docs/interfaces/UIConditionContext.html +10 -10
- package/docs/interfaces/UIConditionResolver.html +1 -1
- package/docs/interfaces/UIConfig.html +14 -14
- package/docs/interfaces/UIContainerConfig.html +17 -17
- package/docs/interfaces/UIUtils.TreeTraversalCallback.html +1 -1
- package/docs/interfaces/UIVariant.html +2 -2
- package/docs/interfaces/ViewModeChangedEventArgs.html +2 -2
- package/docs/interfaces/Vocabularies.html +1 -1
- package/docs/interfaces/Vocabulary.html +2 -2
- package/docs/interfaces/VolumeControlButtonConfig.html +14 -14
- package/docs/interfaces/VolumeSliderConfig.html +21 -21
- package/docs/interfaces/WatermarkConfig.html +15 -15
- package/docs/interfaces/WrappedPlayer.html +2 -2
- package/docs/media/CHANGELOG.md +9 -0
- package/docs/modules.html +1 -1
- package/docs/types/CustomVocabulary.html +1 -1
- package/docs/types/LocalizableText.html +1 -1
- package/docs/types/Localizer.html +1 -1
- package/docs/variables/ErrorUtils.defaultErrorMessages.html +1 -1
- package/docs/variables/ErrorUtils.defaultWebErrorMessageTranslator.html +1 -1
- package/docs/variables/StringUtils.FORMAT_HHMMSS.html +1 -1
- package/docs/variables/StringUtils.FORMAT_MMSS.html +1 -1
- package/docs/variables/i18n.html +1 -1
- package/docs/variables/version.html +1 -1
- package/package.json +1 -1
- package/src/scss/components/overlays/_subtitle-overlay.scss +4 -9
- package/src/ts/components/Icon.ts +4 -17
- package/src/ts/components/RecommendationItem.ts +1 -1
- package/src/ts/components/buttons/Button.ts +1 -1
- package/src/ts/components/labels/Label.ts +1 -1
- package/src/ts/components/overlays/SubtitleOverlay.ts +138 -131
- package/src/ts/components/seekbar/SeekBarLabel.ts +2 -2
- package/src/ts/components/settings/subtitlesettings/FontSizeSelectBox.ts +7 -6
- package/src/ts/main.ts +1 -1
- package/docs/interfaces/IconConfig.html +0 -29
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import { Component, ComponentConfig } from './Component';
|
|
2
|
-
import { LocalizableText } from '../localization/i18n';
|
|
3
2
|
import { DOM } from '../DOM';
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
* WCAG20 standard for defining info about the component (usually the name)
|
|
7
|
-
*/
|
|
8
|
-
ariaLabel?: LocalizableText;
|
|
9
|
-
/**
|
|
10
|
-
* Alternative text for the icon, used for accessibility (e.g., screen readers).
|
|
11
|
-
*/
|
|
12
|
-
altText?: LocalizableText;
|
|
13
|
-
}
|
|
14
|
-
export declare class Icon extends Component<IconConfig> {
|
|
15
|
-
constructor(config: IconConfig);
|
|
3
|
+
export declare class Icon extends Component<ComponentConfig> {
|
|
4
|
+
constructor(config?: ComponentConfig);
|
|
16
5
|
protected toDomElement(): DOM;
|
|
17
6
|
}
|
|
@@ -17,11 +17,11 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.Icon = void 0;
|
|
19
19
|
var Component_1 = require("./Component");
|
|
20
|
-
var i18n_1 = require("../localization/i18n");
|
|
21
20
|
var DOM_1 = require("../DOM");
|
|
22
21
|
var Icon = /** @class */ (function (_super) {
|
|
23
22
|
__extends(Icon, _super);
|
|
24
23
|
function Icon(config) {
|
|
24
|
+
if (config === void 0) { config = {}; }
|
|
25
25
|
var _this = _super.call(this, config) || this;
|
|
26
26
|
_this.config = _this.mergeConfig(config, {
|
|
27
27
|
cssClass: 'ui-icon',
|
|
@@ -30,8 +30,7 @@ var Icon = /** @class */ (function (_super) {
|
|
|
30
30
|
}
|
|
31
31
|
Icon.prototype.toDomElement = function () {
|
|
32
32
|
return new DOM_1.DOM('div', {
|
|
33
|
-
class: this.getCssClasses()
|
|
34
|
-
'aria-label': i18n_1.i18n.performLocalization(this.config.ariaLabel || this.config.altText),
|
|
33
|
+
class: this.getCssClasses()
|
|
35
34
|
});
|
|
36
35
|
};
|
|
37
36
|
return Icon;
|
|
@@ -78,7 +78,7 @@ var RecommendationItem = /** @class */ (function (_super) {
|
|
|
78
78
|
}
|
|
79
79
|
var itemElement = new DOM_1.DOM(tagName, __assign(__assign({ id: this.config.id, class: this.getCssClasses() }, additionalAttributes), { tabindex: this.config.tabIndex.toString() }), this);
|
|
80
80
|
if (posterUrl) {
|
|
81
|
-
itemElement.css({ 'background-image': "url(".concat(posterUrl, ")") });
|
|
81
|
+
itemElement.css({ 'background-image': "url(\"".concat(posterUrl, "\")") });
|
|
82
82
|
}
|
|
83
83
|
var titleElement = new DOM_1.DOM('div', {
|
|
84
84
|
class: this.prefixCss('title-container'),
|
|
@@ -81,7 +81,7 @@ var Button = /** @class */ (function (_super) {
|
|
|
81
81
|
// Create the button element with the text label
|
|
82
82
|
var buttonElement = new DOM_1.DOM('button', buttonElementAttributes, this);
|
|
83
83
|
var addIconElement = function () {
|
|
84
|
-
var icon = new Icon_1.Icon(
|
|
84
|
+
var icon = new Icon_1.Icon();
|
|
85
85
|
buttonElement.append(icon.getDomElement());
|
|
86
86
|
};
|
|
87
87
|
var addLabelElement = function () {
|
|
@@ -85,7 +85,7 @@ var Label = /** @class */ (function (_super) {
|
|
|
85
85
|
_this.onClickEvent();
|
|
86
86
|
});
|
|
87
87
|
if (this.config.labelStyle !== LabelStyle.Text) {
|
|
88
|
-
var icon = new Icon_1.Icon(
|
|
88
|
+
var icon = new Icon_1.Icon();
|
|
89
89
|
switch (this.config.labelStyle) {
|
|
90
90
|
case LabelStyle.TextWithTrailingIcon:
|
|
91
91
|
wrapperElement.append(icon.getDomElement());
|
|
@@ -24,24 +24,21 @@ export declare class SubtitleOverlay extends Container<ContainerConfig> {
|
|
|
24
24
|
private subtitleContainerManager;
|
|
25
25
|
private static readonly CLASS_CONTROLBAR_VISIBLE;
|
|
26
26
|
private static readonly CLASS_CEA_608;
|
|
27
|
-
private static readonly
|
|
28
|
-
private static readonly
|
|
29
|
-
private
|
|
30
|
-
private
|
|
31
|
-
private CEA608_NUM_COLUMNS;
|
|
32
|
-
private CEA608_COLUMN_OFFSET;
|
|
27
|
+
private static readonly CEA608_NUM_ROWS;
|
|
28
|
+
private static readonly CEA608_NUM_COLUMNS;
|
|
29
|
+
private static readonly CEA608_COLUMN_OFFSET;
|
|
30
|
+
private static readonly DEFAULT_CAPTION_LEFT_OFFSET;
|
|
33
31
|
private cea608Enabled;
|
|
32
|
+
private cea608FontSizeFactor;
|
|
33
|
+
private ensureCea608GridSizeUpdated;
|
|
34
34
|
constructor(config?: ContainerConfig);
|
|
35
35
|
configure(player: PlayerAPI, uimanager: UIInstanceManager): void;
|
|
36
36
|
setFontSizeFactor(factor: number): void;
|
|
37
|
-
recalculateCEAGrid(): void;
|
|
38
37
|
detectCroppedSubtitleLabel(labelElement: HTMLElement): SubtitleCropDetectionResult;
|
|
39
38
|
handleSubtitleCropping(label: SubtitleLabel): void;
|
|
40
|
-
resolveRowNumber(row: number): number;
|
|
41
39
|
generateLabel(event: SubtitleCueEvent): SubtitleLabel;
|
|
42
40
|
filterFontSizeOptions: ListItemFilter;
|
|
43
41
|
resolveFontSizeFactor(value: string): number;
|
|
44
|
-
updateRegionRowPosition(r: SubtitleRegionContainer): void;
|
|
45
42
|
configureCea608Captions(player: PlayerAPI, uimanager: UIInstanceManager): void;
|
|
46
43
|
enablePreviewSubtitleLabel(): void;
|
|
47
44
|
removePreviewSubtitleLabel(): void;
|
|
@@ -34,14 +34,8 @@ var SubtitleOverlay = /** @class */ (function (_super) {
|
|
|
34
34
|
if (config === void 0) { config = {}; }
|
|
35
35
|
var _this = _super.call(this, config) || this;
|
|
36
36
|
_this.preprocessLabelEventCallback = new EventDispatcher_1.EventDispatcher();
|
|
37
|
-
_this.FONT_SIZE_FACTOR = 1;
|
|
38
|
-
// The number of rows in a cea608 grid
|
|
39
|
-
_this.CEA608_NUM_ROWS = SubtitleOverlay.DEFAULT_CEA608_NUM_ROWS;
|
|
40
|
-
// The number of columns in a cea608 grid
|
|
41
|
-
_this.CEA608_NUM_COLUMNS = SubtitleOverlay.DEFAULT_CEA608_NUM_COLUMNS;
|
|
42
|
-
// The offset in percent for one column (which is also the width of a column)
|
|
43
|
-
_this.CEA608_COLUMN_OFFSET = 100 / _this.CEA608_NUM_COLUMNS;
|
|
44
37
|
_this.cea608Enabled = false;
|
|
38
|
+
_this.cea608FontSizeFactor = 1;
|
|
45
39
|
_this.filterFontSizeOptions = function (listItem) {
|
|
46
40
|
if (_this.cea608Enabled && listItem.key !== null) {
|
|
47
41
|
var percent = parseInt(listItem.key, 10);
|
|
@@ -49,7 +43,6 @@ var SubtitleOverlay = /** @class */ (function (_super) {
|
|
|
49
43
|
}
|
|
50
44
|
return true;
|
|
51
45
|
};
|
|
52
|
-
_this.recalculateCEAGrid();
|
|
53
46
|
_this.previewSubtitleActive = false;
|
|
54
47
|
_this.previewSubtitle = new SubtitleLabel({ text: i18n_1.i18n.getLocalizer('subtitle.example') });
|
|
55
48
|
_this.config = _this.mergeConfig(config, {
|
|
@@ -116,6 +109,7 @@ var SubtitleOverlay = /** @class */ (function (_super) {
|
|
|
116
109
|
removedActiveCues.forEach(function (toRemove) {
|
|
117
110
|
_this.subtitleContainerManager.removeLabel(toRemove.label);
|
|
118
111
|
});
|
|
112
|
+
_this.updateComponents();
|
|
119
113
|
};
|
|
120
114
|
player.on(player.exports.PlayerEvent.AudioChanged, subtitleClearHandler);
|
|
121
115
|
player.on(player.exports.PlayerEvent.SubtitleDisabled, subtitleClearHandler);
|
|
@@ -126,11 +120,17 @@ var SubtitleOverlay = /** @class */ (function (_super) {
|
|
|
126
120
|
uimanager.onComponentShow.subscribe(function (component) {
|
|
127
121
|
if (component instanceof ControlBar_1.ControlBar) {
|
|
128
122
|
_this.getDomElement().addClass(_this.prefixCss(SubtitleOverlay.CLASS_CONTROLBAR_VISIBLE));
|
|
123
|
+
if (_this.cea608Enabled && _this.ensureCea608GridSizeUpdated) {
|
|
124
|
+
awaitTransitionEnd(_this.getDomElement()).then(_this.ensureCea608GridSizeUpdated);
|
|
125
|
+
}
|
|
129
126
|
}
|
|
130
127
|
});
|
|
131
128
|
uimanager.onComponentHide.subscribe(function (component) {
|
|
132
129
|
if (component instanceof ControlBar_1.ControlBar) {
|
|
133
130
|
_this.getDomElement().removeClass(_this.prefixCss(SubtitleOverlay.CLASS_CONTROLBAR_VISIBLE));
|
|
131
|
+
if (_this.cea608Enabled && _this.ensureCea608GridSizeUpdated) {
|
|
132
|
+
awaitTransitionEnd(_this.getDomElement()).then(_this.ensureCea608GridSizeUpdated);
|
|
133
|
+
}
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
this.configureCea608Captions(player, uimanager);
|
|
@@ -140,15 +140,7 @@ var SubtitleOverlay = /** @class */ (function (_super) {
|
|
|
140
140
|
SubtitleOverlay.prototype.setFontSizeFactor = function (factor) {
|
|
141
141
|
// We only allow range from 50% to 200% as suggested by spec
|
|
142
142
|
// https://www.ecfr.gov/current/title-47/part-79/section-79.103#p-79.103(c)(4)
|
|
143
|
-
this.
|
|
144
|
-
this.recalculateCEAGrid();
|
|
145
|
-
};
|
|
146
|
-
SubtitleOverlay.prototype.recalculateCEAGrid = function () {
|
|
147
|
-
// Needs to get recalculated in case the font size will change also we need to floor this
|
|
148
|
-
// to always align to the whole number represented in styles.
|
|
149
|
-
this.CEA608_NUM_ROWS = Math.floor(SubtitleOverlay.DEFAULT_CEA608_NUM_ROWS / Math.max(this.FONT_SIZE_FACTOR, 1));
|
|
150
|
-
this.CEA608_NUM_COLUMNS = Math.floor(SubtitleOverlay.DEFAULT_CEA608_NUM_COLUMNS / this.FONT_SIZE_FACTOR);
|
|
151
|
-
this.CEA608_COLUMN_OFFSET = 100 / this.CEA608_NUM_COLUMNS;
|
|
143
|
+
this.cea608FontSizeFactor = Math.max(0.5, Math.min(2, factor));
|
|
152
144
|
};
|
|
153
145
|
SubtitleOverlay.prototype.detectCroppedSubtitleLabel = function (labelElement) {
|
|
154
146
|
var parent = this.getDomElement().get(0);
|
|
@@ -181,15 +173,6 @@ var SubtitleOverlay = /** @class */ (function (_super) {
|
|
|
181
173
|
labelDomElement.removeCss('right');
|
|
182
174
|
}
|
|
183
175
|
};
|
|
184
|
-
SubtitleOverlay.prototype.resolveRowNumber = function (row) {
|
|
185
|
-
// In case there is a font size factor and the row from event would overflow
|
|
186
|
-
// we need to apply an offset so it gets rendered to visible area.
|
|
187
|
-
if (this.FONT_SIZE_FACTOR > 1 && row > this.CEA608_NUM_ROWS) {
|
|
188
|
-
var rowDelta = SubtitleOverlay.DEFAULT_CEA608_NUM_ROWS - this.CEA608_NUM_ROWS;
|
|
189
|
-
return row - rowDelta;
|
|
190
|
-
}
|
|
191
|
-
return row;
|
|
192
|
-
};
|
|
193
176
|
SubtitleOverlay.prototype.generateLabel = function (event) {
|
|
194
177
|
var _a;
|
|
195
178
|
// Sanitize cue data (must be done before the cue ID is generated in subtitleManager.cueEnter / update)
|
|
@@ -197,8 +180,8 @@ var SubtitleOverlay = /** @class */ (function (_super) {
|
|
|
197
180
|
// Sometimes the positions are undefined, we assume them to be zero.
|
|
198
181
|
// We need to keep track of the original row position in case of recalculation.
|
|
199
182
|
var originalRowNumber = ((_a = event.position) === null || _a === void 0 ? void 0 : _a.row) || 0;
|
|
200
|
-
if (event
|
|
201
|
-
event.position.row =
|
|
183
|
+
if (isCea608SubtitleCue(event)) {
|
|
184
|
+
event.position.row = event.position.row || 0;
|
|
202
185
|
event.position.column = event.position.column || 0;
|
|
203
186
|
region = region || "cea608-row-".concat(event.position.row);
|
|
204
187
|
}
|
|
@@ -216,39 +199,33 @@ var SubtitleOverlay = /** @class */ (function (_super) {
|
|
|
216
199
|
SubtitleOverlay.prototype.resolveFontSizeFactor = function (value) {
|
|
217
200
|
return parseInt(value) / 100;
|
|
218
201
|
};
|
|
219
|
-
SubtitleOverlay.prototype.updateRegionRowPosition = function (r) {
|
|
220
|
-
var _a;
|
|
221
|
-
var element = r.getDomElement().get()[0];
|
|
222
|
-
var label = r.getComponents()[0];
|
|
223
|
-
if (!element || !label) {
|
|
224
|
-
return;
|
|
225
|
-
}
|
|
226
|
-
var rowClassList = element.classList;
|
|
227
|
-
var originalRow = (_a = label.getConfig()) === null || _a === void 0 ? void 0 : _a.originalRowPosition;
|
|
228
|
-
var rowClassRegex = /subtitle-position-cea608-row-(\d+)/;
|
|
229
|
-
var currentClass = Array.from(rowClassList).find(function (cls) { return rowClassRegex.test(cls); });
|
|
230
|
-
if (!currentClass) {
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
var match = rowClassRegex.exec(currentClass);
|
|
234
|
-
var rowNumber = match ? parseInt(match[1], 10) : null;
|
|
235
|
-
var newRowNum = this.resolveRowNumber(originalRow !== null && originalRow !== void 0 ? originalRow : rowNumber);
|
|
236
|
-
var newClass = currentClass.replace(rowClassRegex, "subtitle-position-cea608-row-".concat(newRowNum));
|
|
237
|
-
rowClassList.replace(currentClass, newClass);
|
|
238
|
-
};
|
|
239
202
|
SubtitleOverlay.prototype.configureCea608Captions = function (player, uimanager) {
|
|
240
203
|
var _this = this;
|
|
241
|
-
|
|
204
|
+
var _a;
|
|
205
|
+
/** The calculated row height in px */
|
|
206
|
+
var rowHeight = 0;
|
|
207
|
+
/** The calculated font size in px */
|
|
242
208
|
var fontSize = 0;
|
|
243
|
-
|
|
209
|
+
/**
|
|
210
|
+
* The ratio of the font size of 100% to the row height.
|
|
211
|
+
* e.g. font size 100% fills up 75% of the available row height
|
|
212
|
+
*/
|
|
213
|
+
var fontSize100PercentRatio = 0.75;
|
|
214
|
+
/** The required letter spacing spread the text characters evenly across the grid */
|
|
244
215
|
var fontLetterSpacing = 0;
|
|
245
|
-
|
|
246
|
-
var
|
|
247
|
-
|
|
216
|
+
/** The ratio of the caption window/row height that is used as margin so that the window encloses the caption */
|
|
217
|
+
var windowMarginRatio = 0.2;
|
|
218
|
+
/** The calculated window margin in px */
|
|
219
|
+
var windowMargin;
|
|
220
|
+
/** Flag telling if the CEA-608 rendering mode is currently enabled */
|
|
248
221
|
this.cea608Enabled = false;
|
|
222
|
+
/** Track last known grid params to avoid unnecessary recalculations */
|
|
223
|
+
var lastCeaGridRecalculation = { overlayWidth: 0, overlayHeight: 0, fontSizeFactor: 0 };
|
|
249
224
|
var settingsManager = uimanager.getSubtitleSettingsManager();
|
|
250
|
-
|
|
251
|
-
|
|
225
|
+
if (settingsManager.fontSize.value != null) {
|
|
226
|
+
var fontSizeFactorSettings = this.resolveFontSizeFactor(settingsManager.fontSize.value);
|
|
227
|
+
this.setFontSizeFactor(fontSizeFactorSettings);
|
|
228
|
+
}
|
|
252
229
|
settingsManager.fontSize.onChanged.subscribe(function (_sender, property) {
|
|
253
230
|
if (property.isSet()) {
|
|
254
231
|
// We need to convert from percent
|
|
@@ -258,9 +235,32 @@ var SubtitleOverlay = /** @class */ (function (_super) {
|
|
|
258
235
|
else {
|
|
259
236
|
_this.setFontSizeFactor(1);
|
|
260
237
|
}
|
|
261
|
-
|
|
238
|
+
if (_this.cea608Enabled) {
|
|
239
|
+
_this.ensureCea608GridSizeUpdated();
|
|
240
|
+
}
|
|
262
241
|
});
|
|
263
|
-
|
|
242
|
+
(_a = this.onShow) === null || _a === void 0 ? void 0 : _a.subscribe(function () {
|
|
243
|
+
// ensure CEA grid is updated whenever the overlay becomes visible
|
|
244
|
+
if (_this.cea608Enabled) {
|
|
245
|
+
_this.ensureCea608GridSizeUpdated();
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
this.ensureCea608GridSizeUpdated = function () {
|
|
249
|
+
var overlayElement = _this.getDomElement();
|
|
250
|
+
var currentWidth = overlayElement.width();
|
|
251
|
+
var currentHeight = overlayElement.height();
|
|
252
|
+
var hasOverlaySizeChanged = currentWidth !== lastCeaGridRecalculation.overlayWidth ||
|
|
253
|
+
currentHeight !== lastCeaGridRecalculation.overlayHeight;
|
|
254
|
+
var hasFontSizeFactorChanged = _this.cea608FontSizeFactor !== lastCeaGridRecalculation.fontSizeFactor;
|
|
255
|
+
if (!hasOverlaySizeChanged && !hasFontSizeFactorChanged) {
|
|
256
|
+
// none of the input variables changed, no need to recalculate
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
lastCeaGridRecalculation = {
|
|
260
|
+
overlayWidth: currentWidth,
|
|
261
|
+
overlayHeight: currentHeight,
|
|
262
|
+
fontSizeFactor: _this.cea608FontSizeFactor,
|
|
263
|
+
};
|
|
264
264
|
var dummyLabel = new SubtitleLabel({ text: 'X' });
|
|
265
265
|
dummyLabel.getDomElement().css({
|
|
266
266
|
// By using a large font size we do not need to use multiple letters and can get still an
|
|
@@ -272,8 +272,8 @@ var SubtitleOverlay = /** @class */ (function (_super) {
|
|
|
272
272
|
_this.addComponent(dummyLabel);
|
|
273
273
|
_this.updateComponents();
|
|
274
274
|
_this.show();
|
|
275
|
-
var dummyLabelCharWidth = dummyLabel.getDomElement().width()
|
|
276
|
-
var dummyLabelCharHeight = dummyLabel.getDomElement().height()
|
|
275
|
+
var dummyLabelCharWidth = dummyLabel.getDomElement().width();
|
|
276
|
+
var dummyLabelCharHeight = dummyLabel.getDomElement().height();
|
|
277
277
|
var fontSizeRatio = dummyLabelCharWidth / dummyLabelCharHeight;
|
|
278
278
|
_this.removeComponent(dummyLabel);
|
|
279
279
|
_this.updateComponents();
|
|
@@ -285,19 +285,22 @@ var SubtitleOverlay = /** @class */ (function (_super) {
|
|
|
285
285
|
// layouting, but the actual reason could not be determined. Aiming for a target width - 1px would work in
|
|
286
286
|
// most browsers, but Safari has a "quantized" font size rendering with huge steps in between so we need
|
|
287
287
|
// to subtract some more pixels to avoid line breaks there as well.
|
|
288
|
-
var
|
|
289
|
-
var subtitleOverlayWidth =
|
|
290
|
-
var subtitleOverlayHeight =
|
|
288
|
+
var subtitleOverlayWidthUsableRatio = 1 - parseFloat(SubtitleOverlay.DEFAULT_CAPTION_LEFT_OFFSET) / 100;
|
|
289
|
+
var subtitleOverlayWidth = Math.floor(subtitleOverlayWidthUsableRatio * currentWidth) - 10;
|
|
290
|
+
var subtitleOverlayHeight = currentHeight;
|
|
291
291
|
// The size ratio of the letter grid
|
|
292
|
-
var fontGridSizeRatio = (dummyLabelCharWidth *
|
|
292
|
+
var fontGridSizeRatio = (dummyLabelCharWidth * SubtitleOverlay.CEA608_NUM_COLUMNS) /
|
|
293
|
+
(dummyLabelCharHeight * SubtitleOverlay.CEA608_NUM_ROWS);
|
|
293
294
|
// The size ratio of the available space for the grid
|
|
294
295
|
var subtitleOverlaySizeRatio = subtitleOverlayWidth / subtitleOverlayHeight;
|
|
295
296
|
if (subtitleOverlaySizeRatio > fontGridSizeRatio) {
|
|
296
297
|
// When the available space is wider than the text grid, the font size is simply
|
|
297
298
|
// determined by the height of the available space.
|
|
298
|
-
|
|
299
|
+
rowHeight = subtitleOverlayHeight / SubtitleOverlay.CEA608_NUM_ROWS;
|
|
300
|
+
var fontSize100Percent = rowHeight * (1 - windowMarginRatio) * fontSize100PercentRatio;
|
|
301
|
+
fontSize = fontSize100Percent * _this.cea608FontSizeFactor;
|
|
299
302
|
// Calculate the additional letter spacing required to evenly spread the text across the grid's width
|
|
300
|
-
var gridSlotWidth = subtitleOverlayWidth /
|
|
303
|
+
var gridSlotWidth = subtitleOverlayWidth / SubtitleOverlay.CEA608_NUM_COLUMNS;
|
|
301
304
|
var fontCharWidth = fontSize * fontSizeRatio;
|
|
302
305
|
fontLetterSpacing = Math.max(gridSlotWidth - fontCharWidth, 0);
|
|
303
306
|
}
|
|
@@ -305,82 +308,67 @@ var SubtitleOverlay = /** @class */ (function (_super) {
|
|
|
305
308
|
// When the available space is not wide enough, texts would vertically overlap if we take
|
|
306
309
|
// the height as a base for the font size, so we need to limit the height. We do that
|
|
307
310
|
// by determining the font size by the width of the available space.
|
|
308
|
-
|
|
311
|
+
rowHeight = subtitleOverlayWidth / SubtitleOverlay.CEA608_NUM_COLUMNS / fontSizeRatio;
|
|
312
|
+
var fontSize100Percent = rowHeight * (1 - windowMarginRatio) * fontSize100PercentRatio;
|
|
313
|
+
fontSize = fontSize100Percent * _this.cea608FontSizeFactor;
|
|
309
314
|
fontLetterSpacing = 0;
|
|
310
315
|
}
|
|
311
|
-
|
|
312
|
-
var newRowHeight = fontSize;
|
|
313
|
-
// Update row position of regions
|
|
314
|
-
var regions = _this.getComponents();
|
|
315
|
-
regions.forEach(function (r) {
|
|
316
|
-
if (r instanceof SubtitleRegionContainer) {
|
|
317
|
-
_this.updateRegionRowPosition(r);
|
|
318
|
-
}
|
|
319
|
-
});
|
|
316
|
+
windowMargin = rowHeight * windowMarginRatio;
|
|
320
317
|
// Update the CSS custom property on the overlay DOM element
|
|
321
318
|
overlayElement.get().forEach(function (el) {
|
|
322
|
-
el.style.setProperty('--cea608-row-height', "".concat(
|
|
319
|
+
el.style.setProperty('--cea608-row-height', "".concat(rowHeight, "px"));
|
|
323
320
|
});
|
|
324
321
|
// Update font-size of all active subtitle labels
|
|
325
322
|
var updateLabel = function (label) {
|
|
326
|
-
var isLargerFontSize = _this.FONT_SIZE_FACTOR > 1;
|
|
327
323
|
label.getDomElement().css({
|
|
328
324
|
'font-size': "".concat(fontSize, "px"),
|
|
329
|
-
'line-height': "".concat(
|
|
330
|
-
'letter-spacing': "".concat(
|
|
331
|
-
'white-space': "".concat(isLargerFontSize ? 'nowrap' : 'normal'),
|
|
332
|
-
left: isLargerFontSize && '0%',
|
|
325
|
+
'line-height': "".concat(rowHeight - windowMargin, "px"),
|
|
326
|
+
'letter-spacing': "".concat(fontLetterSpacing, "px"),
|
|
333
327
|
});
|
|
334
|
-
label.regionStyle = "
|
|
328
|
+
label.regionStyle = "margin: ".concat(windowMargin / 2, "px; height: ").concat(rowHeight, "px");
|
|
335
329
|
};
|
|
336
330
|
for (var _i = 0, _a = _this.getComponents(); _i < _a.length; _i++) {
|
|
337
|
-
var
|
|
338
|
-
if (
|
|
339
|
-
|
|
331
|
+
var childComponent = _a[_i];
|
|
332
|
+
if (childComponent instanceof SubtitleRegionContainer) {
|
|
333
|
+
childComponent.getDomElement().css({
|
|
334
|
+
margin: "".concat(windowMargin / 2, "px"),
|
|
335
|
+
height: "".concat(rowHeight, "px"),
|
|
336
|
+
});
|
|
337
|
+
childComponent.getComponents().forEach(function (l) {
|
|
340
338
|
updateLabel(l);
|
|
341
339
|
});
|
|
342
340
|
}
|
|
343
|
-
if (
|
|
344
|
-
updateLabel(
|
|
341
|
+
if (childComponent instanceof SubtitleLabel) {
|
|
342
|
+
updateLabel(childComponent);
|
|
345
343
|
}
|
|
346
344
|
}
|
|
347
345
|
};
|
|
348
346
|
player.on(player.exports.PlayerEvent.PlayerResized, function () {
|
|
349
347
|
if (_this.cea608Enabled) {
|
|
350
|
-
|
|
351
|
-
}
|
|
352
|
-
else {
|
|
353
|
-
fontSizeCalculationRequired = true;
|
|
348
|
+
_this.ensureCea608GridSizeUpdated();
|
|
354
349
|
}
|
|
355
350
|
});
|
|
356
351
|
this.preprocessLabelEventCallback.subscribe(function (event, label) {
|
|
357
|
-
|
|
358
|
-
if (!isCEA608) {
|
|
352
|
+
if (!isCea608SubtitleCue(event)) {
|
|
359
353
|
// Skip all non-CEA608 cues
|
|
360
354
|
return;
|
|
361
355
|
}
|
|
362
356
|
if (!_this.cea608Enabled) {
|
|
363
357
|
_this.cea608Enabled = true;
|
|
364
358
|
_this.getDomElement().addClass(_this.prefixCss(SubtitleOverlay.CLASS_CEA_608));
|
|
365
|
-
// We conditionally update the font size by this flag here to avoid updating every time a subtitle
|
|
366
|
-
// is added into an empty overlay. Because we reset the overlay when all subtitles are gone, this
|
|
367
|
-
// would trigger an unnecessary update every time, but it's only required under certain conditions,
|
|
368
|
-
// e.g. after the player size has changed.
|
|
369
|
-
if (fontSizeCalculationRequired) {
|
|
370
|
-
updateCEA608FontSize();
|
|
371
|
-
fontSizeCalculationRequired = false;
|
|
372
|
-
}
|
|
373
359
|
}
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
360
|
+
var leftOffset = event.position.column * SubtitleOverlay.CEA608_COLUMN_OFFSET + '%';
|
|
361
|
+
if (leftOffset === '0%') {
|
|
362
|
+
// ensure that a little of the window still shows for better readability
|
|
363
|
+
leftOffset = SubtitleOverlay.DEFAULT_CAPTION_LEFT_OFFSET;
|
|
364
|
+
}
|
|
377
365
|
label.getDomElement().css({
|
|
378
|
-
left:
|
|
366
|
+
left: leftOffset,
|
|
379
367
|
'font-size': "".concat(fontSize, "px"),
|
|
380
|
-
'letter-spacing': "".concat(
|
|
381
|
-
'
|
|
368
|
+
'letter-spacing': "".concat(fontLetterSpacing, "px"),
|
|
369
|
+
'line-height': "".concat(rowHeight - windowMargin, "px"),
|
|
382
370
|
});
|
|
383
|
-
label.regionStyle = "
|
|
371
|
+
label.regionStyle = "margin: ".concat(windowMargin / 2, "px; height: ").concat(rowHeight, "px");
|
|
384
372
|
});
|
|
385
373
|
var reset = function () {
|
|
386
374
|
_this.getDomElement().removeClass(_this.prefixCss(SubtitleOverlay.CLASS_CEA_608));
|
|
@@ -414,8 +402,10 @@ var SubtitleOverlay = /** @class */ (function (_super) {
|
|
|
414
402
|
};
|
|
415
403
|
SubtitleOverlay.CLASS_CONTROLBAR_VISIBLE = 'controlbar-visible';
|
|
416
404
|
SubtitleOverlay.CLASS_CEA_608 = 'cea608';
|
|
417
|
-
SubtitleOverlay.
|
|
418
|
-
SubtitleOverlay.
|
|
405
|
+
SubtitleOverlay.CEA608_NUM_ROWS = 15;
|
|
406
|
+
SubtitleOverlay.CEA608_NUM_COLUMNS = 32;
|
|
407
|
+
SubtitleOverlay.CEA608_COLUMN_OFFSET = 100 / SubtitleOverlay.CEA608_NUM_COLUMNS;
|
|
408
|
+
SubtitleOverlay.DEFAULT_CAPTION_LEFT_OFFSET = '0.5%';
|
|
419
409
|
return SubtitleOverlay;
|
|
420
410
|
}(Container_1.Container));
|
|
421
411
|
exports.SubtitleOverlay = SubtitleOverlay;
|
|
@@ -645,17 +635,11 @@ var SubtitleRegionContainerManager = /** @class */ (function () {
|
|
|
645
635
|
if (label.regionStyle) {
|
|
646
636
|
regionContainer.getDomElement().attr('style', label.regionStyle);
|
|
647
637
|
}
|
|
648
|
-
|
|
649
|
-
/**
|
|
650
|
-
* If there is no region present to wrap the Cue Box, the Cue box becomes the
|
|
651
|
-
* region itself. Therefore the positioning values have to come from the box.
|
|
652
|
-
*/
|
|
638
|
+
if (label.vtt) {
|
|
653
639
|
regionContainer.getDomElement().css('position', 'static');
|
|
654
640
|
}
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
regionContainer.getDomElement();
|
|
658
|
-
}
|
|
641
|
+
// getDomElement needs to be called at least once to ensure the component exists
|
|
642
|
+
regionContainer.getDomElement();
|
|
659
643
|
for (var regionContainerId_1 in this.subtitleRegionContainers) {
|
|
660
644
|
this.subtitleOverlay.addComponent(this.subtitleRegionContainers[regionContainerId_1]);
|
|
661
645
|
}
|
|
@@ -730,3 +714,21 @@ var SubtitleRegionContainer = /** @class */ (function (_super) {
|
|
|
730
714
|
return SubtitleRegionContainer;
|
|
731
715
|
}(Container_1.Container));
|
|
732
716
|
exports.SubtitleRegionContainer = SubtitleRegionContainer;
|
|
717
|
+
function isCea608SubtitleCue(cue) {
|
|
718
|
+
return cue.position != null;
|
|
719
|
+
}
|
|
720
|
+
function awaitTransitionEnd(domElement) {
|
|
721
|
+
var hasTransition = getComputedStyle(domElement.get(0)).transitionProperty !== 'none';
|
|
722
|
+
if (!hasTransition) {
|
|
723
|
+
return Promise.resolve();
|
|
724
|
+
}
|
|
725
|
+
return new Promise(function (resolve) {
|
|
726
|
+
var transitionHandler = function () {
|
|
727
|
+
domElement.off('transitionend', transitionHandler);
|
|
728
|
+
domElement.off('transitioncancel', transitionHandler);
|
|
729
|
+
resolve();
|
|
730
|
+
};
|
|
731
|
+
domElement.on('transitionend', transitionHandler);
|
|
732
|
+
domElement.on('transitioncancel', transitionHandler);
|
|
733
|
+
});
|
|
734
|
+
}
|
|
@@ -196,7 +196,7 @@ var SeekBarLabel = /** @class */ (function (_super) {
|
|
|
196
196
|
// A default value for width is set in the stylesheet and can be overwritten from there or anywhere else.
|
|
197
197
|
return {
|
|
198
198
|
display: 'inherit',
|
|
199
|
-
'background-image': "url(".concat(thumbnail.url, ")"),
|
|
199
|
+
'background-image': "url(\"".concat(thumbnail.url, "\")"),
|
|
200
200
|
'padding-bottom': "".concat(100 * aspectRatio, "%"),
|
|
201
201
|
'background-size': "".concat(sizeX, "% ").concat(sizeY, "%"),
|
|
202
202
|
'background-position': "-".concat(offsetX, "% -").concat(offsetY, "%"),
|
|
@@ -206,7 +206,7 @@ var SeekBarLabel = /** @class */ (function (_super) {
|
|
|
206
206
|
var aspectRatio = (1 / width) * height;
|
|
207
207
|
return {
|
|
208
208
|
display: 'inherit',
|
|
209
|
-
'background-image': "url(".concat(thumbnail.url, ")"),
|
|
209
|
+
'background-image': "url(\"".concat(thumbnail.url, "\")"),
|
|
210
210
|
'padding-bottom': "".concat(100 * aspectRatio, "%"),
|
|
211
211
|
'background-size': "100% 100%",
|
|
212
212
|
'background-position': "0 0",
|
|
@@ -62,10 +62,6 @@ var FontSizeSelectBox = /** @class */ (function (_super) {
|
|
|
62
62
|
FontSizeSelectBox.prototype.configure = function (player, uimanager) {
|
|
63
63
|
var _this = this;
|
|
64
64
|
_super.prototype.configure.call(this, player, uimanager);
|
|
65
|
-
this.populateItemsWithFilter();
|
|
66
|
-
this.onShow.subscribe(function () {
|
|
67
|
-
_this.populateItemsWithFilter();
|
|
68
|
-
});
|
|
69
65
|
this.settingsManager.fontSize.onChanged.subscribe(function (sender, property) {
|
|
70
66
|
if (property.isSet()) {
|
|
71
67
|
_this.toggleOverlayClass('fontsize-' + property.value);
|
|
@@ -78,6 +74,11 @@ var FontSizeSelectBox = /** @class */ (function (_super) {
|
|
|
78
74
|
this.onItemSelected.subscribe(function (sender, key) {
|
|
79
75
|
_this.settingsManager.fontSize.value = key;
|
|
80
76
|
});
|
|
77
|
+
this.onShow.subscribe(function () {
|
|
78
|
+
_this.populateItemsWithFilter();
|
|
79
|
+
});
|
|
80
|
+
// init
|
|
81
|
+
this.populateItemsWithFilter();
|
|
81
82
|
};
|
|
82
83
|
return FontSizeSelectBox;
|
|
83
84
|
}(SubtitleSettingSelectBox_1.SubtitleSettingSelectBox));
|
|
@@ -87,4 +87,4 @@ export { ReplayButton } from './components/buttons/ReplayButton';
|
|
|
87
87
|
export { QuickSeekButton, QuickSeekButtonConfig } from './components/buttons/QuickSeekButton';
|
|
88
88
|
export { ListSelector, ListSelectorConfig, ListItem, ListItemFilter, ListItemLabelTranslator, } from './components/lists/ListSelector';
|
|
89
89
|
export { AdStatusOverlay } from './components/ads/AdStatusOverlay';
|
|
90
|
-
export { Icon
|
|
90
|
+
export { Icon } from './components/Icon';
|
package/docs/assets/hierarchy.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
window.hierarchyData = "
|
|
1
|
+
window.hierarchyData = "eJydW1tz3LYO/i96Rk95v/gtTtOezLSnqd3mPHT6oOzSG421kkerTet28t87kHwhtVoJ3BePJ/6gDwBBggCYf4qubftDcfW74k6CEp6DtRq4YKCE+gOKLtzVYdNXbXMorv4pNP5oyn0oror3TR+6pqx/e/+2be6qXQHFfdVsiyuhDRTHri6uigoxd+UmHL6dwv/zud/XBRSbujwciquiP2y/QflvXmSKr1BwwSLK2xDuP3ThSxX+fNPtDiuMEzSBEIrN56redqEprn7nnvs/vkKhhIpUIFqbYWVCqpHR2tjP/yu/VLsSl+CHrj0+vBBz4Z6Jh6+Hw7cT6Fny8R8SYic5OGOR3kke0d+0bZ+hwgx8RQ1kNDZZ5b6vmt3hQ9mEOoN6SW5dB898pMP1se/bZoltROS4WGjnQSsmQWvBwAjJwFhmwXlpgTMp8CfuOwx8xsWJPqTQi6G54Scst6A106ANt2AcU8CZlnxUKQmMt23Td219XXZLbnpF5bhKGykHSq7ULCXJE1N49ma0ejScaxNp8f2xrg+bLoTm13a3q8N6rMxLrMckF8lJ8N/jLnyoy8dP5eaeSn1OhkAuvYvIXz5S7cOP5adQL7GegAl0mqslOtKKn5Ei5hot9ZwGRE9f4OU03wg7nP7caLuiRp4vTgSJ7jDWTHLvyl5/guQYbZkZjzvn7SkZyc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