Lumen help
Introduction
The content ID is an identifier used by our backend to match Mesh sources that are watching the same content. It is an optional parameter, and by default, we generate Content ID from the content URL by removing any query parameters and protocol from it.
contentIdGenerator - function (optional)
The default contentIdGenerator option is a function that generates a content ID from the content URL.
In some cases, you may need to implement your own content ID generation logic.
Generic example
Create your own function.
Then, pass the result in the wrapper constructor or the player conf object.
If not defined, Mesh Delivery will fall back to the default implementation.
Specific examples
1. Your content can be identified from the content URL path
Typical use cases: Multi-CDN or your own edge servers.
In our example, we only consider the URL path (we remove the URL host and query parameters).
2. Your content can be identified from a parameter from an external source
Typical use cases: content ID from your backend, or from outside of the player scope
In our example, we first store the content ID in a variable; we then create a function that will return this variable.
Explore CDN Mesh Delivery