videojs / http-streaming

HLS, DASH, and future HTTP streaming protocols library for video.js
https://videojs-http-streaming.netlify.app/
Other
2.49k stars 422 forks source link

fix: error on undefined metadata frames #1383

Closed adrums86 closed 1 year ago

adrums86 commented 1 year ago

Description

Fixes an issue where an error is thrown when the frame of timed metadata is undefined

Specific Changes proposed

Add a check for !metadata.frames || !metadata.frames.length with an early return to the addMetadata function.

Requirements Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #1383 (a22c58c) into main (915bdee) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1383   +/-   ##
=======================================
  Coverage   85.35%   85.36%           
=======================================
  Files          40       40           
  Lines        9951     9953    +2     
  Branches     2306     2307    +1     
=======================================
+ Hits         8494     8496    +2     
  Misses       1457     1457           
Impacted Files Coverage Δ
src/util/text-tracks.js 86.53% <100.00%> (+0.26%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more