Add annotation plugin

This commit is contained in:
Chocobozzz
2020-08-21 14:46:25 +02:00
parent 47a4d19252
commit aec0c866d5
16 changed files with 4696 additions and 0 deletions

View File

@ -0,0 +1,21 @@
async function register ({ registerVideoField, peertubeHelpers }) {
const fieldName = 'player-annotations'
const descriptionSource = 'See <a href="https://cpy.re" target="_blank">this document</a> for annotation format'
const descriptionHTML = await peertubeHelpers.translate(descriptionSource)
const commonOptions = {
name: fieldName,
label: 'Annotations',
descriptionHTML,
type: 'input-textarea',
default: ''
}
for (const type of [ 'upload', 'import-url', 'import-torrent', 'update' ]) {
registerVideoField(commonOptions, { type })
}
}
export {
register
}