You can override settings on a per-request basis
You can include query string parameters in requests for the manifest, to customize its content. The settings specified in a query string take precedence over the settings you've defined in the Manifest Personalization rule.
How does it work?
- Set the Enable Query Param based Personalization switch to "On."
- You need to set up request URLs for your clients to include the appropriate query string values.
- As the request comes in from a specific client, it's query string parameters override what you've set in the AMD property for Manifest Personalization.
This can be applied for both Modes—Best Practice and Manual.
Available query string values
With Enable Query Param based Personalization enabled, you can use the following values in a request's query string:
__b__: Include this in the string and specify a desired bitrate (in kbps) to set a "Preferred Bitrate." This determines which media playlist (the
#EXT-X-STREAM-INFtag) is listed first in the manifest, within a tolerance of ±100 kbps of each value. (So, the playlist that matches closest to the query string-set bitrate is listed first.) Note that the "
b" in this value is prefaced and followed by two simultaneous underscore characters.
b-in: Include this in the string and include a comma-separated list of bitrate values in kbps (100,200,400) to filter in "Bitrates to Keep." This lets you control which media playlists (the
#EXT-X-STREAM-INFtag) are kept in the manifest, within a tolerance of ±100 kbps of each value.
b-in-range: Include this in the string and include a comma-separated list of bitrate ranges in kbps (100-400,1000-4000) to filter in "Bitrates to Keep." Only media playlists (the
#EXT-X-STREAM-INFtag) within the specified bitrate ranges are kept in the manifest.
Here's an example of query string parameter usage:
- Secret Key for Honoring Query
Params (Optional): Use this to allow query string parameters only if the
request is accompanied by the appropriate token. You can manually input a key,
or use the cycle button () to automatically generate one
for you. You then need to use this key to generate a token (with the TokenAuth
2.0 library), and append that token as a query string in requests for the
manifest. (For example,
- TokenAuth 2.0 Token Generation SDKs: https://github.com/akamai?utf8=%E2%9C%93&q=token&type=&language= (You can obtain the SDKs here, and README files are available that offer instructions on use.)
- Sample command to
generate a token using our TokenAuth 2.0 python library: In the
nspecifies the token name,
wspecifies the token validity window,
kspecifies the secret key, and
aspecifies the access list.
python cms_edgeauth.py -n mper -w 31536000 -k abc123 -a '/*'
- Transition Key (Optional): If necessary, specify a secondary key for query string parameter verification. This is also a TokenAuth 2.0 version key that is used for transition purposes, in the event that you disable or end-of-life what you have set as the Secret Key for Honoring Query Params key.