=== EcomCiné ===
Contributors: ecomcine, ctailer
Tags: hero video, background video, video player, homepage video, hero section
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.9.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A fast full-width hero video player for your homepage, plus a gallery of ready-made hero videos you can apply to a page in two clicks.

== Description ==

EcomCiné gives your site a cinematic first screen without touching code.

**Hero Player**

* Full-width or "TV screen" video hero that loads light: the poster shows first, the video follows.
* One video loops; several videos play one after another.
* Player controls: none, Minimal (play and sound) or Playlist (previous / next, titles and dots).
* Background mode: the video runs behind your site header, like a homepage hero.
* Use it through the **EcomCiné Hero Video** block or the `[ecomcine_hero]` shortcode, with any theme.
* The player plays the videos from your own Media Library and never contacts another website.

**Hero Studio** (EcomCiné → Hero)

* Build the hero with a live preview: videos, title, text, two buttons, text position, overlay, button colour, player controls.
* Save it on any page or post (it is added at the top, or replaces the hero already there), then undo it with one click if you change your mind.
* "Manage your heroes" lists every page that shows a Hero Player, with a quick "Change video".

**Hero video gallery** (EcomCiné → Hero videos, optional)

* Browse ready-made hero videos made for online stores and websites, hosted on ecomcine.com.
* Free videos download in HD with a small EcomCiné watermark, or without it once you connect a free EcomCiné account.
* With a free account, a video downloads straight into your Media Library and is put on a new or existing page as a Hero Player in one click. Without an account, download it to your computer and upload it yourself.
* Higher resolutions, more videos, single downloads and exclusive rights are offered on ecomcine.com; the gallery only links there.

== External services ==

The Hero Player and Hero Studio work entirely on your own site. Only the optional **Hero videos** tab (the gallery) uses an external service: **ecomcine.com**, operated by the plugin's author.

**Nothing is sent until an administrator clicks "Show the hero videos" on the Hero videos tab.** It can be switched off again at any time at the bottom of that tab ("Stop contacting ecomcine.com").

After that consent:

* **Listing the videos:** while an administrator has the Hero videos tab open, your site asks ecomcine.com for the list of videos (cached for one minute). Like every request WordPress makes, it shows your server's IP address, the WordPress version and your site address. The administrator's browser loads the video previews and poster images of the gallery from ecomcine.com.
* **Linking a free account (optional):** the "Create free account / Log in" button opens ecomcine.com with your site address, site name and a random site identifier. When you come back, your site exchanges a one-time code for a site token (sending the code, the site address and the identifier). The token is stored on your site and sent with later requests; "Disconnect this site" deletes it and tells ecomcine.com.
* **Downloading a video:** the id of the chosen video and version are sent, and the file and its poster are downloaded from ecomcine.com into your Media Library (or, with "Download to my computer", by your browser).
* **Video slots (linked account only):** when a hero that uses a gallery video is saved on a published page, your site tells ecomcine.com the page address and the video id, so the video takes one of your plan's slots (removing the video frees it). Once a day, a scheduled task asks ecomcine.com which file each of these heroes should play; the answer is stored on your site, so page views never wait for ecomcine.com. Unlinking the site, or "Stop contacting ecomcine.com", stops this.
* **Hosted video (paid plans only):** for an account with a paid plan, the hero plays a speed-optimized 2K file served by ecomcine.com, so your visitors' browsers load that file from ecomcine.com (which sees their IP address and browser, like any web request). Once per page view, after the video starts, the browser sends the slot number to ecomcine.com to count views for the plan's fair-use limit; no cookie, no personal data. If ecomcine.com does not answer, the hero plays the copy stored in your Media Library. Free accounts and sites without an account always play the file from your own site.
* **Plans and purchases:** "Upgrade", "Add a slot", plan and "ecomcine.com" links open pages on ecomcine.com in a new tab; nothing is bought inside the plugin.

This service:

* **Service terms:** https://ecomcine.com/ecomcine-licence/terms/
* **Privacy policy:** https://ecomcine.com/privacy/

Videos from the gallery are used under the licence shown with each video on ecomcine.com.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install it from the Plugins screen, then activate it.
2. Go to **EcomCiné → Hero** to build a hero and save it on a page, or add the **EcomCiné Hero Video** block / `[ecomcine_hero]` shortcode anywhere.
3. Optional: open **EcomCiné → Hero videos** to browse the gallery and put a hero video on a page.

== Frequently Asked Questions ==

= Do I need an account? =
No. The Hero Player and Hero Studio work with your own videos and no account. A free EcomCiné account is only needed to download gallery videos without the watermark, straight into your Media Library.

= Does the plugin contact other websites on its own? =
No. Nothing leaves your site until an administrator clicks "Show the hero videos" on the Hero videos tab. With a linked EcomCiné account, the site also checks once a day which file each gallery hero plays, and on paid plans your visitors load the hosted video from ecomcine.com. See "External services" above.

= What happens if I cancel a paid plan? =
Nothing breaks. The hero keeps playing the HD copy stored in your Media Library, without a watermark, as on the free account.

= Which editors are supported? =
The block editor (EcomCiné Hero Video block), and any theme or page builder through the `[ecomcine_hero]` shortcode.

= What is removed when I delete the plugin? =
Its options, the gallery cache, the cached video sources and their daily task, the Hero Studio undo copies and the "Hero Studio seen" flag. Your videos, pages and the heroes on them stay.

== Changelog ==

= 0.9.6 =
* Video slots: a gallery video used in a hero takes one slot of your EcomCiné plan; the Hero tab shows the slots in use and an "Add a slot" button.
* Paid plans play a speed-optimized 2K file hosted by EcomCiné, with the copy in your Media Library as automatic fallback; cancelling a plan never breaks the hero.
* Linking a free account replaces watermarked gallery videos with clean ones.

= 0.9.5 =
* Hero Studio: new editor (live preview with your site header, two-column form, per-button colours, bold/italic/line breaks in the texts).
* The player and the editor now come from the shared EcomCiné player (readable source and source maps included).

= 0.9.6 =
* First WordPress.org release: Hero Player (block and shortcode), Hero Studio and the hero video gallery.
