pierrinho / allofthelights.js Goto Github PK
View Code? Open in Web Editor NEWjQuery plugin to turn off the light and enjoy your videos
Home Page: http://www.megaptery.com/allofthelights/
jQuery plugin to turn off the light and enjoy your videos
Home Page: http://www.megaptery.com/allofthelights/
It's not a delay, it's a duration, and without reading the documentation (e.g. looking only at code) it's not clear whether turn_on refers to the lights (hence lights off first, then lights on) or the plugin (so switching the plugin on turns off the lights, etc) hence I suggest they should be named duration_lights_off and duration_lights_on (and documented in that order) so that there is no ambiguity.
The description "Allows disable scrolling when the light is on if value is false." for scrolling:true is rather confusing.
I suggest "When set to false scrolling becomes disabled while the lights are off" if that's how it behaves.
If it doesn't then it should, as that's what one would intuitively expect a parameter named "scrolling" to do.
I was expecting there to be an example of how to turn off the lights automatically when the Play button is pressed in a player (or it starts automatically at page load) and how to turn them back on when the Pause state is reached (by press/click/tap or at end of video), as this is surely the most common scenario for Allofthelights.js to be used.
I suggest providing examples for both YouTube and the default/standard browser HTML5 players to support easy implementation of this by others.
See https://developers.google.com/youtube/iframe_api_reference#Adding_event_listener and https://developers.google.com/youtube/js_api_reference#Adding_event_listener for YouTube and http://www.w3.org/TR/html5/embedded-content-0.html#mediaevents for the HTML5 media player.
I was working on implementing allofthelights.js on a site that already uses fitvids.js (http://fitvidsjs.com/), and noticed there is an issue. fitvids.js adds a DIV around video iframes with certain padding, when allofthelights.js is implemented (and works) it duplicates this specific DIV which in turn pushes video down due to double padding. See screenshot.
Hi,
Can you add the minified JS file ?
Thanks
It's nice that you've made it support multiple players, but it's not clear how and it's not necessarily desirable in all cases - does this only happen if I invoke .allofthelights() on a jQuery collection of more than one player? Or does it somehow automagically detect other players on the page? This should be documented for clarity.
Hello
In IE10 it pushes down my player to the same distance as player height.
Any clue when IE10 will be fully tested?
http://www.megaptery.com/allofthelights/ gives a timeout error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.