=== Qaiyo Social Video Embed ===
Contributors: qaiyo
Tags: tiktok, youtube, video, shorts, gallery
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

Modern, clean social video display for WordPress with TikTok and YouTube (Shorts + regular) support, mixed galleries and YouTube channel feed import.

== Description ==

Qaiyo Social Video Embed is a modern, multi-platform video embed plugin with TikTok, YouTube (Shorts + regular videos) and Vimeo support. Mix videos from different platforms together in a single gallery, or automatically import the latest videos from a YouTube channel.

**Key features:**

* **Multi-platform** — TikTok, YouTube and Vimeo in one plugin.
* **Mixed galleries** — Videos from different platforms together in one grid, carousel or list view.
* **Gutenberg block** — Insert galleries from the editor with a live preview, no shortcodes needed.
* **YouTube channel feed import** — Paste a channel URL and automatically show the latest N videos or Shorts (no API key required).
* **Lightbox / modal playback** — Optionally open videos in a fullscreen modal instead of inline.
* **Responsive column breakpoints** — Separate column counts for desktop, tablet and mobile.
* **High-resolution thumbnails** — Automatic use of maxresdefault.jpg (1280×720).
* **Automatic aspect ratio detection** — 9:16 (Shorts/TikTok), 16:9 (regular YouTube).
* **Lazy load + click-to-play** — The iframe only loads on click, keeping pages fast.
* **Customizable play button** — Background and icon color configurable in the admin.
* **oEmbed cache** — Transient caching with adjustable duration.
* **YouTube nocookie support** — GDPR-friendly privacy-enhanced mode.
* **4 display modes** — single, grid, carousel, list.
* **Accessible** — ARIA labels and keyboard navigation.
* **Dark mode** and print styles.
* **Extensible** — Provider pattern, write your own provider.
* **Translation ready** — Fully internationalized; translations are provided through translate.wordpress.org.
* **Translation plugin compatible** — Works with WPML, Polylang, TranslatePress and other translation plugins.
* **WordPress standards** — Nonce verification, capability checks, input sanitization, escaped output.

= YouTube channel feed =

Paste the channel's ID-based URL (you can copy it from the channel's About/Share panel or from a video's channel link):

* `https://www.youtube.com/channel/UCxxxxxxxxxxxxxxxxxxxxxx` — the latest videos
* `https://www.youtube.com/channel/UCxxxxxxxxxxxxxxxxxxxxxx/shorts` — the latest uploads shown vertically (9:16)
* `https://www.youtube.com/user/legacyname` — legacy username channels are also supported

The plugin reads YouTube's official public RSS feed (feeds/videos.xml) for that channel — no API key needed and no page scraping. Handle URLs (`/@name`) and custom URLs (`/c/name`) require the YouTube Data API; that (and exact Shorts filtering) is available in the Pro add-on.

== Installation ==

1. Upload the `qaiyo-social-video-embed` folder to `/wp-content/plugins/`.
2. Activate the plugin from the WordPress admin Plugins page.
3. Navigate to **Social Video Embed** in the admin sidebar to configure appearance, play button, thumbnails and caching.
4. Place a shortcode anywhere — page, post, Bricks, Gutenberg.

== Frequently Asked Questions ==

= How do I embed a single video? =

`[qsve_video url="https://youtu.be/dQw4w9WgXcQ"]`

This also works with TikTok and YouTube Shorts URLs.

= How do I create a mixed gallery? =

`[qsve_video mode="grid" columns="3" urls="tiktok-url|youtube-url|shorts-url"]`

Separate URLs with the `|` character.

= How do I import a YouTube channel feed? =

`[qsve_video channel="https://www.youtube.com/channel/UCxxxxxxxxxxxxxxxxxxxxxx/shorts" limit="6"]`

Use the channel's ID-based URL (`/channel/UC...`). Add `/shorts` to show the latest uploads vertically (9:16).

= Is there a block editor (Gutenberg) block? =

Yes. Add the "Qaiyo Social Video Embed" block in the editor. It exposes the same options (URLs, mode, columns, channel, lightbox, etc.) with a live preview — no shortcodes required.

