Problem/Motivation
Allow full screen is always true regardless of being setting it as false. It causes the issue of not showing the video in full screen mode ( the rectangle / focus icon) at the bottom right of the youtube video is not clickable.
Steps to reproduce
- Goto filed settings
- Set allow fullscreen to false
- Dump the value in file IframeDefaultFormatter.php line 128
- The above will show 1 all time
Proposed resolution
Commenting out line 128 i.e
// $allow[] = 'fullscreen';
works for me. The youtube embed function dictates that the allowfullscreen should not be placed in attribute allow any more, it should be its oven attribute i.e
<iframe allowfullscreen></iframe>
will work.
Remaining tasks
How it works for me, a quick solution.
- I commented out line 128 in file IframeDefaultFormatter.php
- I added the html attribute directly in the twig file iframe.html.twig line 19 as shown
<iframe {{ attributes }} allowfullscreen>
Comments
Comment #2
alihkr commentedComment #4
neffets commented"allowfullscreen" as own attribute reintroduced.
sametime fixed a bug which prevented field-settings allowfullscreen=1 to be active (item has allowfullscreen=0, but cannot change/edit it, so the field-settings has to overwritet these item-settings)
field_settings (in this function) are coming from "Concrete Field of this content-type => manage display settings. See /admin/structure/types/manage/MYContentType/fields/node.MYContentType.MYFieldName
Comment #5
neffets commented