peertube-theme-nctv-dark/peertube-plugin-video-annot.../client/video-edit-client-plugin.js

22 lines
700 B
JavaScript
Raw Normal View History

2020-08-21 12:46:25 +00:00
async function register ({ registerVideoField, peertubeHelpers }) {
const fieldName = 'player-annotations'
2020-08-21 13:17:45 +00:00
const descriptionSource = 'See <a href="https://framagit.org/framasoft/peertube/official-plugins/-/blob/master/peertube-plugin-video-annotation/README.md" target="_blank">this document</a> for annotation format'
2020-08-21 12:46:25 +00:00
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
}