开发者 | alecrust |
---|---|
更新时间 | 2024年7月6日 18:46 |
PHP版本: | 7.0 及以上 |
WordPress版本: | 6.6 |
版权: | GPL-2.0-or-later |
版权网址: | 版权信息 |
[protected_video url="https://youtu.be/aqz-KE-bpKQ" service="youtube"]
Embeds YouTube/Vimeo videos on your pages and takes steps to prevent users obtaining the e.g. YouTube URL of the video by clicking on the player or viewing the page source. Watch this YouTube video for an introduction to the plugin and its potential use cases.
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.
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.
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 underlying 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.
The main color of the player can be configured at Settings > Protected Video. If you'd like to style the player further, you can provide your own CSS to override the player's CSS variables: ` :root { --plyr-badge-background: #000; --plyr-control-radius: 5px; } `
Unfortunately not. This plugin loads the standard YouTube player behind the overlay, which we have no control over. These aspects of the YouTube player cannot be disabled.
This plugin embeds the Plyr player in a particular way and adds modifications to prevent access to the underlying video player. This plugin cannot provide additional features to the player itself beyond what is provided by Plyr. If you'd like to see a feature added to the player, please open an issue on Plyr's GitHub.
Currently this plugin only supports YouTube and Vimeo embeds. You can upload your videos to YouTube or Vimeo and then embed them using this plugin. Support for loading your own video file directly from a server is a potential future feature.
The Shortcode is provided as an alternative embed method that still provides the same level of protection. Some people need the Shortcode for use with 3rd party page builders (Elementor etc.) and others simply prefer using a Shortcode over Gutenberg blocks.
This is the format to use if you'd like to use the Shortcode embed method:
[protected_video url="https://youtu.be/aqz-KE-bpKQ" service="youtube"]
A service
of either youtube
or vimeo
must be specified when using the Shortcode embed method.
The Plyr player is responsive by default and will grow to fill the container it is placed in. If you'd like to restrict these dimensions, place the block or Shortcode within a container that has your desired dimensions. See this support topic for more.
If the player is not looking or behaving like the demo on your site, this usually indicates another theme or plugin is interfering with Protected Video. Please try disabling all other plugins one by one and switching to a default theme, to isolate which plugin or theme is causing the issue. For performance reasons, Protected Video only loads its associated JS and CSS when it detects that a Gutenberg block or Shortcode is present on the page. If you insert a video in a non-standard way this detection may fail.