]> cat aescling's git repositories - mastodon.git/commitdiff
Add allowfullscreen attribute to oembed iframe (#10370)
authorrinsuki <428rinsuki+git@gmail.com>
Mon, 25 Mar 2019 14:01:09 +0000 (23:01 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 25 Mar 2019 14:01:09 +0000 (15:01 +0100)
for video player full screen button.

app/serializers/oembed_serializer.rb

index 0c8350e2d2b19020824dd39a23a427ffee2ce3aa..01689633b2d8ffa728639d4ea2cfe939862d5aab 100644 (file)
@@ -43,6 +43,7 @@ class OEmbedSerializer < ActiveModel::Serializer
       style: 'max-width: 100%; border: 0',
       width: width,
       height: height,
+      allowfullscreen: true,
     }
 
     content_tag(:iframe, nil, attributes) + content_tag(:script, nil, src: full_asset_url('embed.js', skip_pipeline: true), async: true)