Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Enhanced YouTube Embed Code - Animoplex
<!-- Enhanced Youtube Embed Code for Motion Portfolios - Created by Animoplex
Features: Responsive-width player, removes tracking cookies, changes red controls to white, reduces YouTube branding
How to use: Replace the standard YouTube iframe embed code with the code below and add your YouTube video ID -->
<div style="width:100%; max-width:960px;">
<div style="position:relative; height:0; padding-bottom:56.25%;">
<!-- Video size ratio calculation: 1080px / 1920px = 0.5625 (16:9) -->
style="position:absolute; width:100%; height:100%;"
title="Video Player"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
<!-- Replace YOUTUBEVIDEO above with your YouTube video ID (Example: 7_hZlzD4fos) -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment