Created
December 4, 2016 17:49
-
-
Save kylerberry/9b13509c7ee372a392ea60f5486fe6e1 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, 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