{"id":24108305,"url":"https://github.com/reactgular/video-background","last_synced_at":"2025-07-15T03:44:25.972Z","repository":{"id":143783800,"uuid":"388790507","full_name":"reactgular/video-background","owner":"reactgular","description":"React project that demonstrates using a YouTube video as a background cover.","archived":false,"fork":false,"pushed_at":"2021-07-23T12:38:24.000Z","size":11138,"stargazers_count":18,"open_issues_count":0,"forks_count":7,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-12T20:17:37.777Z","etag":null,"topics":["mockup","reactjs","youtube"],"latest_commit_sha":null,"homepage":"https://reactgular.github.io/video-background/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reactgular.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-07-23T12:14:05.000Z","updated_at":"2024-09-15T14:46:45.000Z","dependencies_parsed_at":"2023-05-17T14:45:23.982Z","dependency_job_id":null,"html_url":"https://github.com/reactgular/video-background","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reactgular/video-background","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactgular%2Fvideo-background","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactgular%2Fvideo-background/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactgular%2Fvideo-background/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactgular%2Fvideo-background/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reactgular","download_url":"https://codeload.github.com/reactgular/video-background/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reactgular%2Fvideo-background/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265398708,"owners_count":23758518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mockup","reactjs","youtube"],"created_at":"2025-01-10T23:35:49.576Z","updated_at":"2025-07-15T03:44:25.962Z","avatar_url":"https://github.com/reactgular.png","language":"TypeScript","readme":"# Video Background\n\n![gameplay](images/sample.gif)\n\n## What is it?\n\nThis is a sample project intended to demonstrate how to \noverlay a YouTube video as a background cover.\n\n## Why build it?\n\nWanted to show that achieving this video effect isn't hard, and anyone can do it by following a simple example.\n\n## How does it work?\n\nThe following CSS styles position the YouTube video frame as a background overlay.\n\n```css\n:root {\n    --video-width: 100vw;\n    --video-height: 100vh;\n}\n@media (min-aspect-ratio: 16/9) {\n    :root { --video-height: 56.25vw; }\n}\n@media (max-aspect-ratio: 16/9) {\n    :root { --video-width: 177.78vh; }\n}\n\n.video-background {\n    position: relative;\n    overflow: hidden;\n    width: 100vw;\n    height: 100vh;\n}\n\n.video-background iframe {\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    width: var(--video-width);\n    height: var(--video-height);\n    transform: translate(-50%, -50%);\n}\n```\n\n## How to get it?\n\nClone and run it locally.\n\n```bash\ngit clone https://github.com/reactgular/video-background\ncd video-background\nyarn install\nyarn start\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactgular%2Fvideo-background","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freactgular%2Fvideo-background","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactgular%2Fvideo-background/lists"}