Skip to content

Commit

Permalink
add debug for this purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuvalke committed Nov 4, 2019
1 parent 71867a9 commit 23aeab1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/controller/timeline-controller.ts
Expand Up @@ -294,8 +294,11 @@ class TimelineController extends EventHandler {
if (!currentTrack.cues.getCueById(cue.id)) {
try {
currentTrack.addCue(cue);
if (!currentTrack.cues.getCueById(cue.id)) throw new Error('browser which doesnt throw error when cues structure is invalid');
if (!currentTrack.cues.getCueById(cue.id)) {
throw new Error(`addCue is failed for: ${cue}`);
}
} catch (err) {
logger.debug(`Failed occurred on adding cues: ${err}`);
const textTrackCue = new (window as any).TextTrackCue(cue.startTime, cue.endTime, cue.text);
textTrackCue.id = cue.id;
currentTrack.addCue(textTrackCue);
Expand Down

0 comments on commit 23aeab1

Please sign in to comment.