Dynamically Setting VTT Content for <track> Element in Vidstack Player #908
Unanswered
zellmccloud
asked this question in
Q&A
Replies: 2 comments
-
I am in the same boat. There should be a way to push chapters without having to have a vtt file |
Beta Was this translation helpful? Give feedback.
0 replies
-
I actually found the answer in someone elses post on here. const playerRef = ref(); const track = new TextTrack({ track.addCue(new VTTCue(0, 50, 'My first chapter')); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently integrating Vidstack as a video player into my project and I'm exploring the feasibility of programmatically setting VTT content for a element. While I've successfully employed full VTT files for closed captions, I'm now faced with the challenge of creating clips from the same video without generating numerous chapter files.
In essence, my goal is to utilize the complete video but dynamically populate the chapters section with only relevant information for each clip. Ideally, I'd like to set up a scenario where the player starts at the timestamp of the named chapter for each clip.
Here's a simplified concept of what I'm envisioning:
Currently, I'm encountering an error when attempting to implement this concept. I'm wondering if there's a recommended approach to achieve this dynamic chapter setup within Vidstack or if anyone has successfully tackled a similar scenario before.
aforementioned error:
Beta Was this translation helpful? Give feedback.
All reactions