We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a8ab55 commit 71641aaCopy full SHA for 71641aa
src/js/tracks/text-track.js
@@ -395,7 +395,8 @@ class TextTrack extends Track {
395
addCue(originalCue) {
396
let cue = originalCue;
397
398
- if (cue.constructor && cue.constructor.name !== 'VTTCue') {
+ // Testing if the cue is a VTTCue in a way that survives minification
399
+ if (!('getCueAsHTML' in cue)) {
400
cue = new window.vttjs.VTTCue(originalCue.startTime, originalCue.endTime, originalCue.text);
401
402
for (const prop in originalCue) {
0 commit comments