Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #2400 issue - cues doesn't show up on browsers which addCue doesn't throw error with invalid structure #2431

Merged
merged 2 commits into from Dec 12, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/controller/timeline-controller.ts
Expand Up @@ -294,6 +294,7 @@ 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');
Yuvalke marked this conversation as resolved.
Show resolved Hide resolved
} catch (err) {
const textTrackCue = new (window as any).TextTrackCue(cue.startTime, cue.endTime, cue.text);
Yuvalke marked this conversation as resolved.
Show resolved Hide resolved
textTrackCue.id = cue.id;
Expand Down