Skip to content

hemanth/video-bg

Repository files navigation

<hello-world>

Set a video as your HTML background.

Demo

Check it live!

Install

$ bower install video-bg --save

Or download as ZIP.

Usage

  1. Import Web Components' polyfill:

    <script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
  2. Import Custom Element:

    <link rel="import" href="bower_components/video-bg/dist/video-bg.html">
  3. Start using it!

    <video-bg srcs=["video.mp4","video.ogg", "video.webm"] muted="muted"></video-bg>

Options

Attribute Options Default Description
srcs array `` Array of fallback video URLs.
muted string `` "muted" or ""

TODO

  • Support few other attributes.

About

Custom polymer element to set a responsive video as your HTML background.

Resources

Stars

Watchers

Forks

Packages

No packages published