Skip to content

Commit

Permalink
update specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nfrederiksen committed Dec 18, 2024
1 parent c95b499 commit d5f4bad
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions spec/hlsvod_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3809,5 +3809,35 @@ describe("HLSVod delta time and positions", () => {
});
});
});

it("with Program date time enabled and VODs have HLS Interstitial Tag", (done) => {
mockVod = new HLSVod("http://mock.com/mock.m3u8", null, Date.now(), 0, null, {
sequenceAlwaysContainNewSegments: 0,
forcedDemuxMode: true,
});
mockVod2 = new HLSVod("http://mock.com/mock2.m3u8", null, Date.now() + 90000, 0, null, {
sequenceAlwaysContainNewSegments: 0,
forcedDemuxMode: true,
});
mockVod.load(mock_vod_3.master, mock_vod_3.media, mock_vod_3.audio).then(() => {
mockVod2.loadAfter(mockVod, mock_vod_3.master, mock_vod_3.media, mock_vod_3.audio).then(() => {
let m3u8 = mockVod2.getLiveMediaAudioSequences(0, "audio-aacl-256", "sv", 4);
let lines = m3u8.split("\n");
expect(
lines[16].includes('#EXT-X-DATERANGE:ID="ad1",CLASS="com.apple.hls.interstitial",START-DATE') &&
lines[16].includes(
',DURATION="15.0",X-ASSET-URI="http://example.com/ad1.m3u8",X-RESUME-OFFSET="0",X-RESTRICT="SKIP,JUMP",X-COM-EXAMPLE-BEACON="123"'
)
).toBe(true);
expect(
lines[17].includes('#EXT-X-DATERANGE:ID="ad1",CLASS="com.apple.hls.interstitial",START-DATE') &&
lines[16].includes(
',DURATION="15.0",X-ASSET-URI="http://example.com/ad1.m3u8",X-RESUME-OFFSET="0",X-RESTRICT="SKIP,JUMP",X-COM-EXAMPLE-BEACON="123"'
)
).toBe(false);
done();
});
});
});
});
});

0 comments on commit d5f4bad

Please sign in to comment.