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

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.