=== Truce Label Video Player with VAST Ads ===
Contributors: trucetech
Donate link: https://trucelabel.com
Tags: video player, video ads, vast, hls, postroll
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight MP4/HLS video player with a built-in post-roll video ad (VAST). Gutenberg block and shortcode included.

== Description ==

**Truce Label Video Player with VAST Ads** is a lightweight WordPress video player that plays your own video and shows a single **post-roll** video ad — a VAST ad that runs when the video finishes. Add it to any post or page with a Gutenberg block or a shortcode.

It is built to stay out of your server's way: there is **no server-side fetching, no custom database tables, and no cron jobs**. Your ad tag and settings live in a single WordPress option, the player uses the browser's native `<video>` element (no heavy third-party libraries are loaded), and the ad is rendered entirely in the visitor's browser by Google's IMA SDK. The player script and the ad code load **only on pages that actually contain a player**, so the rest of your site is untouched.

= What the free version does =

* **Native MP4 playback** in every modern browser, plus **HLS** (`.m3u8`) in browsers that support it natively (Safari and iOS).
* **One post-roll video ad** when the video ends, using a single VAST tag URL from your own ad network.
* **Native skip handling** — the ad's own `skipoffset` controls whether it can be skipped; the IMA SDK draws the skip button automatically.
* **Graceful ad failure** — if the ad errors or does not load within 8 seconds, playback ends cleanly with no black screen.
* **Gutenberg block + shortcode** — add the **VAST Video Player** block, or use `[vastvp_player]` in classic content.
* **Optional poster image** for the pre-play thumbnail (no scraping, no network calls).
* **Responsive** and touch-friendly.

= Shortcode example =

`[vastvp_player video="https://example.com/video.mp4" poster="https://example.com/thumb.jpg" postroll="https://your-ad-network.example/vast.xml"]`

If you set a global post-roll tag under Settings, you can omit the `postroll` attribute and it will be used automatically.

= Upgrade to Pro =

**VAST Pro Player Ultimate** (a separate add-on from [Truce Label](https://trucelabel.com)) builds on this free player and adds:

* **Pre-roll** ads (before the video starts) and **mid-roll** ads (at timed intervals during playback), with a configurable interval.
* A **four-slot VAST rotation** with automatic fallback between tags.
* **Iframe-embed support** — wrap a video embedded from another host in the player.
* A second, **banner / social-bar ad engine** — closeable, non-blocking overlays that don't pause the video, as an A/B alternative to VAST.

**Get Pro for $5/month:** [Upgrade now](https://checkout.freemius.com/plugin/31537/plan/51775/) — or [start a 3-day trial](https://checkout.freemius.com/plugin/31537/plan/51775/?trial=paid).

The free version is fully functional on its own; Pro is optional. Learn more at [trucelabel.com](https://trucelabel.com).

== Installation ==

1. In your WordPress admin, go to **Plugins → Add New**, search for **Truce Label Video Player with VAST Ads**, and click **Install Now**, then **Activate**. (Or upload the `truce-label-video-player-with-vast-ads` folder to `/wp-content/plugins/` and activate it.)
2. Go to **Settings → VAST Video Player** and paste your post-roll VAST tag URL from your ad network. (Optional — leave it blank to play videos with no ad.)
3. Add the **VAST Video Player** block to a post or page, or use the `[vastvp_player]` shortcode, and set your video URL.

== Frequently Asked Questions ==

= What ad format does the free version show? =
A single **post-roll** VAST video ad that plays when the video finishes. You supply a VAST tag URL from your own ad network. Pre-roll, mid-roll, the four-slot rotation, iframe-embed support, and the banner/social-bar engine are part of the Pro add-on.

= Where do I get a VAST tag? =
From whichever video ad network you use. The plugin does not provide ads or an ad account — it simply renders the VAST tag you paste into the settings.

= Does HLS work in every browser? =
The free player uses the browser's built-in video support, so HLS (`.m3u8`) plays in browsers with native HLS support (Safari and iOS). MP4 plays everywhere. Universal HLS playback and iframe embeds are part of the Pro add-on.

= Will it slow down my site or hit my database? =
No. The plugin makes no server-side HTTP requests when rendering, creates no custom tables, and schedules no cron jobs. The player script and ad code load only on pages where a player is present.

= Is this GPL? =
Yes — GPLv2 or later. The Pro add-on is sold separately from trucelabel.com.

== External services ==

This plugin relies on the following third-party services, which run only on pages where the player is present:

* **Google IMA SDK** — loaded from Google to render your VAST video ad in the visitor's browser. See Google's [Terms of Service](https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/terms) and [Privacy Policy](https://policies.google.com/privacy).
* **Your configured VAST ad endpoint** — the VAST tag URL you paste in the settings is requested by the visitor's browser when the video ends, to fetch the ad. This is the ad network *you* choose; please review that network's terms and privacy policy.

The plugin sends no data to Truce Label and contacts no other services.

== Screenshots ==

1. The Settings → VAST Video Player admin page where you paste your post-roll VAST tag.
2. The player on the front end, with a custom play button and poster.
3. The VAST Video Player block in the Gutenberg editor.

== Changelog ==

= 1.0.0 =
* Initial WordPress.org release: native MP4/HLS player with a post-roll VAST ad, Gutenberg block, and shortcode.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
