Add allowfullscreen param to youtube service. Default value is allowed.
This commit is contained in:
parent
6bfd20ec87
commit
a93bd48a3e
|
|
@ -3282,6 +3282,7 @@ tarteaucitron.services.youtube = {
|
||||||
video_height = x.getAttribute("height"),
|
video_height = x.getAttribute("height"),
|
||||||
frame_height = 'height=',
|
frame_height = 'height=',
|
||||||
video_frame,
|
video_frame,
|
||||||
|
allowfullscreen = x.getAttribute("allowfullscreen"),
|
||||||
attrs = ["theme", "rel", "controls", "showinfo", "autoplay", "mute", "start"],
|
attrs = ["theme", "rel", "controls", "showinfo", "autoplay", "mute", "start"],
|
||||||
params = attrs.filter(function (a) {
|
params = attrs.filter(function (a) {
|
||||||
return x.getAttribute(a) !== null;
|
return x.getAttribute(a) !== null;
|
||||||
|
|
@ -3302,7 +3303,7 @@ tarteaucitron.services.youtube = {
|
||||||
} 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/' + video_id + '?' + params + '" allowfullscreen></iframe>';
|
video_frame = '<iframe title="' + frame_title + '" type="text/html" ' + frame_width + frame_height + ' src="//www.youtube-nocookie.com/embed/' + video_id + '?' + params + '"' + (allowfullscreen == '0' ? '' : ' allowfullscreen') + '></iframe>';
|
||||||
return video_frame;
|
return video_frame;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue