Installing PeerTube on macOS

Part of the setup for developing a PeerTube plugin, is to install a PeerTube instance locally. The contributing and dependencies docs explain how to clone the PeerTube repository, install dependencies and prepare the database. These resources also offer some OS specific tips. In this article we expand on some issues we ran into during installation on macOS, which is one of the operating systems we used for development (the other ones being Ubuntu in VMware, Ubuntu on WSL2, Ubuntu and Fedora on bare metal).

More …

Developing a PeerTube plugin

While enabling Creative Commons licences for PeerTube videos in accordance with the CC Platform Toolkit, we want to make sure that the new functionality we develop operates well with the existing PeerTube code base, fits the PeerTube design and is easy to integrate for users who want to use this feature. PeerTube’s plugin architecture lets us achieve these goals. In this post we will walk through our experience of creating a PeerTube plugin to add Creative Commons licences to PeerTube videos.

More …

Licence metadata

Adding a licence button is an improvement for the display of the licence and although you can already filter on licence on a PeerTube instance, it would help if CC licensed content can be found outside the platform (search & discovery). For this there already exists the so-called Creative Commons Rights Expression Language (CC REL).

Creative Commons licences are expressed in three different formats: the human readable licence deed, the lawyer readable legal code, and the machine readable code. RDFa is one of the ways in which we’ve chosen to make our licences machine readable. By using RDFa CC licensed objects can be discovered by search engines and auto-discovery mechanisms without the need for a human to hand-curate content directories or lists.

RDFa is a W3C Recommendation that adds a set of attribute-level extensions to HTML, XHTML and various XML-based document types for embedding rich metadata within Web documents.

To make this work we added these attributes on the existing HTML of the PeerTube video page. Below you find an excerpt of the tags the plugin extends.

Example from peertube.beeldengeluid.nl:


<div class="video-info" xmlns:dct="http://purl.org/dc/terms/" xmlns:cc="https://creativecommons.org/ns#">

  <h1 class="video-info-name" property="dct:title">Voorbereidingen voor de eerste vlucht van ruimte-vliegtuig 'Enterprise'</h1>

  <span class="cc-licence"><a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank">
       <img src="https://licensebuttons.net/l/by-sa/4.0/80x15.png">
     </a>
  </span>

  <a title="Account page" href="https://peertube.beeldengeluid.nl/a/nisv" rel="cc:attributionURL dct:creator">
    <span property="cc:attributionName">By nisv</span>
  </a>

</div>

All the tags except <span class="cc-licence"> and it’s contents are existing ones with added attributes like property and rel with their corresponding namespace identifiers.

Licence link button

Apart from changing the names/labels of the CC licences to their more recognizable international standardized short form identifiers, we have also added a link to the licence deed page, which is required to be accepted as a formally licensed work.

Although we considered just putting the link on the textual representation in the existing metadata list below the description (Privacy, Category, Licence, Language, Tags, Duration), this element already has an existing onclick action, namely it is used to act as a filter for a search query on PeerTube.

We decided to use the well-known CC licence buttons and added this with a link next to the date & views info below the title, just fitting for the smallest viewport as in a mobile phone web browser.

Example from peertube.beeldengeluid.nl:

Screenshot CC licence button

The 8th licence

If we look at the existing 7 licences in PeerTube, they correspond to the following list:

  1. CC-BY: https://creativecommons.org/licenses/by/4.0/
  2. CC-BY-SA: https://creativecommons.org/licenses/by-sa/4.0/
  3. CC-BY-ND: https://creativecommons.org/licenses/by-nd/4.0/
  4. CC-BY-NC: https://creativecommons.org/licenses/by-nc/4.0/
  5. CC-BY-NC-SA: https://creativecommons.org/licenses/by-nc-sa/4.0/
  6. CC-BY-NC-ND: https://creativecommons.org/licenses/by-nc-nd/4.0/
  7. CC0: https://creativecommons.org/publicdomain/zero/1.0/

The CC0 licence refers to the so-called ‘Public Domain Dedication’, which is a tool to enable authors and copyright owners who want to dedicate their works to the worldwide public domain.

In the currently used licences list for PeerTube sometimes this nuance (dedication) gets lost in translation depending on the chosen interface language (like in French for instance, ‘Domaine Public’). By leaving out the ‘dedication’ part, it’s not clearly distinct from the ‘Public Domain Mark’, which is used for works that are free of known copyright around the world. These will typically be very old works.

https://creativecommons.org/share-your-work/public-domain/

To make this distinction possible in PeerTube we are introducing an 8th licence for ‘Public Domain Mark’, which will be part of Creative Commons plugin for PeerTube.

Public Domain Mark: https://creativecommons.org/publicdomain/mark/1.0/