Skip to content

Client markup ​

PeerTube supports custom markdown/HTML markup in some markdown fields (to create your homepage etc).

Full markdown is supported and basic HTML tags are allowed (<a>, <strong>, <p> etc). The style attribute is also supported.

Custom PeerTube HTML tags ​

Additionally, PeerTube supports custom HTML tags that can be configured using data-* attributes.

peertube-container ​

Create a container with a specific layout that can inject a title and a description.

  • data-width: container width attribute
  • data-title: title injected in the container
  • data-description: description injected in the container
  • data-layout: row or column
  • data-justify-content: normal or space-between (default to space-between to fill all available width)

PeerTube >= 9.0: containers can be nested, for example to display several rows of channels under the same title. Channel miniatures in a row container share the available width.

html
<peertube-container data-layout="row" data-title="Local videos" data-description="Only local videos are displayed">
  <peertube-videos-list data-count="10" data-only-local="true" data-max-rows="2"></peertube-videos-list>
</peertube-container>

<peertube-container data-title="Recommended channels">
  <peertube-container data-layout="row">
    <peertube-channel-miniature data-name="my_channel_1"></peertube-channel-miniature>
    <peertube-channel-miniature data-name="my_channel_2"></peertube-channel-miniature>
  </peertube-container>
  <peertube-container data-layout="row">
    <peertube-channel-miniature data-name="my_channel_3" data-display-latest-video="false"></peertube-channel-miniature>
    <peertube-channel-miniature data-name="my_channel_4" data-display-latest-video="false"></peertube-channel-miniature>
  </peertube-container>
</peertube-container>

peertube-button ​

Inject a PeerTube button.

  • required data-href: button link (not required if data-path is set)
  • required data-label: button label
  • PeerTube >= 9.0 data-path: link to a page of the web interface (/signup, /videos/browse?sort=-trending etc.), that the browser opens without reloading the web application. Takes precedence over data-href
  • data-theme: primary or secondary
  • data-blank-target: open or not the link in the current tab
  • PeerTube >= 9.0 data-icon: icon displayed before the label (user, globe, external-link, upload, play, home, users etc. See the complete list)
html
<peertube-button data-href="https://framatube.org" data-blank-target="true" data-theme="secondary" data-label="My super button"></peertube-button>
<peertube-button data-path="/signup" data-theme="primary" data-icon="user" data-label="Create an account"></peertube-button>

peertube-video-embed ​

Inject a PeerTube video embed.

  • required data-uuid: video id, uuid or shortUUID
  • PeerTube >= 7.2 data-responsive: responsive embed player
  • PeerTube >= 7.2 data-start-at: starts the video at a specific time
  • PeerTube >= 7.2 data-stop-at: stop the video at a specific time
  • PeerTube >= 7.2 data-subtitle: auto select this subtitle
  • PeerTube >= 7.2 data-autoplay: auto play the video (most of web browsers requires a muted video to accept autoplay)
  • PeerTube >= 7.2 data-muted: mute the video
  • PeerTube >= 7.2 data-loop: restart the video when it ends
  • PeerTube >= 7.2 data-title: display video title information
  • PeerTube >= 7.2 data-p2p: enable/disable P2P
  • PeerTube >= 7.2 data-warning-title: display P2P warning if P2P is enabled
  • PeerTube >= 7.2 data-control-bar: display control bar
  • PeerTube >= 7.2 data-peertube-link: display instance link in control bar
html
<peertube-video-embed data-uuid="164f423c-ebed-4f84-9162-af5f311705da"></peertube-video-embed>

<peertube-video-embed
  data-uuid="164f423c-ebed-4f84-9162-af5f311705da"
  data-start-at="1" data-stop-at="10" data-responsive="false"
  data-subtitle="fr" data-autoplay="false" data-muted="false" data-loop="false"
  data-title="false" data-p2p="false" data-warning-title="false" data-control-bar="true" data-peertube-link="false"
></peertube-video-embed>

<peertube-video-embed
  data-uuid="164f423c-ebed-4f84-9162-af5f311705da"
  data-start-at="1" data-stop-at="10" data-responsive="true"
  data-subtitle="fr" data-autoplay="true" data-muted="true" data-loop="true"
  data-title="false" data-p2p="false" data-warning-title="false" data-control-bar="false" data-peertube-link="true"
></peertube-video-embed>

peertube-playlist-embed ​

Inject a PeerTube playlist embed.

  • required data-uuid: playlist UUID
  • PeerTube >= 7.2 data-responsive: responsive embed player
  • PeerTube >= 7.2 data-playlist-position: playlist element position to play
html
<peertube-playlist-embed data-uuid="4b83a1cc-8e3b-4926-b1aa-8ed747557bc9"></peertube-playlist-embed>
<peertube-playlist-embed data-playlist-position="4"></peertube-playlist-embed>

peertube-video-miniature ​

Inject a PeerTube video miniature.

  • required data-uuid: video UUID or video short UUID
  • data-only-display-title: display or not miniature attributes (views, channel etc)
html
<peertube-video-miniature data-only-display-title="true" data-uuid="164f423c-ebed-4f84-9162-af5f311705da"></peertube-video-miniature>
<peertube-video-miniature data-only-display-title="true" data-uuid="ajQF5i82Zuao4ZoAeaSJwn"></peertube-video-miniature>

peertube-playlist-miniature ​

Inject a PeerTube playlist miniature.

  • required data-uuid: playlist UUID
