Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

don't crash when segment metadata cues can't be created #1167

Merged
merged 2 commits into from
Jun 16, 2017

Conversation

mjneil
Copy link
Contributor

@mjneil mjneil commented Jun 16, 2017

A bad segment might trip up our segment probe. When trying to create the metadata cue for that segment, the player can crash. We shouldn't disrupt playback for something non-essential to playback

#1165

@@ -1086,6 +1086,11 @@ export default class SegmentLoader extends videojs.EventTarget {
const start = segment.start;
const end = segment.end;

// Do not try adding the cue if the start and end times are invalid.
if (!Number.isFinite(start) || !Number.isFinite(end)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isFinite is not supported in IE. Do we have a polyfill for it?

@mjneil mjneil merged commit d5ab234 into videojs:master Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants