Question

YouTube full screen is unavailable?

Hi for some reason the full screen button on a YouTube video doesn’t work when on a web page hosted on my Digital Ocean droplet. When clicking full screen it says “Full screen is unavailable”. Here’s a screenshot -

https://i.ibb.co/Fxg9Bmp/imgpsh-fullsize-anim.jpg

Another developer added the exact same code to his server on Cloudflare and the full screen button works.

I have no idea why it works on Cloudflare and not Digital Ocean.

Please can someone help fix this?

How is a server setting preventing full screen from working?

Here’s the HTML -

<!DOCTYPE html>
<html>
<head>
    <meta name='robots' content='noindex, nofollow'>
</head>
<body>
    <iframe src="https://www.youtube.com/embed/mQYRWvIj0Yw?mute=1&autoplay=1" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="522px" scrolling="auto" allowfullscreen></iframe>        
</body>
</html>

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Full screen now works! I have removed fullscreen ‘none’ from /etc/apache2/apache2.conf

This is the line it was removed from -

Header always set Feature-Policy "fullscreen 'none'; geolocation 'none'; midi 'none; notifications 'none'; push 'none'; sync-xhr 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; speaker 'none'; vibrate 'none'"
KFSys
Site Moderator
Site Moderator badge
July 27, 2022

Hi @twc8ac35a8636,

This shouldn’t be related wheter you are under Cloudflare or DigitalOcean. What I would assume is there is an issue with your iframe.

Try with one of the following:

<iframe allow="fullscreen;">
        allowfullscreen="allowfullscreen"
allowfullscreen="true"

Some might be depricated however I do believe adding allow=“fullscreen;” to the iframe HTML tag would help.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more