Documentation
Player integration with closed CDN service
Overview
With properly set up architecture components, it is possible to make the resources of the corresponding lesson available only to those users who are authorized to use resources from that lesson. This documentation focuses on functions that must be used to set up the Player to work with a solution for content delivery with licensing.
Player set-up
The Player must be configured to work with the CDN service before running the command that loads the XML content of the lesson (like player.load command). To configure the Player for this purpose, there are three commands available under the player.getRequestsConfig command from the Player. Each of them must be used.
Function | Description |
---|---|
setSigningPrefix(signingPrefix) | This command allows setting the string that will be used by the Player to sign URLs. This command does not make all requests signed. Signing URLs will work also with URLs that already have other parameters in the URL. |
setIncludeCredentials(withCredentials) | This command allows setting if credentials (with cookies like Signed cookie) will be sent for some of the resource requests (including cross-origin requests). This command does not make every request from the Player to be sent with credentials. |
addPageToWhitelist(url) | This command works with the signing URLs functionality. Adds text fragments to the whitelist. If the request URL should get a parameter (signingPrefix) and contains a text fragment added to the whitelist, then the URL will get the parameter therefore becoming a signed URL. |
Adjustment of private addons
In some cases, for private addons to work with solutions for content delivery with licensing, they must obtain and then use some of the above information. For this purpose, the getRequestsConfig command was added to the Player Services.