Skip to content

Instantly share code, notes, and snippets.

@wplit
Last active November 20, 2020 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wplit/723bd63fbd12366a549d3d1280e1c04a to your computer and use it in GitHub Desktop.
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'
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