diff --git a/src/js/tracks/text-track.js b/src/js/tracks/text-track.js index 05ddd4db52..5c94a709d7 100644 --- a/src/js/tracks/text-track.js +++ b/src/js/tracks/text-track.js @@ -391,7 +391,8 @@ class TextTrack extends Track { addCue(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); for (const prop in originalCue) {