Skip to content

AlecRust/protected-video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banner

Protected Video Lint

WordPress plugin that provides a Gutenberg block and traditional Shortcode for embedding YouTube/Vimeo videos, in a way that prevents users easily accessing the underlying video.

Features

  • 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 e.g. to configure the player theme to match your site

View Player Demo

Installation

Install from the WordPress Plugin Directory or grab a ZIP from Releases. This plugin supports Git Updater.

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/aqz-KE-bpKQ" service="youtube"]

Development

Ensure you have the following installed:

Start a WordPress instance for developing this plugin:

  1. npm install
  2. composer install
  3. npm run build
  4. npm run env start

Run npm start to watch and rebuild block source files as they change.

Run npm run start:demo to launch the demo page on a local server.