mirror of
https://github.com/videojs/video.js.git
synced 2024-12-23 02:04:34 +02:00
fix: Resolves captions sizing issue when minified (#8442)
* fix: Resolves captions sizing issue when minified * Change test for minification
This commit is contained in:
parent
4f9e108fe6
commit
9267c46576
@ -391,7 +391,8 @@ class TextTrack extends Track {
|
|||||||
addCue(originalCue) {
|
addCue(originalCue) {
|
||||||
let cue = originalCue;
|
let cue = originalCue;
|
||||||
|
|
||||||
if (cue.constructor && cue.constructor.name !== 'VTTCue') {
|
// Testing if the cue is a VTTCue in a way that survives minification
|
||||||
|
if (!('getCueAsHTML' in cue)) {
|
||||||
cue = new window.vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text);
|
cue = new window.vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text);
|
||||||
|
|
||||||
for (const prop in originalCue) {
|
for (const prop in originalCue) {
|
||||||
|
Loading…
Reference in New Issue
Block a user