html
<peertube-playlist-miniature data-uuid="4b83a1cc-8e3b-4926-b1aa-8ed747557bc9"></peertube-playlist-miniature>

peertube-channel-miniature ​

Inject a channel miniature.

  • required data-name: channel name
  • data-display-latest-video: display or not the latest published video
  • data-display-description: display or not the channel description
  • PeerTube >= 9.0 data-sort: sort to pick the displayed video (default to -publishedAt)
html
<peertube-channel-miniature data-name="my_channel_username"></peertube-channel-miniature>
<peertube-channel-miniature data-name="my_channel_username" data-display-latest-video="false" data-display-description="false"></peertube-channel-miniature>
<peertube-channel-miniature data-name="my_channel_username" data-sort="-originallyPublishedAt"></peertube-channel-miniature>

peertube-videos-list ​

Inject a list of videos.

  • data-sort: sort the videos (-publishedAt, -views, views etc. See sort option from REST API for a complete description: https://docs.joinpeertube.org/api-rest-reference/api/operations/getvideos.html)
  • data-count: limit number of displayed videos
  • data-max-rows: limit number of video rows
  • data-only-local: only display local videos?
  • data-is-live: only display VOD or live videos
  • data-category-one-of: comma-separated PeerTube categories (use keys of https://docs.joinpeertube.org/api-rest-reference/api/operations/getcategories.html)
  • data-language-one-of: comma-separated PeerTube languages (use keys of https://docs.joinpeertube.org/api-rest-reference/api/operations/getlanguages.html)
  • data-channel-handle: only display videos of this channel (chocobozzz_channel for a local channel, or chocobozzz_channel@peertube2.cpy.re for a remote channel)
  • data-account-handle: only display videos of this account (chocobozzz for a local account, or chocobozzz@peertube2.cpy.re for a remote account)
  • data-only-display-title: display or not miniature attributes (views, channel etc)
  • PeerTube >= 7.1 data-host: only display videos of this channel (framatube.org, peertube.cpy.re, etc.)
  • PeerTube >= 9.0 data-playlist-id: display videos of this playlist, in the playlist order (playlist id, UUID or short UUID). Can only be used with data-count, data-max-rows and data-only-display-title
  • PeerTube >= 9.0 data-more-href: display a button below the list linking to this URL
  • PeerTube >= 9.0 data-more-path: same as data-more-href but for a page of the web interface (for example /videos/browse?sort=-trending), that the browser opens without reloading the web application
  • PeerTube >= 9.0 data-more-label: label of the data-more-href/data-more-path button (default to More videos)
html
<peertube-videos-list
  data-only-display-title="false" data-title="Listed by languages" data-language-one-of="fr,en" data-count="3"
  data-only-local="false" data-max-rows="2" data-sort="-publishedAt" data-is-live="false"
></peertube-videos-list>

<peertube-videos-list data-channel-handle="chocobozzz@peertube2.cpy.re"></peertube-videos-list>

<peertube-videos-list data-account-handle="chocobozzz"></peertube-videos-list>

<peertube-videos-list data-playlist-id="wv4n8Ha9rPZPpBCqEQatM3" data-count="6" data-max-rows="1"></peertube-videos-list>

<peertube-videos-list data-sort="-trending" data-count="8" data-max-rows="2" data-more-path="/videos/browse?sort=-trending" data-more-label="More popular videos"></peertube-videos-list>

peertube-hero PeerTube >= 9.0 ​

Inject a large banner with a title and a description, typically at the top of the homepage. Children of the tag (for example peertube-card or peertube-button tags) are displayed next to the title, or below it on small screens.

  • data-title: banner title
  • data-description: text displayed below the title
html
<peertube-hero data-title="Welcome to my platform" data-description="Discover videos selected by our team">
  <peertube-button data-theme="primary" data-path="/signup" data-label="Create an account"></peertube-button>
</peertube-hero>

peertube-card PeerTube >= 9.0 ​

Inject a block with a title and a description. Children of the tag (for example peertube-button tags) are displayed below the description, on the same row and with the same width.

  • data-title: card title
  • data-description: text displayed below the title
  • data-bordered: display or not a border around the card
html
<peertube-hero data-title="Welcome to my platform" data-description="Discover videos selected by our team">
  <peertube-card data-bordered="true" data-title="Publish your own videos" data-description="Live streaming is allowed">
    <peertube-button data-theme="primary" data-icon="user" data-path="/signup" data-label="Create an account"></peertube-button>
    <peertube-button data-theme="secondary" data-icon="globe" data-href="https://joinpeertube.org/instances" data-blank-target="true" data-label="See other platforms"></peertube-button>
  </peertube-card>

  <peertube-card data-title="Need more independence?" data-description="Create your own video platform.">
    <peertube-button data-theme="secondary" data-icon="external-link" data-href="https://joinpeertube.org" data-blank-target="true" data-label="Learn more"></peertube-button>
  </peertube-card>
</peertube-hero>

peertube-instance-avatar PeerTube >= 6.1 ​

Inject the platform avatar set by the administrator.

  • data-size: the size in (pixels) of the avatar element
html
<peertube-instance-avatar></peertube-instance-avatar>
<peertube-instance-avatar data-size="48"></peertube-instance-banner>

peertube-instance-banner PeerTube >= 6.1 ​

Inject the platform banner set by the administrator.

html
<peertube-instance-banner></peertube-instance-banner>
<peertube-instance-banner style="display: block; max-width: 500px; margin: auto;"></peertube-instance-banner>