Add Twitch Fix #1133

This commit is contained in:
Amauri CHAMPEAUX 2023-08-09 16:59:13 +02:00
parent 2553257851
commit 3bf2fc6c09
1 changed files with 26 additions and 0 deletions

View File

@ -37,6 +37,32 @@ tarteaucitron.services.iframe = {
} }
}; };
// twitch
tarteaucitron.services.twitch = {
"key": "twitch",
"type": "video",
"name": "Twitch",
"needConsent": true,
"cookies": [],
"uri": "https://www.twitch.tv/p/en/legal/privacy-notice",
"js": function () {
"use strict";
tarteaucitron.fallback(['twitch_player'], function (x) {
var id = x.getAttribute('videoID'),
parent = x.getAttribute('parent'),
width = x.getAttribute('width'),
height = x.getAttribute('height');
var embedURL = "https://player.twitch.tv/?video=" + id + "&parent=" + parent;
return "<iframe width=\"" + width + "\" height=\"" + height + "\" src=\"" + embedURL + "\" scrolling=\"no\" frameborder=\"0\"></iframe>";
});
},
"fallback": function () {
"use strict";
var id = "twitch";
tarteaucitron.fallback(["twitch_player"], tarteaucitron.engage(id));
}
};
// eskimi // eskimi
tarteaucitron.services.eskimi = { tarteaucitron.services.eskimi = {
"key": "eskimi", "key": "eskimi",