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

HLS Interstitial: Add a way to configure 3rd party Asset List URLs #136

Open
nicolaslevy opened this issue Dec 5, 2024 · 1 comment
Open

Comments

@nicolaslevy
Copy link

Currently, it is possible to add HLS interstitials in two ways:

  • By providing a UUID of the interstitial content and specifying the moment to play the interstitial.
  • By adding a VMAP URL.

It is proposed to support a configuration option where the user can input a third-party URL to retrieve the AssetList to be played. For this option, it will still be necessary to specify the moment within the main content when the interstitial should be played.

By adding this option, it will be possible to integrate superstreamer with the VAST-2-SGAI project.

@matvp91
Copy link
Collaborator

matvp91 commented Dec 7, 2024

I like the idea of having stitcher insert date ranges without having to rely on its own asset list responses, went ahead and have a proof of concept available on a separate branch here: #138.

However, in its current form, I don't think this will make it to the next alpha release for several reasons we need to tackle first:

  • Manually inserting interstitials will change a bit when we streamline the API in Stitcher interstitials should be a discriminated union #131. Having a new type for manually inserting an asset list as opposed to a single asset or a VAST url makes sense. I'll pick this up shortly.
  • The current API reflects assets and not a single interstitial containing one or more assets. A quick example:
{
  "time": 10,
  "uri": "https://example.com/interstitial/1/master.m3u8"
},
{
  "time": 10,
  "uri": "https://example.com/interstitial/2/master.m3u8"
}

Would be resolved to a single interstitial, with two assets behind that. Internally, it'll look like this (heavily simplified though):

{
  dateRange: {session.startTime + 10}
  assets: [
    "https://example.com/interstitial/1/master.m3u8",
    "https://example.com/interstitial/2/master.m3u8"
  ]
}

Where as our own asset-list.json implementation would look up that particular date range and return the list of ASSETS.

The API does not permit us to mix our own asset list in combination with a custom one, and I don't think it should. You wouldn't want to tell the stitcher to use solely "custom asset list urls" or the current way of working. Add a custom URL in the mix, and all of sudden we can come up with a situation that looks like this:

{
  "time": 10,
  "uri": "https://example.com/interstitial/1/master.m3u8"
},
{
  "time": 10,
  "uri": "https://example.com/interstitial/2/master.m3u8"
},
{
  "time": 10,
  "assetListUrl": "https://my-own-domain.com/asset-list.json"
}

I'm not sure how that would fit in, as HLS has no way to specify multiple asset list endpoints for the same date range tag. There's a few angles to approach a "mixed" input. I'd love to hear your opinion on possible solutions, @nicolaslevy.

  1. Take this a bit further and have Superstreamer fetch the custom assetListUrl on the backend (the same logic would apply as if it was a VAST, there's no real difference here, "I need assets, give me them"). We can then merge both remote and our own own and use Superstreamer to provide the resolved asset list.
  2. Throw an error when we encounter a dateRange tag which resolves to both an assetListUrl and a uri / vastUrl. Basically permitting the idea of providing a custom asset list url in combination with our own.
  3. Be a bit smarter about this, when a dateRange tag contains both a uri and assetListUrl, we apply step 1. When a dateRange tag resolves solely to an assetListUrl, we'll apply it directly to EXT-X-DATERANGE. This covers all use cases but is more complex to implement.

We can definitely use the separate branch to proceed with the SGAI summerproject. Is that OK for you? If you need help setting things up, you know where to find me.

@matvp91 matvp91 moved this from Ready to Backlog in Release (v1.2.0, minor) Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants