Skip to content

Commit

Permalink
fix(FEC-11271):displaying .VTT captions not working properly for belo…
Browse files Browse the repository at this point in the history
…w video layout (#4228)

Issue:
when setting the captions layout to "below video" and playing .vtt captions- the captions are placed on the video as "on top" layout, instead of inside the container below the video.

Solution:
forcing inset=0 when layout=below video. In addition, added position=relative to parent class so captions will be placed according to the caption container and not to the video holder.

Solves FEC-11271
  • Loading branch information
lianbenjamin authored May 25, 2021
1 parent 818c996 commit 2c888ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/KalturaSupport/resources/mw.ClosedCaptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,13 @@
.css('pointer-events', 'auto')
.css('z-index', '3')
.css('pointer-events', 'none')
.css('position', 'relative')
);

if (this.getConfig('layout') === 'below') {
$(caption.content).css('inset', '0px');
}

this.displayTextTarget($textTarget);

var captionDiv = $('.caption div');
Expand Down

0 comments on commit 2c888ef

Please sign in to comment.