Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add Support for HLS Interstitials - 1st Version #125

Merged
merged 4 commits into from
Nov 29, 2024

Conversation

Nfrederiksen
Copy link
Collaborator

This PR intends to resolve #76

However, it should be noted that for it to overwrite the START-DATE value one will need to load the HlsVod with a timeoffset/unixTs (third input argument). eg.

const myTimestamp = Date.now();
const myVod = new HLSVod("http://hlssource.vod.com/assets/master.m3u8", null, myTimestamp, 0, null, {
  forcedDemuxMode: true,
});

Another thing to remember is that this current version of the feature does not pass through VOD playlists-manifests with a daterange-tag under the endlist-tag. This is something the dependency @eyevinn/node-m3u8 will need to support in its parsing first.

What does work is if the VOD playlist-manifest has the daterange-tag anywhere else, above any 'segment'.
eg.

#EXTM3U
#EXT-X-VERSION:6
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-TARGETDURATION:3
#EXT-X-PROGRAM-DATE-TIME:1970-01-01T00:00:00.001Z
#EXT-X-MAP:URI="test-video=256000.m4s"
#EXTINF:10, no desc
test-video=2500000-1.m4s
#EXTINF:10, no desc
test-video=2500000-2.m4s
#EXTINF:10, no desc
test-video=2500000-3.m4s
#EXT-X-DATERANGE:ID="ad1",CLASS="com.apple.hls.interstitial",START-DATE="1970-01-01T00:00:35.001Z",DURATION=15.0,X-ASSET-URI="http://example.com/ad1.m3u8",X-RESUME-OFFSET=0, X-RESTRICT="SKIP,JUMP",X-COM-EXAMPLE-BEACON=123
#EXTINF:10, no desc
test-video=2500000-4.m4s
#EXT-X-ENDLIST

@Nfrederiksen Nfrederiksen merged commit 7f053d8 into master Nov 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass-through of HLS Interstitial tags in VOD2Live
1 participant