videojs / mpd-parser

https://videojs.github.io/mpd-parser/
Other
79 stars 54 forks source link

fix unhandled exception #151

Closed apackouz closed 3 years ago

apackouz commented 3 years ago

cc captions may not have any values, for example if language is unknown value may be omitted. TypeError: Cannot read property 'split' of undefined

gkatsev commented 3 years ago

I could've sworn I tested it, but looking at the tests I added in the initial PR, I don't have any where the value is missing. https://github.com/videojs/mpd-parser/pull/131

codecov[bot] commented 3 years ago

Codecov Report

Merging #151 (1c72fa7) into main (313d6a7) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #151   +/-   ##
=======================================
  Coverage   92.84%   92.84%           
=======================================
  Files          17       17           
  Lines         657      657           
  Branches      212      214    +2     
=======================================
  Hits          610      610           
  Misses         47       47           
Impacted Files Coverage Δ
src/inheritAttributes.js 97.36% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 313d6a7...1c72fa7. Read the comment docs.

gkatsev commented 3 years ago

Also, I would recommend updating your manifests to include a value. The spec (ANSI_SCTE 214-1 2016) highly recommends including a value, even if it allows not having one.