Skip to content

Commit

Permalink
fix(FEC-12622): Revert - TV font size bug fixes - regression (#214)
Browse files Browse the repository at this point in the history
Revert - TV font size bug fixes - regression

revert all prsrelated to this bug: #208 #210 #205

solves: FEC-12622
  • Loading branch information
JonathanTGold authored Oct 3, 2022
1 parent 9d300bc commit 1ef471b
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/dash-adapter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @flow
import shaka from 'shaka-player';
import {
Env,
AudioTrack,
BaseMediaSourceAdapter,
Error,
Expand Down Expand Up @@ -404,26 +403,17 @@ export default class DashAdapter extends BaseMediaSourceAdapter {
//Need to call this again cause we are uninstalling the VTTCue polyfill to avoid collisions with other libs
shaka.polyfill.installAll();
this._shaka = new shaka.Player();
this._setTextDisplayer();
// This will force the player to use shaka UITextDisplayer plugin to render text tracks.
if (this._config.useShakaTextTrackDisplay) {
this._shaka.setVideoContainer(Utils.Dom.getElementBySelector('.playkit-subtitles'));
}
this._maybeSetFilters();
this._maybeSetDrmConfig();
this._maybeBreakStalls();
this._shaka.configure(this._config.shakaConfig);
this._addBindings();
}

_setTextDisplayer() {
// This will force the player to use shaka UITextDisplayer plugin to render text tracks.
if (this._config.useShakaTextTrackDisplay) {
this._shaka.setVideoContainer(Utils.Dom.getElementBySelector('.playkit-subtitles'));
if (Env.isSmartTV) {
this._eventManager.listenOnce(this._videoElement, EventType.DURATION_CHANGE, () => {
document.querySelector('.shaka-text-container').style.fontSize = '4.4vmin';
});
}
}
}

_clearStallInterval(): void {
if (this._stallInterval) {
clearInterval(this._stallInterval);
Expand Down

0 comments on commit 1ef471b

Please sign in to comment.