-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Feature: UrlQueryInfo and ExtUrlQueryInfo support #4578
base: development
Are you sure you want to change the base?
Feature: UrlQueryInfo and ExtUrlQueryInfo support #4578
Conversation
feature: urlQueryString first version returning initialQueryString params
@@ -1058,6 +1058,7 @@ function Settings() { | |||
supportedEssentialProperties: [ | |||
{ schemeIdUri: Constants.FONT_DOWNLOAD_DVB_SCHEME }, | |||
{ schemeIdUri: Constants.COLOUR_PRIMARIES_SCHEME_ID_URI, value: /1|5|6|7/ }, | |||
{ schemeIdUri: Constants.URL_QUERY_INFO_SCHEME }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this to the JSDoc description. see line 77 - 81
const queryTemplate = essentialProperty?.ExtUrlQueryInfo?.queryTemplate || essentialProperty?.UrlQueryInfo?.queryTemplate || ''; | ||
|
||
const initialQueryParams = buildInitialQueryParams(initialQueryString); | ||
if (queryTemplate === '$querypart$') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put $querypart$
in DashConstants
@@ -89,6 +91,7 @@ function HTTPLoader(cfg) { | |||
cmsdModel = CmsdModel(context).getInstance(); | |||
customParametersModel = CustomParametersModel(context).getInstance(); | |||
commonAccessTokenController = CommonAccessTokenController(context).getInstance(); | |||
extUrlQueryInfoController = ExtUrlQueryInfoController(context).getInstance(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the possibility to use dependency injection here instead of instantiation. Inject the singleton instance of extUrlQueryInfoController
in the setConfig
function, similar to what is done for commonAccessTokenController
. This allows easier unit testing later if required.
mpd; | ||
|
||
|
||
function generateQueryParams(resultObject, manifestObejc, propertyString, mpdUrlQuery, defaultInitialString) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Private function use underscore syntax: _generateQueryParams
}); | ||
} | ||
|
||
function parseQueryParams(queryParamString) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Private function use underscore syntax
} | ||
} | ||
} | ||
else if (request.type == 'MPD') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use types defined in HTTPRequest
class and strong equality
} | ||
else if (request.type == 'MPD') { | ||
if (mpd) { | ||
const inRequest = ['mpd', 'mpdpatch'].some(r => mpd.includeInRequests.includes(r)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These types should also go in DashConstants
|
||
function ExtUrlQueryInfoController() { | ||
let instance, | ||
mpd; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename mpd
to something more descriptive like mpdQueryStringInformation
or sth like that
mpd.finalQueryString = ''; | ||
const mpdUrlQuery = manifest.url.split('?')[1]; | ||
|
||
generateQueryParams(mpd, manifest, 'SupplementalProperty', mpdUrlQuery, ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand this function. The EssentialProperty
descriptor can also be present at MPD level from my understanding. In addition, the SupplementalProperty
descriptor can be present on AdaptationSet
and Representation
level.
From the 23009-1:
As defined by this specification, each of these descriptors may be present at the MPD, Adaptation Set or at the Representation level. Only SupplementalProperty descriptor may be present at the Period level.
mpd; | ||
|
||
|
||
function generateQueryParams(resultObject, manifestObejc, propertyString, mpdUrlQuery, defaultInitialString) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo manifestObejc
@JoaquinBCh : Thanks for the PR i added my review. In addition:
|
One more thing: Please add the sample page you implemented to the sample section in the |
This PR implements UrlQueryInfo and ExtUrlQueryInfo
Summary
Assumptions
mpd
andmpdpatch
when deciding whether to return a query string or not; both types of requests are treated the same.Testing
Manifests with different UrlQuery configurations for testing:
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