All Projects → dvlden → Vidage

dvlden / Vidage

Licence: mit
Your solution to full-screen background video & image combined.

Programming Languages

javascript
184084 projects - #8 most used programming language
SCSS
7915 projects

Projects that are alternatives of or similar to Vidage

Api
API for Current cases and more stuff about COVID-19 and Influenza
Stars: ✭ 2,323 (+47.12%)
Mutual labels:  hacktoberfest, hacktoberfest2021
Super Productivity
To-do list & time tracker for programmers and other digital workers with Jira, Github, and Gitlab integration
Stars: ✭ 4,505 (+185.31%)
Mutual labels:  hacktoberfest, hacktoberfest2021
Linkedin Skill Assessments Quizzes
Full reference of LinkedIn answers 2021 for skill assessments, LinkedIn test, questions and answers (aws-lambda, rest-api, javascript, react, git, html, jquery, mongodb, java, Go, python, machine-learning, power-point) linkedin excel test lösungen, linkedin machine learning test
Stars: ✭ 7,014 (+344.21%)
Mutual labels:  hacktoberfest, hacktoberfest2021
Cosmos
Hacktoberfest 2021 | World's largest Contributor driven code dataset | Algorithms that run our universe | Your personal library of every algorithm and data structure code that you will ever encounter |
Stars: ✭ 12,936 (+719.25%)
Mutual labels:  hacktoberfest, hacktoberfest2021
Nodejs.dev
A new Node.js resource built using Gatsby.js with React.js, TypeScript, and Remark.
Stars: ✭ 1,794 (+13.62%)
Mutual labels:  hacktoberfest, hacktoberfest2021
Greenshot
Greenshot for Windows - Report bugs & features go here: https://greenshot.atlassian.net or look for information on:
Stars: ✭ 2,562 (+62.25%)
Mutual labels:  hacktoberfest, hacktoberfest2021
Openlibrary
One webpage for every book ever published!
Stars: ✭ 3,311 (+109.69%)
Mutual labels:  hacktoberfest, hacktoberfest2021
Earthly
Repeatable builds
Stars: ✭ 5,805 (+267.64%)
Mutual labels:  hacktoberfest, hacktoberfest2021
Vue Material
Material design for Vue.js
Stars: ✭ 9,528 (+503.42%)
Mutual labels:  hacktoberfest, hacktoberfest2021
Fastlane
🚀 The easiest way to automate building and releasing your iOS and Android apps
Stars: ✭ 33,382 (+2014.12%)
Mutual labels:  hacktoberfest, hacktoberfest2021
vue-responsive-video-background-player
Play your own videos in background responsively in different resolutions.
Stars: ✭ 212 (-86.57%)
Mutual labels:  background-video, background
Vsc Material Theme
Material Theme, the most epic theme for Visual Studio Code
Stars: ✭ 1,617 (+2.41%)
Mutual labels:  hacktoberfest, hacktoberfest2021
Ferret
Declarative web scraping
Stars: ✭ 4,837 (+206.33%)
Mutual labels:  hacktoberfest, hacktoberfest2021
Dbatools
🚀 SQL Server automation and instance migrations have never been safer, faster or freer
Stars: ✭ 1,742 (+10.32%)
Mutual labels:  hacktoberfest, hacktoberfest2021
Tuist
🚀 Create, maintain, and interact with Xcode projects at scale
Stars: ✭ 2,234 (+41.48%)
Mutual labels:  hacktoberfest, hacktoberfest2021
He4rtoberfest 2020
Stars: ✭ 124 (-92.15%)
Mutual labels:  hacktoberfest
Webhint.io
🌍 webhint's website
Stars: ✭ 124 (-92.15%)
Mutual labels:  hacktoberfest
Netbeans
Apache NetBeans
Stars: ✭ 1,747 (+10.64%)
Mutual labels:  hacktoberfest
Cobalt2
Tweaked and refined Sublime Text theme based on the original cobalt.
Stars: ✭ 1,558 (-1.33%)
Mutual labels:  hacktoberfest
Goteo
Goteo Version 3, the Open Source Crowdfunding Platform
Stars: ✭ 124 (-92.15%)
Mutual labels:  hacktoberfest

Vidage

This JS module will treat video as a background. It will determine when to hide/show & pause/play the video. Touch devices and/or smaller devices with width of 34em will display image provided as fallback.

Installation (pick one)

  1. Download latest release
  2. git clone https://github.com/dvlden/vidage.git
  3. yarn add vidage
  4. npm i vidage

CDN (pick one)

  1. JSDelivr
  2. UNPKG

Usage

Preferred way...

Add base structure and replace video source paths

<div class="vidage">
  <video id="vidage" class="vidage-video" preload="metadata" loop autoplay muted>
    <source src="videos/bg.webm" type="video/webm">
    <source src="videos/bg.mp4" type="video/mp4">
  </video>
</div>

Setup and import required styles

// set the fallback-cover image
$vdg-fallback-image: url('../images/fallback.jpg');

// import package
@import '~vidage/src/styles/vidage';

Import the JS module and create new instance

import Vidage from 'vidage'

new Vidage('#vidage')

Old fashioned way...

Below you will find complete html example...

<!doctype html>
  <html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Document</title>

    <link rel="stylesheet" href="dist/vidage.css">
    <style>
      /* Override the cover image. Set the path to the actual image... */
      .vidage::before {
        background-image: url('images/fallback.jpg');
      }
    </style>
  </head>

  <body>
    <div class="vidage">
      <video id="vidage" class="vidage-video" preload="metadata" loop autoplay muted>
        <source src="videos/bg.webm" type="video/webm">
        <source src="videos/bg.mp4" type="video/mp4">
      </video>
    </div>

    <!-- START: Rest of your site content -->
    ...
    <!-- END: Rest of your site content -->

    <script src="dist/vidage.js"></script>
    <script>
      new Vidage('#vidage')
    </script>
  </body>
</html>

JS Arguments

Instance of Vidage accepts two arguments. First argument is the actual selector of the video, that instance will control. Second argument is the actual object for the options.

Argument Required Type
selector string/node
options object
Key Default Value Required Type
helperClass vidage-ready string
videoRemoval false bool

SCSS Variables

Variable Default Value
$vdg-fallback-image url('../images/cover.jpg')

Browser Support

Yet to be determined. All modern browsers should be alright.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].