= How do I open videos in a lightbox? =

Enable "Open videos in a lightbox" in the settings, toggle it in the block, or add `playback="lightbox"` to any shortcode.

= Does Vimeo work? =

Yes. Paste a Vimeo URL (e.g. `https://vimeo.com/76979871`) into the `urls` attribute or the block. Vimeo channel/showcase import is not available.

= Does TikTok channel import work? =

No. TikTok does not provide a public, free API for querying user feeds, so TikTok videos must be added individually via the `urls` attribute.

= Do I need a YouTube API key? =

No. The plugin uses public oEmbed and RSS endpoints, so no API key is required.

= Which shortcodes are available? =

`[qsve_video]`, `[qsve_tiktok]` (TikTok only) and `[qsve_youtube]` (YouTube only).

== Screenshots ==

1. Admin settings page with appearance, play button and cache controls.
2. Mixed TikTok + YouTube gallery on the front end.
3. YouTube channel feed imported as a grid.

== External services ==

This plugin embeds videos hosted on third-party platforms. It therefore contacts those platforms in two different ways, described below.

**1. Server-side requests (made by your site, from wp-admin or while rendering a page)**

These resolve the metadata of the videos you add. Only the video or channel URL that you enter is sent; the responses are cached. No visitor data is involved.

* YouTube (Google) — `www.youtube.com`: oEmbed endpoint (`/oembed`) for individual videos, and the official public RSS feed (`/feeds/videos.xml`) for channel feeds, using the channel ID or legacy username contained in the URL you provide.
* Vimeo — `vimeo.com`: oEmbed endpoint (`/api/oembed.json`) for individual videos.
* TikTok — `www.tiktok.com`: oEmbed endpoint (`/oembed`) for individual videos.
* WordPress.org — `api.wordpress.org`: on the plugin's "Discover Qaiyo" screen only, the standard WordPress plugin API (`plugins_api`) is queried to list this author's free plugins. No data about your site is sent beyond the standard API query.

**2. Requests made by your visitors' browsers (when a page with the gallery is viewed)**

Video thumbnails and the video players themselves are loaded directly from the platforms. This means your visitors' browsers contact those platforms, and — as with any embedded video — the platform receives the visitor's IP address, user agent and referring page, and may set cookies.

* Thumbnail images — `i.ytimg.com` (YouTube), plus Vimeo's and TikTok's own image CDNs.
* Video players (loaded only after the visitor clicks play) — `www.youtube.com` or `www.youtube-nocookie.com` (YouTube), `player.vimeo.com` (Vimeo), `www.tiktok.com` (TikTok).

To reduce this, the plugin uses click-to-play (nothing from the player is loaded until the visitor clicks), offers YouTube's privacy-enhanced `youtube-nocookie.com` mode, and requests Vimeo's Do Not Track (`dnt=1`) parameter.

This functionality is required for the plugin to display embedded videos. Provider terms and privacy policies:
* YouTube (Google): https://www.youtube.com/t/terms — https://policies.google.com/privacy
* Vimeo: https://vimeo.com/terms — https://vimeo.com/privacy
* TikTok: https://www.tiktok.com/legal/terms-of-service — https://www.tiktok.com/legal/privacy-policy
* WordPress.org: https://wordpress.org/about/terms/ — https://wordpress.org/about/privacy/

== Changelog ==

= 1.0.0 =
* First release under the Qaiyo brand.
* TikTok, YouTube (Shorts + regular) and Vimeo support, mixed galleries and YouTube channel feed import.
* Gutenberg block with live preview.
* Lightbox / modal playback option.
* Responsive column breakpoints (desktop / tablet / mobile).
* Top-level Qaiyo admin menu with its own brand separator.
* Admin UI in the Qaiyo design system (purple brand accent).
* English source language; fully translatable via translate.wordpress.org.
* `[qsve_video]`, `[qsve_tiktok]`, `[qsve_youtube]` shortcodes.

== Upgrade Notice ==

= 1.0.0 =
First Qaiyo release.
