From 5e91413273ccad78713ceca96b6f5781efb4a9e0 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 3 Apr 2023 11:58:02 +0200 Subject: [PATCH] Add PlayPlay service Fix #1077 --- tarteaucitron.services.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index f139712..178296a 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -37,6 +37,36 @@ tarteaucitron.services.iframe = { } }; +// playplay +tarteaucitron.services.playplay = { + "key": "playplay", + "type": "video", + "name": "PlayPlay", + "uri": "https://playplay.com/fr/confidentialite", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + + tarteaucitron.fallback(['tac_playplay'], function (x) { + var id = tarteaucitron.getElemAttr(x, "data-id"), + width = tarteaucitron.getElemAttr(x, "width"), + height = tarteaucitron.getElemAttr(x, "height"); + + var playURL = "https://playplay.com/app/embed-video/" + id; + + return ""; + }); + }, + "fallback": function () { + "use strict"; + var id = 'playplay'; + tarteaucitron.fallback(['tac_playplay'], function (elem) { + return tarteaucitron.engage(id); + }); + } +}; + // adobeworkspace tarteaucitron.services.adobeworkspace = { "key": "adobeworkspace",