luwes / cloudflare-video-element

A custom element for the Cloudflare player with an API that matches the <video> API
https://cloudflare-video-element.vercel.app
4 stars 1 forks source link

Doesn't render thumbnails track #2

Open jawngee opened 6 months ago

jawngee commented 6 months ago

When using a thumbnails track, doesn't render it:

<media-controller>
    <cloudflare-video
        src='https://watch.videodelivery.net/ce606a9a184efcf932ca23db7d59c79b' poster='https://media-cloud-test.b-cdn.net/2024/04/176-thumb.jpg'
        slot="media"
        crossorigin
        playsInline preload='metadata'
    >
        <track default label='thumbnails' kind='metadata' src='https://media-cloud-test.b-cdn.net/2024/04/176-storyboard.vtt' />
    </cloudflare-video>
    <media-control-bar>
        <media-play-button ></media-play-button>
        <media-mute-button ></media-mute-button>
        <media-time-range ></media-time-range>
        <media-time-display showduration></media-time-display>
    </media-control-bar>
</media-controller>

My guess is that because its an iframe embed that track element disappears into the ether. I'm suspecting it would be impossible to get working, but if you know any workarounds, I'm all ears.

Thanks!

luwes commented 5 months ago

thanks for the feedback! it is possible to get working with your own controls (media-chrome).

the requirement for media-chrome is that it can access a getter on the media element media.textTracks which holds the track you added via HTML. this will involve adding a dummy