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

  1. Goto filed settings
  2. Set allow fullscreen to false
  3. Dump the value in file IframeDefaultFormatter.php line 128
  4. 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.

  1. I commented out line 128 in file IframeDefaultFormatter.php
  2. I added the html attribute directly in the twig file iframe.html.twig line 19 as shown
    <iframe {{ attributes }} allowfullscreen>
    

User interface changes

API changes

Data model changes

Comments

alihkr created an issue. See original summary.

alihkr’s picture

Issue summary: View changes

  • neffets committed 6657a92 on 8.x-2.x
    Issue #3253300: Allow full screen not working
    
neffets’s picture

"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

neffets’s picture

Component: Miscellaneous » Code
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.