Protected Video


Gutenberg block and Shortcode for embedding YouTube/Vimeo videos in a way that prevents users easily accessing the original video.

This is useful for example when embedding an “unlisted” video as premium course content behind a paywall on your site.

Features include:

  • 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

View Player Demo

Note: This only provides a basic level of protection. Technical users may still be able to identify the original video URL.

This plugin is open source and contributions are welcome on GitHub.


  • Protected Video block in the Block Editor.
  • Configuration of the player theme in plugin settings.
  • Optional usage as Shortcode.
  • Display of the player in the public facing site.


This plugin provides 1 block.

  • Protected Video


  1. Install and activate the plugin
  2. Optionally configure player theme at Settings > Protected Video
  3. Search for and use “Protected Video” block in the Block Editor
  4. Alternatively use the Shortcode [protected_video url="" service="youtube"]


What does this plugin do?

Embeds YouTube/Vimeo videos on your pages and takes steps to prevent users obtaining the original URL to the video, such as by clicking on the player or viewing the page source.

How secure is this plugin?

This plugin only provides a basic level of protection against users accessing the default player or otherwise determining the video URL. Technical users may still be able to figure out this information.

Does this plugin work on mobile?

Yes, the custom player works on mobile browsers and the disabling of access to the default player is still in place even in fullscreen mode.

Why not use plain Plyr player?

The default Plyr player overlays YouTube/Vimeo players with its own controls, which prevents access to the underlying video copy/share buttons under some scenarios, but this is a side-effect of the way it works rather than a feature. The goal of Protected Video is to make this a feature by accounting for more scenarios e.g. when the player is paused, and providing additional features such as obfuscation of the original video ID in the HTML.

If you don’t care about your users sharing the video or actually want them to, a plugin like WP YouTube Lyte is probably more suitable.

Why is there a Shortcode as well as Gutenberg block?

Not everyone likes to use the Block Editor. Others may be using a different page builder that does not support blocks. The Shortcode is provided as an alternative way to embed the video that still provides the same level of protection.


September 6, 2021
I found your plugin after an extensive search for plugins that would block users from seeing the video URL of a Youtube embed. There are a lot of plugins out there, but yours is absolutely the best and works perfectly!
Read all 1 review

Contributors & Developers

“Protected Video” is oopbron sagteware. Die volgende mense het bygedra tot die ontwikkeling van hierdie uitbreiding:


“Protected Video” has been translated into 3 locales. Thank you to the translators for their contributions.

Translate “Protected Video” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



1.4.0 – 2021-11-17

  • Bump dependencies
  • Add Shortcode as alternative embed method
  • Fix installation steps order
  • Optimise banner image PNG

1.3.1 – 2021-11-14

  • Upgrade get-video-id to improve YouTube URL matching
  • Fix typo in plugin description

1.3.0 – 2021-10-13

  • Update npm dependencies
  • Update Plyr version 3.6.8 -> 3.6.9

1.2.10 – 2021-09-18

  • Bump dependencies
  • Bump tar from 6.1.6 to 6.1.11

1.2.9 – 2021-09-05

  • Bump dependencies

1.2.8 – 2021-08-06

  • Update dependencies

1.2.7 – 2021-07-11

  • Bump sub-dependencies to resolve security vulnerabilities

1.2.6 – 2021-07-11

  • Update dependencies
  • Use “block editor” instead of “blocks editor” in readme
  • Tidy readme.txt
  • Update “Tested up to” to WordPress 5.8
  • Update plugin banner and icon

1.2.5 – 2021-07-03

  • Bump dependencies
  • Disable weekly Dependabot PRs
  • Bump release-it from 14.8.0 to 14.9.0
  • Mention /docs in local development instructions
  • Remove links to PRs in readme.txt changelog
  • Improve readme
  • Remove unnecessary .husky/.gitignore

1.2.4 – 2021-06-12

  • Bump rollup from 2.51.1 to 2.51.2
  • Improve readmes
  • Automate dependency PRs
  • Remove unnecessary wp_enqueue_style option
  • Depend on Plyr player CSS for custom CSS
  • Improve dependency naming
  • Support translation of more settings UI strings

1.2.3 – 2021-06-11

  • Improve readme.txt
  • Exclude /docs from plugin dist

1.2.2 – 2021-06-11

  • Add demo of player
  • Link to demo in readmes

1.2.1 – 2021-06-11

  • Improve
  • Simplify readme.txt

1.2.0 – 2021-06-11

  • Add obfuscation of provider and video ID in HTML
  • Improve readmes
  • Remove check-licenses
  • Tidy CI
  • Add license checking to lint
  • Improve FAQ
  • Add CI badge to README

1.1.12 – 2021-06-10

  • Simplify CI workflow
  • Improve readme
  • Update block screenshot

1.1.11 – 2021-06-10

  • Replace “replace” with “replace-in-files”
  • Show error notice when no video ID found
  • Improve block copy
  • Add placeholder to embed input
  • Use “yarn start” instead of “yarn watch”
  • Remove readme CI badge for now
  • Improve plugin banner/icon

1.1.10 – 2021-06-10

  • Run separate lint workflow only on PRs
  • Fix readme.txt changelog

1.1.9 – 2021-06-10

  • Split up deployment workflow
  • Exclude release commits from changelogs
  • Add CI badge to README
  • Improve plugin banner image

1.1.8 – 2021-06-09

  • Exclude release commit from temp changelog
  • Remove unnecessary –oneline flag

1.1.7 – 2021-06-09

  • Improve order of CI steps
  • Exclude Lint workflow from tag pushes
  • Improve date output in changelog

1.1.6 – 2021-06-09

  • Write to temporary file with git log
  • Simplify git log output
  • Exclude temp-changelog.txt from dist

1.1.5 – 2021-06-09

  • Fix output savings

1.1.4 – 2021-06-09

  • Save current tag as output

1.1.3 – 2021-06-09

  • Fix build
  • Fix GitHub release

1.1.2 – 2021-06-09

  • Add fetch-depth

1.1.1 – 2021-06-09

  • Fix changelog generating

1.1.0 – 2021-06-09

  • Move GitHub release to CI
  • Add link to plugin settings on Plugins page
  • Improve readmes
  • Add FAQ

1.0.8 – 2021-06-09

  • Add
  • Improve readme
  • Bump npm deps
  • Add Lint workflow
  • Improve readme
  • Tidy workflow
  • Add check flag to Prettier in CI
  • Rename readme

1.0.7 – 2021-06-09

  • Exclude files from plugin deployment
  • Add missing admin/index.php

1.0.6 – 2021-06-09

  • Remove unnecessary @since comments
  • Set up plugin deploy
  • Specify minimum PHP version
  • Improve plugin description
  • Improve README
  • Improve README
  • Update license in package.json

1.0.5 – 2021-06-06

  • Add admin stylesheet
  • Register block on enqueue_block_editor_assets instead of init

1.0.4 – 2021-06-06

  • Fix version not being updated in plugin header

1.0.3 – 2021-06-06

  • Improve README installation instructions
  • Add GitHub Plugin URI to plugin header

1.0.2 – 2021-06-06

  • Add Rollup build process for public JS
  • Bump release-it version
  • Tweak readme
  • Add plugin banner/icon assets

1.0.1 – 2021-06-05

  • Add release-it

1.0.0 – 2021-06-05

  • Initial commit