From 58e5c48da29f85142d115dc8a6864cf47bf2ef12 Mon Sep 17 00:00:00 2001 From: Nicolas Rosset Date: Wed, 3 Mar 2021 17:18:05 +0100 Subject: [PATCH] Allow embed of Dailymotion playlists (while being backward compatible with old embed code) --- tarteaucitron.services.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 5c6b850..0cc8ce8 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -637,6 +637,7 @@ tarteaucitron.services.dailymotion = { video_height = x.getAttribute("height"), frame_height = 'height=', video_frame, + embed_type = x.getAttribute("embedType"), params = 'info=' + x.getAttribute("showinfo") + '&autoPlay=' + x.getAttribute("autoplay"); if (video_id === undefined) { @@ -652,7 +653,10 @@ tarteaucitron.services.dailymotion = { } else { frame_height += '"" '; } - video_frame = ''; + if (embed_type === undefined || !['video', 'playlist'].includes(embed_type) ) { + embed_type = "video"; + } + video_frame = ''; return video_frame; }); },