Closed CalebKester closed 4 years ago
The old way is you put them in the description and parse them for navigation. There is now a "getCuepoints" api. I assuming these are for chapters, is there an example video for that ?
I have a video with chapter markers. That displays in non pro mode in the embedded player controlbar. But to obtain this data to include in a custom controlbar shows up as empty data. Is this the correct api method ?
this.vimeoPlayer.getCuePoints().then(function(cuePoints) {
console.log("cues", cuePoints);
}).catch(function(error) {
console.log("cues", error);
switch (error.name) {
case 'UnsupportedError':
// Cue points aren't supported by the current player or browser
break;
default:
// Some other error occurred
break;
}
});
Official Chapters were released a few months ago: https://vimeo.com/blog/post/easy-navigation-for-your-videos-with-chapters/
I've looked through all of their API and player.js and there's no way to get this chapter information out of a video.
Thanks for your feedback everyone! We have this item on the roadmap and expect to add support for Chatper data in the near future. I will ensure this thread is updated when that happens.
OK what is the getCuePoints method then ? Is this chapter data available in the api endpoint ?
The old way Ive been parsing chapter markers. Is within the description.
@danrossi , the getCuePoints()
method returns cuePoints
added using out addCuePoint()
method. https://developer.vimeo.com/player/sdk/reference#add-a-cue-point-to-a-video
As @fisherinnovation said, a getChapters()
method is something we've been planning to add to our Player SDK. ever since we released Chapters. I'm working on it now and it should be available in a few days. I'll update this thread when it's in production!
@CalebKester @danrossi , getChapters()
, getCurrentChapter()
, and a chapterchange
event have all been added to the player and this library! Feel free to use and leave any feedback for more improvements. :)
https://github.com/vimeo/player.js/blob/master/README.md#getchapters-promisearray-error https://github.com/vimeo/player.js/blob/master/README.md#getcurrentchapter-promiseobject-error https://github.com/vimeo/player.js/blob/master/README.md#chapterchange
Thanks @steve52 . I pulled it from github (npm isn't updated yet) and it's doing exactly what I would expect. I'll report back after I use it more if I have any issues. Thanks again for the quick turnaround.
FYI, npm should install the latest version now!
This works. I get cues and the chapter event works. There is still no qualities api to do quality selection on a custom controlbar. A way to obtain a poster image without calls to a data api would be preferable. Is there such a thing ?
There's support for TextTracks. Could we get support for getting Chapters from this? Or is this planned for the future? https://developer.vimeo.com/api/upload/texttracks