Dash JS player x Cloudflare displaying adaptation ID for CC options

55 views Asked by At

We're implementing Dash JS player with Cloudflare Stream. Manifests are generated by Cloudflare. WebVTT files are uploaded to Cloudflare for delivery with the manifest.

When a clip with captions loads, the CC option in the player lists the AdaptationSet ID (eg. 123456789) of the caption track instead of any kind of human-readable label (eg. "English", "Spanish", etc.).

The manifest has a lang attribute that seems to be derived from the WebVTT file that's been uploaded to Cloudflare. If we add a Language attribute in the WebVTT, the manifest seems to be using the value passed there. If we don't, it seems the manifest derives it from the filename of the VTT that was uploaded (eg. a Spanish VTT has "Español" in the lang attribute.

However, regardless of what we do, the options shown in the CC control of the native video player that's rendered still show this numeric ID and not a string.

I'm new to Dash streaming and Cloudflare Stream, so apologies if there's something obvious I'm missing, but I'm at a loss for where to go from here.

Our video embed is fairly straightforward:

<video class="dashplayer" id="video-{{ options.id}}" 
  poster="{{ image.src }}"
  data-src="{{ dashUrl }}"
  controls="true"
></video>

and the JS setup has nothing to it as well:

const players = Array.from(document.querySelectorAll('.dashplayer'));

players.forEach(p => {
  let player = dashjs.MediaPlayer().create();
  player.initialize(p, p.dataset.src, false);
});

The pertinent part of the manifest is:

<AdaptationSet id="207527692" mimeType="text/vtt" segmentAlignment="true" lang="español">
    <Representation id="548316283" bandwidth="256">

  <BaseURL>../../93173be3c20171b532c79cdc0129cc5c/text/es.vtt?p=eyJ0eXBlIjoiZmlsZSIsInZpZGVvSUQiOiI5MzE3M2JlM2MyMDE3MWI1MzJjNzljZGMwMTI5Y2M1YyIsIm93bmVySUQiOjUyODgwMTc4LCJjcmVhdG9ySUQiOiIiLCJ0cmFjayI6ImIyM2JmYjYwZDFiNTI1ZmY2OTRmOTAyODY4ZWZhZTlkIiwicmVuZGl0aW9uIjoiNTQ4MzE2MjgzIiwibXV4aW5nIjoiNjM0NTUwNzI4In0&amp;s=w54CDG42fMK4w6HDoHUuI2ckw7bCnlsKw6UsM8KzDFPDkgHCkV4oNWJU</BaseURL>
</Representation>
  
</AdaptationSet>

So, the ID of 207527692 is what's being displayed as the Caption option in the UI. I don't see a way to tweak that via the Cloudflare Stream UI, where I would expect to see something like Español.

0

There are 0 answers