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 contentId from the content URL by removing any query parameters and protocol from it.
In some cases, you might want to implement your own content ID generation logic.
- You must ensure that the generator function returns a string that identifies the content in a truly unique manner. Any ambiguity may result in matching Mesh sources that are not watching the same content together.
- We require the content identified by the same ID to be packaged identically. If packaging is handled at the origin, and edges are used as merely caches, it should be fine. On the other hand, if you are packaging at the edge, content coming from different edge servers must not be identified as the same content. We therefore advise using default ID generation logic only (full URL without the query string).
- Be careful about elements non-related to the content in your ID. For example, if you derive your content ID from its URL and you have a user-specific token in your query string, you must strip that token from the ID. Similarly, if you have query parameters identifying the device, you'll want to remove them if your content is packaged identically for all devices but keep it if the content is different for mobile and desktop