소스 검색

Add allowfullscreen param to web dailymotion service. Default value is allowed.

Jean-Baptiste Motto 4 년 전
부모
커밋
cd43d9fd91
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      tarteaucitron.services.js

+ 2 - 1
tarteaucitron.services.js

@@ -980,6 +980,7 @@ tarteaucitron.services.dailymotion = {
                 frame_height = 'height=',
                 frame_height = 'height=',
                 video_frame,
                 video_frame,
                 embed_type = x.getAttribute("embedType"),
                 embed_type = x.getAttribute("embedType"),
+                allowfullscreen = x.getAttribute("allowfullscreen"),
                 params = 'info=' + x.getAttribute("showinfo") + '&autoPlay=' + x.getAttribute("autoplay");
                 params = 'info=' + x.getAttribute("showinfo") + '&autoPlay=' + x.getAttribute("autoplay");
 
 
             if (video_id === undefined) {
             if (video_id === undefined) {
@@ -998,7 +999,7 @@ tarteaucitron.services.dailymotion = {
             if (embed_type === undefined || !['video', 'playlist'].includes(embed_type) ) {
             if (embed_type === undefined || !['video', 'playlist'].includes(embed_type) ) {
                 embed_type = "video";
                 embed_type = "video";
             }
             }
-            video_frame = '<iframe title="' + frame_title + '" src="//www.dailymotion.com/embed/' + embed_type + '/' + video_id + '?' + params + '" ' + frame_width + frame_height + ' allowfullscreen></iframe>';
+            video_frame = '<iframe title="' + frame_title + '" src="//www.dailymotion.com/embed/' + embed_type + '/' + video_id + '?' + params + '" ' + frame_width + frame_height + (allowfullscreen == '0' ? '' : ' webkitallowfullscreen mozallowfullscreen allowfullscreen') + '></iframe>';
             return video_frame;
             return video_frame;
         });
         });
     },
     },