Skip to content

Commit

Permalink
fix(FEC-12539): Shaka text displayer font size too small on TVs - Reg…
Browse files Browse the repository at this point in the history
…ression (#210)

solves: FEC-12539 - Regression 

**issue:** the previous fix is incorrect since the media query refers to the screen size and not the player size

**fix:** The :fullscreen [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) [pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes) is not applied in samrtTvs, so instead i relying on the Env.IsSmartTv env variable
  • Loading branch information
JonathanTGold authored Oct 2, 2022
1 parent f224a1e commit 1041b0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dash-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ export default class DashAdapter extends BaseMediaSourceAdapter {
if (this._config.useShakaTextTrackDisplay) {
this._shaka.setVideoContainer(Utils.Dom.getElementBySelector('.playkit-subtitles'));
if (Env.isSmartTV) {
document.querySelector('.shaka-text-container').style.fontsize = '4.4vmin';
this._eventManager.listenOnce(this._videoElement, EventType.DURATION_CHANGE, () => {
document.querySelector('.shaka-text-container').style.fontSize = '4.4vmin';
});
}
}
}
Expand Down

0 comments on commit 1041b0a

Please sign in to comment.