Skip to content

Commit

Permalink
fix(HLS): Omit daterange without START-DATE in order to avoid errors (#…
Browse files Browse the repository at this point in the history
…7841)

Per the HLS spec, we require a START-DATE for SCTE35-IN 
However, unlike for SCTE35-OUT and SCTE35-CMD, it’s not clear what that
value should be – and the HLS spec example does not include it.
  • Loading branch information
avelad committed Jan 10, 2025
1 parent f3c464b commit faf324d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/hls/hls_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3982,7 +3982,9 @@ shaka.hls.HlsParser = class {
}
let dateRangeTags =
shaka.hls.Utils.filterTagsByName(tags, 'EXT-X-DATERANGE');
dateRangeTags = dateRangeTags.sort((a, b) => {
dateRangeTags = dateRangeTags.filter((tag) => {
return tag.getAttribute('START-DATE') != null;
}).sort((a, b) => {
const aStartDateValue = a.getRequiredAttrValue('START-DATE');
const bStartDateValue = b.getRequiredAttrValue('START-DATE');
if (aStartDateValue < bStartDateValue) {
Expand Down

0 comments on commit faf324d

Please sign in to comment.