CMS Garden runs a self-hosted PeerTube instance to serve as a media center. We prefer to include self-hosted videos in our articles to stay independent from any third party's terms of service changes. Drupal's core media entity "External video" only allows Links to YouTube and Vimeo.
Therefore we used the oembed module to replace the core bundle to add our PeerTube to the allowed providers.
Here's a step by step tutorial.
Add a custom provider
Visit this URL on your OpenCulturas instance: /admin/config/media/oembed-providers/custom-providers/ and click button "Add oEmbed provider"
Enter:
- Provider name: PeerTube (important! It only works with the generic name, "CMSG PeerTube" would not work)
- Machine name: [your_custom_peertube] (unusual, but a custom name will work here. We decided to enter "cmsg_peertube" just in case we wanted to add another PeerTube in the future)
- Provider URL: https://tube.cms.garden
- Endpoints:
https://tube.cms.garden/videos/watch/*
https://tube.cms.garden/w/*
(the path work for PeerTube, for any other oEmbed provider you need to find out yourselves) - Endpoint URL: https://tube.cms.garden/services/oembed (dto.)
- Discovery: yes, JSON
Click Save.
Provider bucket
Visit this link /admin/config/media/oembed-providers/buckets
Edit "Remote video" and check "PeerTube" in the list.
Older OpenCulturas versions
In case you are still on version 1.2.x and need this before you can update, you need to add a provider bucket for the remote video first:
- Bucket name: "Remote video"
- Machine name: "video" (important! only by this you will replace the core setting for remote videos)
- Check "PeerTube", "Vimeo", "YouTube" (the latter two for legacy reasons when you already have videos on your platform)
Allow new provider for remote videos
Visit this link /admin/structure/media/manage/remote_video
and check (at least) PeerTube under "Allowed providers".
Cookie consent management
Make sure the external video cookies service entity shows appropriate wording (default settings are unware of your new provider): /admin/config/system/cookies/cookies-service/video/edit
OpenCulturas in version 1.3.x or later uses the following neutralized wording:
- Label: External video
- Service placeholder texts
- This content is blocked because external video cookies have not been accepted.
- Only accept video cookies
That's it.
If we left any questions open or if you'd simply like to show us how you are using ist, join our next OpenCulturas Dojo.