Skip to content

Commit

Permalink
Modify caption container CSS so min-height will accommodate two lines…
Browse files Browse the repository at this point in the history
… of text
  • Loading branch information
terrill committed Mar 2, 2020
1 parent 091af84 commit c4445ea
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions build/ableplayer.dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -10125,15 +10125,15 @@ if (thisObj.useTtml && (trackSrc.endsWith('.xml') || trackText.startsWith('<?xml
opacity = parseFloat(this.prefCaptionsOpacity) / 100.0;
$element.css({
'font-family': this.prefCaptionsFont,
'font-size': this.prefCaptionsSize,
'color': this.prefCaptionsColor,
'background-color': this.prefCaptionsBGColor,
'opacity': opacity
});
if ($element === this.$captionsDiv) {
if (typeof this.$captionsWrapper !== 'undefined') {
lineHeight = parseInt(this.prefCaptionsSize,10) + 25;
this.$captionsWrapper.css('line-height',lineHeight + '%');
this.$captionsWrapper.css({
'font-size': this.prefCaptionsSize
});
}
}
if (this.prefCaptionsPosition === 'below') {
Expand Down
6 changes: 3 additions & 3 deletions build/ableplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10125,15 +10125,15 @@ if (thisObj.useTtml && (trackSrc.endsWith('.xml') || trackText.startsWith('<?xml
opacity = parseFloat(this.prefCaptionsOpacity) / 100.0;
$element.css({
'font-family': this.prefCaptionsFont,
'font-size': this.prefCaptionsSize,
'color': this.prefCaptionsColor,
'background-color': this.prefCaptionsBGColor,
'opacity': opacity
});
if ($element === this.$captionsDiv) {
if (typeof this.$captionsWrapper !== 'undefined') {
lineHeight = parseInt(this.prefCaptionsSize,10) + 25;
this.$captionsWrapper.css('line-height',lineHeight + '%');
this.$captionsWrapper.css({
'font-size': this.prefCaptionsSize
});
}
}
if (this.prefCaptionsPosition === 'below') {
Expand Down
2 changes: 1 addition & 1 deletion build/ableplayer.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/ableplayer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ableplayer",
"version": "4.2.24",
"version": "4.2.25",
"description": "fully accessible HTML5 media player",
"homepage": "http://ableplayer.github.io/ableplayer",
"bugs": "https://github.com/ableplayer/ableplayer/issues",
Expand Down
6 changes: 3 additions & 3 deletions scripts/caption.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,15 @@
opacity = parseFloat(this.prefCaptionsOpacity) / 100.0;
$element.css({
'font-family': this.prefCaptionsFont,
'font-size': this.prefCaptionsSize,
'color': this.prefCaptionsColor,
'background-color': this.prefCaptionsBGColor,
'opacity': opacity
});
if ($element === this.$captionsDiv) {
if (typeof this.$captionsWrapper !== 'undefined') {
lineHeight = parseInt(this.prefCaptionsSize,10) + 25;
this.$captionsWrapper.css('line-height',lineHeight + '%');
this.$captionsWrapper.css({
'font-size': this.prefCaptionsSize
});
}
}
if (this.prefCaptionsPosition === 'below') {
Expand Down
2 changes: 1 addition & 1 deletion styles/ableplayer.css
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ div.able-captions-overlay {
}
div.able-captions-below {
position: relative;
min-height: 2.8em;
min-height: 3.2em;
}
div.able-descriptions {
position: relative;
Expand Down

0 comments on commit c4445ea

Please sign in to comment.