WordPress plugin that provides a Gutenberg block and traditional Shortcode for embedding YouTube/Vimeo videos, in a way that prevents users easily accessing the original video.
- Plyr player used to overlay default player with custom controls
- Player modifications to always prevent clicking the default player
- Encodes video ID in HTML to prevent finding it via “View Source”
- Settings page to configure the player theme to match your site
To embed a video either search for "Protected Video" in the Block Editor, or use the Shortcode e.g.
[protected_video url="https://youtu.be/c_hO_fjmMnk" service="youtube"]
To develop locally within WordPress, symlink this repository to
yarn build to build the plugin, and activate it in the WordPress admin.
yarn start to build/watch files for development within WordPress.
yarn start:demo to build/watch files for standalone player demo and open in browser.