dash.js icon indicating copy to clipboard operation
dash.js copied to clipboard

Feature: UrlQueryInfo and ExtUrlQueryInfo support

Open JoaquinBCh opened this issue 4 months ago • 3 comments

This PR implements UrlQueryInfo and ExtUrlQueryInfo

Summary

  • Implement includeInRequests and sameOriginOnly for ExtUrlQueryInfo
  • Implement useMPDUrlQuery and queryString for UrlQueryInfo and ExtUrlQueryInfo
  • Add support for urn:mpeg:dash:urlparam:2014 scheme in the manifest
  • Generate finalQueryStrings when a manifest update is triggered
  • Append finalQueryString to the request url in HTTPLoader
  • Create unit tests to validate useMPDUrlQuery, queryString, includeInRequests and sameOriginOnly
  • includeInRequest supported: segment, mpd, mpdpatch and steering

Assumptions

  • The initialQueryString is used to build the list of parameters added to the request, not the finalQueryString. The queryTemplate is not used for the initialQueryString, so it is not considered.
  • For mpd and mpdpatch requests, we return the query string from the properties configured at the manifest level. Properties configured at the Period, AdaptationSet, or Representation levels are not considered.
  • There is no distinction between mpd and mpdpatch when deciding whether to return a query string or not; both types of requests are treated the same.
  • For Media Segments or Initialization Segment requests, all properties configured up to the specific Representation level (manifest, period, adaptation set, and representation) are considered. Properties configured in periods or adaptation sets not related to the representation being requested are not considered.

Testing

Manifests with different UrlQuery configurations for testing:

  • UseMPDUrlQuery
    • The property is added in the video AdaptationSet, and the query parameters present in the manifest request are replicated because useMPDUrlQuery="true".
  • QueryString
    • A query string is added for the video AdaptationSet and in the 1080p Representation.
  • UseMPDUrlQuery and QueryString
    • UseMPDUrlQuery is set to true in the AdaptationSet, and a query string is configured for the video. Therefore, the query parameters from the AdaptationSet are replicated, and those defined in the query string are added.
  • IncludeInRequests segment
    • useMPDUrlQuery="true" in the video AdaptationSet, and includeInRequests is set to segment. The requests sent in the manifest are only added to segment requests.
  • IncludeInRequests mpd mpdpatch
    • useMPDUrlQuery="true" in the video AdaptationSet, and includeInRequests is set to mpd and mpdpatch. The requests sent in the manifest are only added to mpd or mpdpatch requests.
  • SameOriginOnly different origin
    • useMPDUrlQuery="true" and sameOriginOnly="true" in the video AdaptationSet. The origins of the subsequent requests are different from the manifest request, so the query parameters should not be added.
  • SameOriginOnly same origin
    • useMPDUrlQuery="true" and sameOriginOnly="true" in the video AdaptationSet. The origins of the subsequent requests are the same as the manifest request, so the query parameters should be added.
  • AdaptationSet and Repressentation
    • AdaptationSet and Representation with different queryStrings for the same query parameter. Duplicate query parameters are not added; instead, the query parameters from the Representation are used where they are configured.
  • Query params in Content Steering
    • includeInRequest configured to steering.

A sample page has been created to test all the listed manifests and view the requests made by the player. You can access it here: Sample Page for URL Query Info Testing

JoaquinBCh avatar Sep 27 '24 20:09 JoaquinBCh