=== ChapterPlay Chapter Player for YouTube ===
Contributors: satish0125
Tags: youtube, video, chapters, player, embed
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed a premium YouTube chapter player anywhere using a Gutenberg block or shortcode. No API key needed.

== Description ==

**ChapterPlay** automatically extracts chapters from YouTube video descriptions and displays them in a beautiful, interactive sidebar. Visitors can click any chapter to jump directly to that timestamp.

= Key Features =

* 🎬 **Gutenberg Block** — drag and drop into any post or page
* 🔖 **Shortcode** — `[chapterplay url="..."]` for classic editor or any text widget
* 📑 **Auto Chapter Extraction** — reads timestamps directly from YouTube descriptions
* 📺 **Multiple Players** — add unlimited players on the same page with no conflicts
* 🌙 **Premium Dark Design** — polished UI that adapts to any container size (300px to full-width)
* ⚡ **Smart Caching** — chapter data is cached server-side to reduce API calls
* 🔑 **No API Key Required** — uses YouTube's internal data endpoint; zero configuration needed

= How to Use =

**Gutenberg Block:**
1. In the block editor, click **+** to add a new block
2. Search for **ChapterPlay**
3. Add the block, then paste the YouTube URL in the right-hand **Settings** panel
4. Save and preview — the player renders on the frontend with chapters

**Shortcode:**

`[chapterplay url="https://www.youtube.com/watch?v=VIDEO_ID"]`

`[chapterplay url="VIDEO_ID"]`

You can use the shortcode inside any page, post, or text widget.

= External Services =

This plugin connects to **youtube.com** to fetch video metadata (title, description, duration). No personal user data is transmitted. The connection is made server-side only when a video is first loaded or the cache expires.

* **Service:** YouTube (google.com)
* **Data sent:** YouTube video ID only
* **Data received:** Video title, author, duration, description
* **Privacy policy:** https://policies.google.com/privacy
* **Terms of service:** https://www.youtube.com/t/terms

== Installation ==

1. Upload the `chapterplay` folder to `/wp-content/plugins/`
2. Go to **Plugins → Installed Plugins** in your WordPress admin
3. Click **Activate** next to **ChapterPlay Chapter Player for YouTube**
4. Use the block or shortcode anywhere on your site — no further setup needed

== Frequently Asked Questions ==

= Do I need a YouTube API key? =

No. ChapterPlay uses YouTube's built-in data endpoint. No Google Cloud account or API key is required.

= Why are no chapters showing? =

Chapters are extracted from the video's description. If the video description does not contain timestamps (e.g. `00:00 Introduction`, `01:30 Next Section`), the player will show a "Full Video" entry instead.

= Can I add multiple players on the same page? =

Yes! Each shortcode or block instance is fully independent. Add as many as you need — they will not interfere with each other.

= Does the player work on mobile? =

Yes. The layout is fully responsive and adapts from 300px to full-width containers.

= Which YouTube URL formats are supported? =

* `https://www.youtube.com/watch?v=VIDEO_ID`
* `https://youtu.be/VIDEO_ID`
* `https://www.youtube.com/shorts/VIDEO_ID`
* Plain 11-character Video ID

== Screenshots ==

1. Full player with chapters sidebar on the frontend
2. Gutenberg block settings panel in the editor
3. Shortcode player implementation in classic editor

== Changelog ==

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.0.0 =
First stable release.
