{"id":30097429,"url":"https://github.com/nonwip/vidage","last_synced_at":"2025-12-12T02:55:48.304Z","repository":{"id":49764277,"uuid":"61346053","full_name":"nonwip/vidage","owner":"nonwip","description":"Your solution to full-screen background video \u0026 image combined.","archived":false,"fork":false,"pushed_at":"2022-10-06T15:08:56.000Z","size":5391,"stargazers_count":1580,"open_issues_count":1,"forks_count":71,"subscribers_count":34,"default_branch":"main","last_synced_at":"2025-10-30T11:53:08.444Z","etag":null,"topics":["background","background-video","hacktoberfest","video"],"latest_commit_sha":null,"homepage":"https://dvlden.github.io/vidage/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nonwip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-17T04:42:11.000Z","updated_at":"2025-10-03T15:45:34.000Z","dependencies_parsed_at":"2022-08-30T14:00:59.858Z","dependency_job_id":null,"html_url":"https://github.com/nonwip/vidage","commit_stats":null,"previous_names":["nonwip/vidage","dvlden/vidage"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nonwip/vidage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonwip%2Fvidage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonwip%2Fvidage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonwip%2Fvidage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonwip%2Fvidage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nonwip","download_url":"https://codeload.github.com/nonwip/vidage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonwip%2Fvidage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27675311,"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","status":"online","status_checked_at":"2025-12-12T02:00:06.775Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["background","background-video","hacktoberfest","video"],"created_at":"2025-08-09T12:02:29.379Z","updated_at":"2025-12-12T02:55:48.291Z","avatar_url":"https://github.com/nonwip.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Vidage\n\nThis JS module will treat video as a background. It will determine when to hide/show \u0026 pause/play the video.\nTouch devices and/or smaller devices with width of **34em** will display image provided as fallback.\n\n\n## Installation (pick one)\n\n- `npm i @dvlden/vidage`\n- `pnpm i @dvlden/vidage`\n- `yarn add @dvlden/vidage`\n\n\n## CDN (pick one)\n\n1. [JSDelivr](https://www.jsdelivr.com/package/npm/vidage?path=dist)\n2. [UNPKG](https://unpkg.com/vidage@latest/dist/)\n\n\n## Usage\n\nPreferred way...\n\n\u003e Add base structure and replace video source paths\n\n```html\n\u003cdiv class=\"vidage\"\u003e\n  \u003cvideo id=\"vidage\" class=\"vidage-video\" preload=\"metadata\" loop autoplay muted\u003e\n    \u003csource src=\"videos/bg.webm\" type=\"video/webm\"\u003e\n    \u003csource src=\"videos/bg.mp4\" type=\"video/mp4\"\u003e\n  \u003c/video\u003e\n\u003c/div\u003e\n```\n\n\u003e Setup and import required styles\n\n```scss\n// set the fallback-cover image\n$vdg-fallback-image: url('../images/fallback.jpg');\n\n// import package\n@import '~vidage/src/styles/vidage';\n```\n\n\u003e Import the JS module and create new instance\n\n```js\nimport Vidage from 'vidage'\n\nnew Vidage('#vidage')\n```\n\n---\n\nOld fashioned way...\n\n\u003e Below you will find complete `html` example...\n\n```html\n\u003c!doctype html\u003e\n  \u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003ctitle\u003eDocument\u003c/title\u003e\n\n    \u003clink rel=\"stylesheet\" href=\"dist/vidage.css\"\u003e\n    \u003cstyle\u003e\n      /* Override the cover image. Set the path to the actual image... */\n      .vidage::before {\n        background-image: url('images/fallback.jpg');\n      }\n    \u003c/style\u003e\n  \u003c/head\u003e\n\n  \u003cbody\u003e\n    \u003cdiv class=\"vidage\"\u003e\n      \u003cvideo id=\"vidage\" class=\"vidage-video\" preload=\"metadata\" loop autoplay muted\u003e\n        \u003csource src=\"videos/bg.webm\" type=\"video/webm\"\u003e\n        \u003csource src=\"videos/bg.mp4\" type=\"video/mp4\"\u003e\n      \u003c/video\u003e\n    \u003c/div\u003e\n\n    \u003c!-- START: Rest of your site content --\u003e\n    ...\n    \u003c!-- END: Rest of your site content --\u003e\n\n    \u003cscript src=\"dist/vidage.js\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n      new Vidage('#vidage')\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## JS Arguments\n\nInstance of Vidage accepts two arguments. First argument is \nthe actual selector of the video, that instance will control.\nSecond argument is the actual object for the options.\n\n| Argument   | Required Type |\n| ---------- | ------------- |\n| `selector` | `string/node` |\n| `options`  | `object`      | \n\n| Key            | Default Value  | Required Type |\n| -------------- | -------------- | ------------- |\n| `helperClass`  | `vidage-ready` | `string`      |\n| `videoRemoval` | `false`        | `bool`        |\n\n\n## SCSS Variables\n\n| Variable              | Default Value                |\n| --------------------- | ---------------------------- |\n| `$vdg-fallback-image` | `url('../images/cover.jpg')` |\n\n\n## Browser Support\n\nYet to be determined. All modern browsers should be alright.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonwip%2Fvidage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonwip%2Fvidage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonwip%2Fvidage/lists"}