Skip to content

Commit

Permalink
fix(FEC-7444): when selecting fullscreen in android captions size is …
Browse files Browse the repository at this point in the history
…too large (#327)

instead of relying on the height of the video to determine subtitles size, deciding on the dimention according to the box size. if height > width then using width. else -> using height.
  • Loading branch information
odedhutzler authored Dec 16, 2018
1 parent 4c3cf03 commit 23009e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/track/text-track-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,8 @@ function processCues(window, cues, overlay) {

let boxPositions = [],
containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),
fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;
dimensionSize = containerBox.height < containerBox.width ? containerBox.height : containerBox.width,
fontSize = Math.round(dimensionSize * FONT_SIZE_PERCENT * 100) / 100;
let styleOptions = {
font: fontSize * fontScale + 'px ' + FONT_STYLE
};
Expand Down

0 comments on commit 23009e3

Please sign in to comment.