Created
May 29, 2015 15:59
-
-
Save DaveVoyles/59df1832a959ea1cb950 to your computer and use it in GitHub Desktop.
Change CSS filters on video
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
// changeCssFiltersOnVid() - Cycle through CSS filters applied to the video stream | |
// 1. Grab a reference to the video tag | |
// 2. Keep the original CSS classes while still adding the filters | |
// 3. Loop through all of the filters | |
var changeCssFilterOnVid = function () { | |
var el = document.getElementById('videoTag'); | |
el.className = 'view--video__video'; | |
var effect = filters[index++ % filters.length] | |
if (effect) { | |
el.classList.add(effect); | |
console.log(el.classList); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment