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
Answer a question...

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.