videojs / http-streaming

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

fix(live): cue end time not finite #1411

Closed adrums86 closed 1 year ago

adrums86 commented 1 year ago

Description

When creating metadata cues, the last cue uses the videoDuration as the end time, in live playback this is Infinity and throws an error.

Specific Changes proposed

Add an isFinite check to the duration, if it's not finite we use 0 instead.

Requirements Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #1411 (8acd120) into main (a9ff947) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1411   +/-   ##
=======================================
  Coverage   85.56%   85.56%           
=======================================
  Files          41       41           
  Lines       10146    10147    +1     
  Branches     2352     2353    +1     
=======================================
+ Hits         8681     8682    +1     
  Misses       1465     1465           
Files Changed Coverage Δ
src/util/text-tracks.js 89.47% <100.00%> (+0.07%) :arrow_up:

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