Skip to content

Instantly share code, notes, and snippets.

@kylerberry
Created December 4, 2016 17:49
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 kylerberry/9b13509c7ee372a392ea60f5486fe6e1 to your computer and use it in GitHub Desktop.
Save kylerberry/9b13509c7ee372a392ea60f5486fe6e1 to your computer and use it in GitHub Desktop.
Wistia.plugin(‘rewind’, function(video, customOptions) {
// make a button
var button = document.createElement(‘div’);
button.setAttribute(‘class’,’w-control’);
button.innerHTML = ‘Rewind’;
 
// on click, rewind the video
button.addEventListener(‘click’, function(e) {
video.time(video.time() — 10);
});
 
// place the button in our player
video.grid.above.appendChild(button);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment