Video streaming restrict domain


Is it possible to restrict the video streaming to a specific domain or have some sort of video url signing?
From a legal perspective it’s needed to have these videos restricted.

Kind regards,
Glenn Bostoen

Currently it’s not possible, but Mux has the concept of signed URLs, which basically is a way to expire the URLs after a specific time. So theoretically we could add the ability to generate such signed URLs within Dato.

But keep in mind that:

  1. it wouldn’t be part of the GraphQL API, because we heavily cache its responses, while new signed URLs should be generated for each incoming request;
  2. we should add a new permission to DatoCMS API tokens — something like “Allow this API token to return videos public URL” — so that you can still use some API tokens publicly without exposing your video URLs;
  3. we should generate and store a different Mux signing key for each DatoCMS project, and two playback policy IDs for each uploaded video (one public, one signed);
  4. we should introduce a couple of different REST API endpoints:
    • One to request the rotation of the project’s Mux signing key;
    • One to obtain the signed URL of a specific video.

So yeah, surely doable, but it really depends on how many people find this useful :slight_smile:

1 Like

Hi, thanks for the answer! I’m going to implement a similar approach as is described here by NGINX:

Any feedback is welcome.

1 Like