From f391f194d849579716a39218fbd9925e2d7a69c6 Mon Sep 17 00:00:00 2001 From: Jean HOFFMANN Date: Tue, 23 Mar 2021 11:20:35 +0100 Subject: [PATCH] meilleur gestion params youtube, ajout param start --- tarteaucitron.services.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index f7136ae..e0ff2ea 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -3133,7 +3133,12 @@ tarteaucitron.services.youtube = { video_height = x.getAttribute("height"), frame_height = 'height=', video_frame, - params = 'theme=' + x.getAttribute("theme") + '&rel=' + x.getAttribute("rel") + '&controls=' + x.getAttribute("controls") + '&showinfo=' + x.getAttribute("showinfo") + '&autoplay=' + x.getAttribute("autoplay") + '&mute=' + x.getAttribute("mute"); + attrs = ["theme", "rel", "controls", "showinfo", "autoplay", "mute", "start"], + params = attrs.filter(function (a) { + return x.getAttribute(a) !== null; + }).map(function (a) { + return a + "=" + x.getAttribute(a); + }).join("&"); if (video_id === undefined) { return "";