=== Stillhaven ===
Contributors: stillhaven
Tags: video, embed, video hosting, oembed, private video
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed video on your WordPress site from a share link or your library, and find every video already embedded on it, whoever hosts it.

== Description ==

Two jobs, both on your own site.

**Embed video on your WordPress site.** Paste a [Stillhaven](https://stillhaven.io) share link into a post and it becomes the player, for every author on the site, with fullscreen and picture-in-picture intact. Or use the Stillhaven video block, which shows the player in the editor and sets the shape, a start time and a caption. With an API key the block picks a video straight from your library, and a Library page lists your videos with a link or a shortcode to copy. There is a shortcode for the Classic editor and page builders, and a Divi module with the same settings.

**Find every video already embedded on your site.** Stillhaven → Find embeds scans your posts and pages and lists every one with a video in it, whoever hosts it: Vimeo, Wistia, YouTube, a self-hosted file, Stillhaven, or any other player in an iframe. Each embed is labelled with its host, the list filters by host, every row links to the editor, and the list exports as CSV. Moving a library host by host? That is the list of pages to replace. The scan runs on demand, saves its result on your site, and sends nothing anywhere.

Stillhaven is private, ad-free video hosting for creators and small teams: no ads, no recommendations after the video, your original file kept and downloadable, and embeds that play only on the domains you allow. Autoplay, muted, loop and captions are set on the video in the Stillhaven console, so a video behaves the same everywhere it is embedded.

= What this plugin sends where =

Without an API key, the only request the plugin causes is the one WordPress makes to look up a pasted link: a GET to `https://play.stillhaven.io/oembed` carrying that link. The player itself loads from `play.stillhaven.io` in the visitor's browser, as any embedded video does.

Find embedded videos runs entirely on your site: it reads your own posts and pages and saves the result in your database. Nothing about it is sent to Stillhaven, not even a count.

With an API key, your site's server also calls the Stillhaven API at `https://console.stillhaven.io/api/v1` on behalf of signed-in editors: `/me` to confirm the key, `/videos` to list and search your library, and `/videos/{id}` to describe a pasted link. The key never leaves your server. Nothing is sent about your visitors, and the plugin collects no analytics of its own.

Documentation: https://stillhaven.io/docs/wordpress. Stillhaven's terms: https://stillhaven.io/legal/terms. Privacy policy: https://stillhaven.io/legal/privacy.

== Installation ==

1. Install and activate the plugin.
2. Paste a Stillhaven share link into a post, or add the Stillhaven video block.
3. Optional: under Stillhaven → Settings, add an API key to pick videos from your library. Create it in the Stillhaven console under Settings → API with only the videos:read scope; the plugin reads and never writes. Every paid plan includes a read-only key.

== Frequently Asked Questions ==

= Where do I find a share link? =

On the video's page in the Stillhaven console: Copy share link. It looks like `https://play.stillhaven.io/s/your-account/0123456789abcdef`.

= The player says the video cannot be shown here =

The video is locked to a list of domains that does not include your site. Add your site's domain under Allowed domains in the console, on the video or as the account default. With an API key the block warns about this in the editor.

= Can I set autoplay or loop per embed? =

No. Those are properties of the video, set once in the console, so it plays the same on every site. The block sets the shape, a start time, and a caption.

= Which plans does it work with? =

Pasting a share link, the block, the shortcode and the Divi module work on every plan. The library picker, the Library page and the allowed-domains warning need an API key. Every paid plan includes one: Solo's single key is read-only, which is all this plugin uses.

= Who can browse the library? =

Authors and up, by default. Contributors on a multi-author site cannot search the account's videos. Change it with the `stillhaven_library_capability` filter.

= Does the plugin work without an account? =

The block and shortcode need a Stillhaven video to show. Plans are at https://stillhaven.io/pricing.

== Screenshots ==

1. The Library: your Stillhaven videos in WordPress, with a link or a shortcode to copy.
2. Find embedded videos: every post and page with a video in it, whoever hosts it, with the host named.
3. Settings: the API key, the site's domain for Allowed domains, and the shortcode.
4. The Stillhaven Video module in the Divi Builder.
5. A video embedded on a WordPress page.

== Changelog ==

= 1.1.0 =
* Find embedded videos: an on-demand scan of posts and pages for every video, whoever hosts it, filterable by host, saved on the site, with a copyable list and a CSV export. Nothing is sent off the site.
* An Overview page under the Stillhaven menu: what Stillhaven is, what the plugin does on your site, and where everything is.

= 1.0.0 =
* First release: trusted oEmbed provider, the Stillhaven video block with a library picker, a Divi module, the shortcode, a Library page, and the settings page.
