Integration with remote videos provided by Media

Created on 18 May 2023, over 1 year ago
Updated 26 June 2023, over 1 year ago

Problem/Motivation

In order to protect remote videos from services such as Youtube, Vimeo or Dailymotion with tarteaucitron.js, some custom code is currently required, even though they are embedded by using Media, which is a module provided by Drupal core. I wish this could be automagically dealt with when the TacJS module is enabled.

Steps to reproduce

Install Media, create some videos and embed them into a node. Then, install TacJS and reload this node page: nothing happens. This is because the markup generated by the Media module needs to be altered so that tarteaucitron can block the iframe.

Proposed resolution

Port the feature already provided by the tarteaucitron module, namely by creating a submodule with a formatter which alters the iframe markup. This can be done directly, as in the patch below, or by using a JavaScript layer, as in the tarteaucitron module.

Remaining tasks

Review aforementioned ideas and decide which one deserves to be implemented.

User interface changes

None.

API changes

New submodule which can be enabled in order to managed remote video iframes with tarteaucitron.js. A plugin or hook system could be leveraged so that developers could integrate with services other than Youtube, Vimeo or Dailymotion.

Data model changes

None.

Feature request
Status

Fixed

Version

6.0

Component

Code

Created by

🇫🇷France fmb Perpinyà, Catalonia, EU

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024