vidstack / player

UI components and hooks for building video/audio players on the web. Robust, customizable, and accessible. Modern alternative to JW Player and Video.js.
https://vidstack.io
MIT License
2.05k stars 120 forks source link

Native Vimeo Captions #1354

Open remyhunt opened 1 month ago

remyhunt commented 1 month ago

Current Behavior:

Attempting to implement closed captions / subtitling for my video embed component in vue/nuxt - however when outputting the player embed as player.textTracks, there are no text tracks displayed despite that there's clearly CC tracks on Vimeo.

Screenshot 2024-07-17 at 5 31 16 PM

Expected Behavior:

Expecting a non-empty array for player.textTracks.

Steps To Reproduce:

Environment:

Anything Else?

example video (screenshot from vimeo.com) with CC tracks: https://vimeo.com/358296408

Screenshot 2024-07-17 at 5 37 50 PM
mihar-22 commented 1 month ago

This is not supported as there was no API to control which track is being shown and we can't load cues ahead of time. I'll check again but doubt it's changed.

remyhunt commented 1 month ago

hey @mihar-22, thanks for getting back.

If it's helpful, I think this might require interacting with the Vimeo Player SDK? Looking at the vintage Plyr code and this is how it seems to be handled.

update: ah nevermind I saw your commented out code in ..vimeo/provider.ts

remyhunt commented 1 month ago

@mihar-22 Wondering if you could help advise on an interim solution for async querying a VTT track (or otherwise?) from Vimeo

This issue has some an interesting solution but i'm not sure if we can interact with the public Vimeo api in this way https://github.com/sampotts/plyr/issues/994

Please let me know!