Skip to content

Instantly share code, notes, and snippets.

@pedrombafonso
Created December 13, 2014 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedrombafonso/a224f234526c7f82051f to your computer and use it in GitHub Desktop.
Save pedrombafonso/a224f234526c7f82051f to your computer and use it in GitHub Desktop.
LiveClicker Video - Random code helpers for liveclicker
// checks play time
var checkTimeInterval = 500;
setInterval(function detectVideoPlay() {
try {
var player = $('embed', $el)[0];
if (player.getSettings().playTime > Number($el.data('duration'))) {
pause(element);
}
} catch(e) { }
}, checkTimeInterval);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment