Browse Source

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

Jean-Baptiste Motto 4 years ago
parent
commit
e52df90a87
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tarteaucitron.services.js

+ 2 - 1
tarteaucitron.services.js

@@ -3336,6 +3336,7 @@ tarteaucitron.services.youtubeplaylist = {
                 video_height = x.getAttribute("height"),
                 video_height = x.getAttribute("height"),
                 frame_height = 'height=',
                 frame_height = 'height=',
                 video_frame,
                 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");
                 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) {
             if (playlist_id === undefined) {
@@ -3351,7 +3352,7 @@ tarteaucitron.services.youtubeplaylist = {
             } else {
             } else {
                 frame_height += '"" ';
                 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;
             return video_frame;
         });
         });
     },
     },