GraphQL CDA should return subtitle track URLs

(Moderator note: This feature request was created on behalf of a customer)

It would be nice if the GraphQL responses for videos also included their available subtitle track URLs, maybe something like this example:

video: {
  subtitles: [
    {
      locale: "en",
      trackId: "abcde",
      url: "https://stream.mux.com/xyzabc/text/abcde.vtt"
    },
    {
      locale: "fr",
      trackId: "fghijk",
      url: "https://stream.mux.com/xyzabc/text/fghijk.vtt"
    }

  ]
}

Currently, this information is only available in the UI when you open an individual asset:

It is partially in the CMA REST API too (https://www.datocms.com/docs/content-management-api/resources/upload-track), but that still requires some work because you have to manually:

  1. Get the video’s Mux Playback ID from your GraphQL response
  2. Separately fetch its subtitle track IDs from the CMA
  3. Concat everything into a Mux URL like:
    https://stream.mux.com/${muxPlaybackId}/text/${subtitleTrackId}.vtt

It’s a multi-step procedure requiring different APIs and string manipulation. It’d be a lot easier if it were just in the GraphQL responses :pray:

Although the DatoCMS Video Player components handle subtitles automatically, being able to retrieve this information explicitly would help anyone not using that component, like in a regular HTML <video> tag or a third-party video player.