=== Shaban Scroll Video Widget for Elementor ===
Contributors: sitebyshaban
Tags: elementor, video, youtube, vimeo, scroll video
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: elementor
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds an Elementor widget that plays YouTube, Vimeo, Dailymotion, or MP4 video only when it is visible on screen, and pauses it when out of view.

== Description ==

Shaban Scroll Video Widget for Elementor adds a lightweight Elementor widget named Scroll Play Video.

It supports YouTube, Vimeo, Dailymotion, self-hosted video, and direct MP4 URLs. The video starts when the visitor scrolls to the widget and pauses when the widget leaves the viewport. This helps reduce unnecessary background playback and gives better control than a basic always-playing video section.

This plugin is an independent add-on for Elementor and is not affiliated with, endorsed by, or sponsored by Elementor.

Main features:

* YouTube, Vimeo, and Dailymotion support, alongside self-hosted video and direct MP4 URLs.
* Poster image (for self-hosted and MP4 URL sources).
* Play when visible on screen.
* Pause when out of view.
* Optional restart when visible again.
* Visibility threshold control.
* Mute, loop, controls, and preload controls.
* Aspect ratio presets: 16:9, 4:5, 1:1, 9:16, 3:4, and 21:9.
* Custom height mode for hero and section-style videos.
* Object fit, border, border radius, box shadow, and CSS filter controls.
* Admin instructions page under Settings > Scroll Video Widget.

YouTube, Vimeo, and Dailymotion videos load through each platform's own official embed and player API. No extra tracking or analytics scripts are added by this plugin, and their respective player scripts are only loaded on pages where that specific video source is actually used.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install the ZIP from the WordPress Plugins screen.
2. Activate the plugin through the Plugins screen in WordPress.
3. Make sure Elementor is installed and active.
4. Open a page with Elementor.
5. Search for Scroll Play Video and drag it into your layout.
6. Choose a video source (YouTube, Vimeo, Dailymotion, self-hosted, or direct MP4 URL) and add your video.

== Frequently Asked Questions ==

= Is this plugin affiliated with Elementor? =

No. This plugin is an independent add-on for Elementor and is not affiliated with, endorsed by, or sponsored by Elementor.

= Why does autoplay not work when sound is enabled? =

Modern browsers usually block autoplay with sound. Keep the Muted option enabled for reliable autoplay behavior.

= Does this support YouTube, Vimeo, or Dailymotion? =

Yes. Select the source in the widget's Video section and paste the video link.

= Does it stop the video when the user scrolls away? =

Yes. Enable Pause When Out Of View. This is enabled by default.

= Can I use Cloudflare R2 or Bunny Storage? =

Yes, if you use a direct public MP4 file URL.

= Can I choose 4:5 post size or 9:16 reel size? =

Yes. Use the Aspect Ratio control inside the widget Style tab.

= Does this plugin add any tracking of its own for YouTube, Vimeo, or Dailymotion videos? =

No. Each platform's video loads through its own official embed and player API, the same as embedding it directly. This plugin does not add any additional tracking or analytics.

== Screenshots ==

1. Scroll Play Video widget controls in Elementor.
2. Aspect ratio and style controls.
3. Instructions dashboard under Settings.

== Changelog ==

= 1.0.0 =
* Initial public release.
* Scroll Play Video widget for Elementor: plays video only while visible on screen, pauses when out of view.
* YouTube, Vimeo, and Dailymotion support, alongside self-hosted video and direct MP4 URL support.
* Poster image, visibility threshold, optional restart on re-entry.
* Mute, loop, controls, and preload options.
* Aspect ratio presets, custom height mode, object fit, border, box shadow, and CSS filter controls.
* Admin instructions page under Settings > Scroll Video Widget.

== Upgrade Notice ==

= 1.0.0 =
Initial public release.
