-
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
Implement HEADER transmission mode for CMCD data #3537
Comments
|
@wilaw We are currently working on the dynamic mode. For that purpose, we want to check if the CDN supports the CMCD headers. If thats the case we can switch between query parameter mode and header mode. In order to be able to access this information the following additional header field needs to be set: Could you add this to the CDN with the values: |
I could add this value, however the player is always going to encounter situations where the header is not present and it needs to be robust over those. The same is true if it tries to add a custom hearer to send the data. So I suggest the dynamic mode be built such that it tries to write the custom headers and reacts to the error if it can't. |
It was assumed that CMCD would always be more efficient to implement via query args, since the use of custom headers required an OPTIONs preflight request to be made to the origin. This is true for media objects requested via discreet GET requests. However, if range requests are used, such as with ondemand addressing in DASH, the the browser makes a new OPTIONS preflight for the range header with each new 'URL'. Since the query rgs are included in the definition of the URL, the browser ends up making a preflight request ahead of every single media sement request as soon as CMCD data is added. This is inefficient.
A solution is for dash.js to offer the HEADER mode of transmission, in which the CMCD data is carried in one of 4 headers (CMCD-Request,CMCD-Object,CMCD-Status,CMCD-Session). The first time these headers are sent, the browser will make a preflight request. This request, if successful, will be cached for the time defined by the Access-Control-Max-Age response header, which is usually longer than the content duration. This results in only one preflight request being made (satisfying the check for both the CMCD and range request headers) which is more efficient than the query arg mode for that ondemand profile.
Specifically, what is requested is
The text was updated successfully, but these errors were encountered: