Add allowfullscreen param to youtube playlist service. Default value is allowed.

This commit is contained in:
Jean-Baptiste Motto 2021-04-29 18:28:34 +02:00
parent a93bd48a3e
commit e52df90a87
1 changed files with 2 additions and 1 deletions

View File

@ -3336,6 +3336,7 @@ tarteaucitron.services.youtubeplaylist = {
video_height = x.getAttribute("height"),
frame_height = 'height=',
video_frame,
allowfullscreen = x.getAttribute("allowfullscreen"),
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");
if (playlist_id === undefined) {
@ -3351,7 +3352,7 @@ tarteaucitron.services.youtubeplaylist = {
} else {
frame_height += '"" ';
}
video_frame = '<iframe title="' + frame_title + '" type="text/html" ' + frame_width + frame_height + ' src="//www.youtube-nocookie.com/embed/videoseries?list=' + playlist_id + '&' + params + '" allowfullscreen></iframe>';
video_frame = '<iframe title="' + frame_title + '" type="text/html" ' + frame_width + frame_height + ' src="//www.youtube-nocookie.com/embed/videoseries?list=' + playlist_id + '&' + params + '"' + (allowfullscreen == '0' ? '' : ' allowfullscreen') + '></iframe>';
return video_frame;
});
},