Skip to content

Allowing query-args to be transferred to catalog fields #75

@wilaw

Description

@wilaw

It is useful for advertising, watermarking and other per-session behaviors, to have a cacheable catalog with fields which the player then overwrites with information obtained out-of-band, such as via a query arg.

Imagine that the player is given a URL (format TBD) such as

https://example.com/appid?n=name-space-for-the-catalog&sid=custom-video-123456

The cached catalog would be

{
  "version": 1,
  "generatedAt": 1746104606044,
  "tracks": [
    {
      "name": "%sid%",
      "namespace": "conference.example.com/conference123/alice",
      "packaging": "loc",
      "isLive": true,
   ...
   ]
}

The player would apply the following rules

  1. Read the JSON file as a raw text string.
  2. Perform a simple string replace using the value of the sid query parameter.
  3. Parse the result into the JSON object

leading to the same result as if the catalog had contained

{
  "version": 1,
  "generatedAt": 1746104606044,
  "tracks": [
    {
      "name": "custom-video-12345",
      "namespace": "conference.example.com/conference123/alice",
      "packaging": "loc",
      "isLive": true,
   ...
   ]
}

We would need to prohibit the use of % in the name field to allow this to be robust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions