From 46bc8788e471cc10aba64e2eccef2310edba8de7 Mon Sep 17 00:00:00 2001 From: Kevin von Spiczak <kevin.spiczak@sgalinski.de> Date: Thu, 1 Jul 2021 12:15:59 +0200 Subject: [PATCH] [TASK] remove autoplay attribute, tweak allow list --- Resources/Public/JavaScript/vimeoLightbox.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Resources/Public/JavaScript/vimeoLightbox.js b/Resources/Public/JavaScript/vimeoLightbox.js index df68e25..8e5c24a 100644 --- a/Resources/Public/JavaScript/vimeoLightbox.js +++ b/Resources/Public/JavaScript/vimeoLightbox.js @@ -23,6 +23,10 @@ module.exports = function() { $vimeoItem.magnificPopup({ type: 'iframe', iframe: { + markup: '<div class="mfp-iframe-scaler">' + + '<div class="mfp-close"></div>' + + '<iframe class="mfp-iframe" frameborder="0" allowfullscreen allow="autoplay; fullscreen *; picture-in-picture"></iframe>' + + '</div>', patterns: { vimeo: { index: 'vimeo.com/', @@ -57,7 +61,7 @@ module.exports = function() { '<div class="embed-container" style="padding-bottom: calc(' + height + ' / ' + width + ' * 100%);">' + '<iframe ' + 'width="' + width + '" height="' + height + '" ' + - 'src="https://player.vimeo.com/video/' + queryString + '?autoplay=1&dnt=1" frameborder="0" ' + + 'src="https://player.vimeo.com/video/' + queryString + '?dnt=1" frameborder="0" ' + 'allow="autoplay; fullscreen; picture-in-picture" allowfullscreen>' + '</iframe>' + '</div></div>'); -- GitLab