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.

CommentFileSizeAuthor
#2 remote_videos_integration-3361289-2.patch3.41 KBfmb

Comments

FMB created an issue. See original summary.

fmb’s picture

StatusFileSize
new3.41 KB

A patch wich alters directly the markup, without using any JS, provided as a proof of concept.

  • boulaffasae committed d00fa525 on 8.x-6.x
    Issue #3361289 by FMB: Integration with remote videos provided by Media
    
boulaffasae’s picture

Status: Active » Fixed

hi FMB,

Good patch ^^

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.