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 -
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>
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!
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'"
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
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
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.