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

Metadata cues may have length zero #113

Merged
merged 2 commits into from
Nov 3, 2016

Conversation

dmlap
Copy link
Member

@dmlap dmlap commented Nov 3, 2016

It's not safe to assume that there is at least one element in metadata cues when addTextTrackData() is invoked. Double check the array is there and non-empty before tweaking start and end times. Add tests for that module.

It's not safe to assume that there is at least one element in metadata cues when addTextTrackData() is invoked. Double check the array is there and non-empty before tweaking start and end times. Add tests for that module.
@dmlap dmlap force-pushed the there-might-not-be-any-metadata-cues branch from b142419 to 3899bb0 Compare November 3, 2016 01:08
@forbesjo
Copy link
Contributor

forbesjo commented Nov 3, 2016

The same check should be added to https://github.com/videojs/videojs-contrib-media-sources/blob/master/src/html-media-source.js#L201

@mjneil
Copy link
Contributor

mjneil commented Nov 3, 2016

LGTM once @forbesjo suggestion is added

@ruchigupta19
Copy link
Contributor

LGTM as soon as @forbesjo suggestion is acknowledged

Empty arrays are truthy.
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.

4 participants