Created
October 16, 2019 14:12
-
-
Save cahva/925adf2d8c102fad1615ef2511557139 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
<script> | |
function tryEl(e) { | |
var privEl = document.querySelector('#bitmovinplayer-video-bitmovin-player'); | |
if (!privEl) { | |
window.requestAnimationFrame(tryEl); | |
} else { | |
removeBackground(privEl); | |
} | |
} | |
function changeBG(el) { | |
var bmovCont = document.querySelector('.bitmovinplayer-container'); | |
bmovCont.style.backgroundColor = 'transparent'; | |
el.target.removeEventListener('loadeddata', changeBG); | |
} | |
function removeBackground(el) { | |
var elListener = el.addEventListener('loadeddata', changeBG); | |
} | |
tryEl(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment