npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jquery-youtube-background

v1.0.0

Published

Creates fullscreen background videos based on the Youtube API

Downloads

194

Readme

jQuery.BackgroundVideo V1.0.5

Inspired by [Tubular] (http://www.seanmccambridge.com/tubular/)

Example: http://rochestb.github.io/jQuery.YoutubeBackground 360 Video Example: http://rochestb.github.io/jQuery.YoutubeBackground/360.html

Production Example: [www.cpbgroup.com] (http://cpbgroup.com)

jQuery plugin that lets you create background videos using youtube api

Put the script at the bottom of your markup right after jQuery:

 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
 <script src="src/jquery.youtubebackground.js"></script>
<div id="video"></div>

Call the plugin function and your carousel is ready.

$('#video').YTPlayer({
    fitToBackground: true,
    videoId: 'LSmgKRx5pBo'
});

Need to customize some CSS in order to make it a background

#video{
 position: relative;
 background: transparent;
}

.ytplayer-container{
 position: absolute;
 top: 0;
 z-index: -1;
}

Works with Youtube Javascript API

Youtube Javascript API Options

Any youtube option must be placed within the playerVars object.

$('#video').YTPlayer({
    fitToBackground: true,
    videoId: 'LSmgKRx5pBo'
    playerVars: {
      modestbranding: 0,
      autoplay: 1,
      controls: 1,
      showinfo: 0,
      branding: 0,
      rel: 0,
      autohide: 0,
      start: 59
    }
});

Access all of YouTube's API events and methods by using player:

var player = $('#background-video').data('ytPlayer').player;
player.pauseVideo();
player.playVideo();

player.addEventListener('onStateChange', function(data){
  console.log("Player State Change", data);
});

Options

For more details visit our [Documentations Page] (http://rochestb.github.io/jQuery.YoutubeBackground)

Install with Bower

bower install youtube-background-video

Documentation

[Documentations Page] (http://rochestb.github.io/jQuery.YoutubeBackground)

Contributing

I welcome contributors, bugs, and questions.

Bug reports

A bug is a demonstrable problem that is caused by the code in the repository. Good bug reports are extremely helpful, so thanks!

Guidelines for bug reports:

  1. Use the GitHub issue search — check if the issue has already been reported.

  2. Check if the issue has been fixed — try to reproduce it using the latest develop branch in the repository.

  3. Isolate the problem — ideally create a reduced test case and a live example. This JSFiddle is a helpful template you can fork.

By submitting a patch, you agree to allow the project owner to license your work under the terms of the MIT License.

License

The code and the documentation are released under the MIT License.