Last active
November 20, 2020 13:57
-
-
Save wplit/723bd63fbd12366a549d3d1280e1c04a to your computer and use it in GitHub Desktop.
pro media player, adding params manually on the youtube embed eg.. 'enablejsapi=1&controls=0&autoplay=1&rel=0'
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
document.querySelector('#%%ELEMENT_ID%% vime-player').addEventListener('vPlaybackReady', (event) => { | |
const embed = document.querySelector('#%%ELEMENT_ID%% vime-embed'); | |
// Don't remove the enablejsapi=1 as the player needs it | |
embed.params = 'enablejsapi=1&controls=0'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment