A secure and feature-rich WordPress plugin to embed Vidinfra video player with iframe support, dynamic watermark options, and customizable settings.
- 🎥 Easy Video Embedding - Simple shortcode and Gutenberg block integration
- 🔒 Security First - All user inputs are sanitized and validated
- 🎨 Customizable Player - Control autoplay, loop, muted, controls, and more
- 💧 Dynamic Watermark Support - Automatically add watermarks based on logged-in user information (name, email, or user ID)
- 🎨 Watermark Customization - Configure font size, color, and opacity for watermarks
- 📱 Fully Responsive - Player library handles all responsive behavior automatically
- ⚙️ Admin Settings - Tabbed interface with General and Dynamic Watermark settings
- 🧩 Gutenberg Block - Full support for the WordPress block editor
- 🌐 Translation Ready - Internationalization support with text domain
- 🎯 Clean Output - Minimal markup, all styling handled by Vidinfra player library
- Download the plugin files
- Upload the
vidinfra-playerfolder to the/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Go to Settings > Tenbyte VidInfra to configure default settings
Use the [vidinfra] shortcode to embed videos:
[vidinfra video_id="59777392"]
Note: Only video_id is required. The library_id will be taken from the default settings configured in the admin panel. You can override it in the shortcode if needed.
video_id(required) - The Vidinfra video ID (string or number)library_id(optional) - The library ID (string or number, uses default from settings if not provided)player_id(optional) - The player ID (string or number, defaults to "default")width(optional) - Player width (number in pixels or string with unit, e.g., "800" or "100%")height(optional) - Player height (number in pixels or string with unit, e.g., "450" or "auto")aspect_ratio(optional) - Aspect ratio when width/height not specified (16:9, 4:3, 1:1, 21:9, 9:16, default: 16:9)autoplay(optional) - Auto-play video (true/false, default: false)loop(optional) - Loop video (true/false, default: false)muted(optional) - Mute video (true/false, default: false)controls(optional) - Show controls (true/false, default: true)preload(optional) - Preload video (true/false, default: true)loading(optional) - Loading strategy (lazy/eager, default: eager)class_name(optional) - Additional CSS classes for customization
Override the default library ID for a specific video:
[vidinfra video_id="59777392" library_id="9876543"]
[vidinfra video_id="59777392" width="800" height="450" autoplay="false" loop="false" muted="false" controls="true" preload="true" aspect_ratio="16:9" loading="lazy" class_name="featured-video"]
When you specify width and/or height, the Vidinfra player library will apply those dimensions to the generated iframe:
[vidinfra library_id="1234567" video_id="59777392" width="800" height="450"]
The aspect_ratio parameter is passed to the Vidinfra player library to control the iframe's aspect ratio:
[vidinfra library_id="1234567" video_id="59777392" aspect_ratio="16:9"]
Note: All styling and responsiveness is handled by the Vidinfra player library. The plugin generates a simple container div, and the library creates its own iframe with built-in styles.
- In the block editor, click the (+) icon to add a new block
- Search for "Vidinfra Player"
- Configure the video settings in the block sidebar
- Enter the required Video ID
- Optionally configure player options and watermark settings
Navigate to Settings > Vidinfra Player to configure:
- Default Library ID
- Default Player ID
- Default Aspect Ratio
These defaults will be used when parameters are not specified in the shortcode or block.
- ✅ Input sanitization for all user-provided data
- ✅ Output escaping for all displayed content
- ✅ Nonce verification for settings forms
- ✅ Capability checks for admin functions
- ✅ Validation of all parameters
- ✅ XSS protection
- ✅ SQL injection prevention
The plugin follows WordPress coding standards and provides the following:
- Action:
plugins_loaded- Initialize the plugin - Action:
wp_enqueue_scripts- Enqueue frontend assets - Action:
admin_enqueue_scripts- Enqueue admin assets - Shortcode:
vidinfra- Render video player
vidinfra-player/
├── vidinfra-player.php # Main plugin file
├── uninstall.php # Uninstall cleanup
├── assets/
│ ├── css/
│ │ ├── frontend.css # Frontend styles
│ │ └── admin.css # Admin styles
│ └── js/
│ ├── frontend.js # Frontend scripts
│ ├── admin.js # Admin scripts
│ └── block.js # Gutenberg block
├── languages/ # Translation files
└── README.md # This file
- WordPress 5.0 or higher
- PHP 7.2 or higher
See CHANGELOG.md for detailed version history.
- Improved WordPress Plugin Directory compliance
- Added activation/deactivation hooks
- Enhanced security measures
- Modernized Clipboard API usage
- Added settings link to plugins page
- Improved translation support
- Added security documentation
- Code refactoring and optimization
For support, feature requests, or bug reports, please visit the plugin repository.
This plugin is licensed under the GPL v2 or later.
This plugin uses the Vidinfra Player library: https://www.npmjs.com/package/@vidinfra/player