Example
B0pol opened this issue · 3 comments
Can you please provide a link to a video example?
Chapters can be accessed by other plugins using the text track added to the video (player.remoteTextTracks()), and through video.pluginData['table-of-contents_parsed'].
Can it be accessed by an API? I could not find pluginData in the PeerTube API documentation.
If you are developing a plugin which runs on the PeerTube server, it's this pluginData
. But it sounds like you're trying to access it from a client or something? As an implementation detail, the WebVTT is exposed somewhere like so (that link will break though, when the plugin is updated). It currently uses the video ID which is unique to the server, but could be changed to also be accessible by UUID. Do either of those work for what you're trying to do?
it sounds like you're trying to access it from a client or something?
Yes, I would like to add support for chapters to NewPipe for PeerTube.
Shortly, an android app to stream videos or audios from several websites: e.g. YouTube, PeerTube, BandCamp…
So it’s not a PeerTube plugin, then I can’t access pluginData
.
We already support chapters for YouTube and I would like to do the same for PeerTube.
As an implementation detail, the WebVTT is exposed somewhere like so
https://peertube.milesdewitt.com/plugins/chapters/1.0.1/router/videos/5
(that link will break though, when the plugin is updated).
It will break because 1.0.1
is the plugin version, isn’t it? I need something stable across versions.
It currently uses the video ID which is unique to the server, but could be changed to also be accessible by UUID. Do either of those work for what you're trying to do?
It would be nice to support UUID and short UUID (new, starting from PeerTube v3.3.0) but I can access the internal video id really easily with the /api/v1/videos/:uuid
API so it’s not a problem at all.
About WebVTT I would prefer an API like what you can have using pluginData:
{
chapters: [
// chapter
{
start: float,
end: float,
name: String,
tags: {
sponsor: bool,
selfPromotion: bool,
interactionReminder: bool,
intro: bool,
intermission: bool,
outro: bool,
credits: bool,
nonMusic: bool,
},
}
],
}
with a stable link across versions.