Created
December 4, 2016 18:11
-
-
Save kylerberry/b2e230e9147588132a7fe96fdac7253a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Wistia.plugin(‘rewind’, function(video, options) { | |
// make a button | |
var button = document.createElement(‘div’); | |
button.setAttribute(‘class’, ‘w-control’); | |
button.innerHTML = ‘Rewind’; | |
button.style.display = ‘block’; | |
// on click, rewind the video | |
button.addEventListener(‘click’, function(e) { | |
video.time(video.time() — 10); | |
}); | |
// append our button to the control region | |
video.ready(function() { | |
var container = document.querySelector(‘.w-control-bar__region — right’); | |
container.appendChild(button); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment