Skip to content

Commit

Permalink
fix(FEC-7317): check if VTTCue and TextTrackCue are not undefined (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
yairans committed Oct 19, 2017
1 parent 85ad548 commit 604f7a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/engines/html5/html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -770,9 +770,9 @@ export default class Html5 extends FakeEventTarget implements IEngine {
textTrack.mode = 'hidden';
for (let cue of textTrack.activeCues) {
//Normalize cues to be of type of VTT model
if (cue instanceof window.VTTCue) {
if (window.VTTCue && cue instanceof window.VTTCue) {
activeCues.push(cue);
} else if (cue instanceof window.TextTrackCue) {
} else if (window.TextTrackCue && cue instanceof window.TextTrackCue) {
activeCues.push(new Cue(cue.startTime, cue.endTime, cue.text));
}
}
Expand Down

0 comments on commit 604f7a6

Please sign in to comment.