aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/plugins/guide.md
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-12 11:10:57 +0200
committerChocobozzz <me@florianbigard.com>2021-04-12 11:19:15 +0200
commit62bc0352d9d465ce9d7c3e074b1b60bf99155e24 (patch)
tree7cfbf827b7b8c802ae79fb87e55c9d960120400f /support/doc/plugins/guide.md
parentc96e457bde8495cf9103bf819f887f341a528543 (diff)
downloadPeerTube-62bc0352d9d465ce9d7c3e074b1b60bf99155e24.tar.gz
PeerTube-62bc0352d9d465ce9d7c3e074b1b60bf99155e24.tar.zst
PeerTube-62bc0352d9d465ce9d7c3e074b1b60bf99155e24.zip
Add plugin placeholder elements support
Diffstat (limited to 'support/doc/plugins/guide.md')
-rw-r--r--support/doc/plugins/guide.md20
1 files changed, 18 insertions, 2 deletions
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md
index e30d95fc9..81999bf32 100644
--- a/support/doc/plugins/guide.md
+++ b/support/doc/plugins/guide.md
@@ -15,7 +15,7 @@
15 - [Add custom routes](#add-custom-routes) 15 - [Add custom routes](#add-custom-routes)
16 - [Add external auth methods](#add-external-auth-methods) 16 - [Add external auth methods](#add-external-auth-methods)
17 - [Add new transcoding profiles](#add-new-transcoding-profiles) 17 - [Add new transcoding profiles](#add-new-transcoding-profiles)
18 - [Helpers](#helpers) 18 - [Server helpers](#server-helpers)
19 - [Client API (themes & plugins)](#client-api-themes--plugins) 19 - [Client API (themes & plugins)](#client-api-themes--plugins)
20 - [Plugin static route](#plugin-static-route) 20 - [Plugin static route](#plugin-static-route)
21 - [Notifier](#notifier) 21 - [Notifier](#notifier)
@@ -26,6 +26,7 @@
26 - [Get server config](#get-server-config) 26 - [Get server config](#get-server-config)
27 - [Add custom fields to video form](#add-custom-fields-to-video-form) 27 - [Add custom fields to video form](#add-custom-fields-to-video-form)
28 - [Register settings script](#register-settings-script) 28 - [Register settings script](#register-settings-script)
29 - [HTML placeholder elements](#html-placeholder-elements)
29 - [Publishing](#publishing) 30 - [Publishing](#publishing)
30- [Write a plugin/theme](#write-a-plugintheme) 31- [Write a plugin/theme](#write-a-plugintheme)
31 - [Clone the quickstart repository](#clone-the-quickstart-repository) 32 - [Clone the quickstart repository](#clone-the-quickstart-repository)
@@ -424,7 +425,7 @@ async function register ({
424During live transcode input options are applied once for each target resolution. 425During live transcode input options are applied once for each target resolution.
425Plugins are responsible for detecting such situation and applying input options only once if necessary. 426Plugins are responsible for detecting such situation and applying input options only once if necessary.
426 427
427### Helpers 428#### Server helpers
428 429
429PeerTube provides your plugin some helpers. For example: 430PeerTube provides your plugin some helpers. For example:
430 431
@@ -628,6 +629,21 @@ async function register ({ registerSettingsScript }) {
628} 629}
629``` 630```
630 631
632#### HTML placeholder elements
633
634PeerTube provides some HTML id so plugins can easily insert their own element:
635
636```
637async function register (...) {
638 const elem = document.createElement('div')
639 elem.className = 'hello-world-h4'
640 elem.innerHTML = '<h4>Hello everybody! This is an element next to the player</h4>'
641
642 document.getElementById('plugin-placeholder-player-next').appendChild(elem)
643}
644```
645
646See the complete list on https://docs.joinpeertube.org/api-plugins
631 647
632### Publishing 648### Publishing
633 649