=== Public Signal Video Feed ===
Contributors: owenmccostis
Tags: youtube, video, playlist, embed, accessibility
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Embed YouTube playlist feeds with live block previews, accessible playback, and flexible styling.

== Description ==

Public Signal Video Feed is a YouTube playlist feed plugin for WordPress. It provides a live block editor preview, a lightweight shortcode, transient-based API caching, responsive grid and list layouts, and a keyboard-friendly modal player.

Features include:

* Video Feed block with a live editor preview.
* YouTube playlist feed shortcode.
* Grid and list layouts.
* Optional video limit and channel display controls.
* Cached API responses to reduce quota usage.
* Frontend fallback link and playlist embed when API data is unavailable.
* Keyboard-friendly modal playback with focus management.
* Global visual defaults with optional per-block color overrides.

This plugin requires a YouTube Data API v3 key supplied by the site administrator.

= External Services =

Public Signal Video Feed relies on services provided by Google and YouTube to retrieve and display playlist content.

When an uncached feed or block editor preview is rendered, the site sends the configured YouTube Data API key, the playlist identifier, and a pagination token when needed to the YouTube Data API endpoint at https://www.googleapis.com/youtube/v3/playlistItems. The API response is normalized and stored temporarily in WordPress transients for the configured cache duration.

Playlist thumbnail images load in a visitor's browser from the YouTube or Google-hosted image URLs returned by the API. The normal YouTube iframe player loads after a visitor selects a video. If API playlist data is unavailable, a fallback YouTube playlist iframe may load when the page loads. These browser requests can transmit technical information such as the visitor's IP address, browser user agent, referrer, and cookies to Google or YouTube.

Use of these services is subject to Google's terms and privacy policies:

* YouTube Data API: https://developers.google.com/youtube/v3
* Google APIs Terms of Service: https://developers.google.com/terms
* YouTube API Services Terms of Service: https://developers.google.com/youtube/terms/api-services-terms-of-service
* Google Privacy Policy: https://policies.google.com/privacy

== Installation ==

1. Upload the `public-signal-video-feed` folder to the `/wp-content/plugins/` directory, or install the plugin ZIP through the WordPress Plugins screen.
2. Activate Public Signal Video Feed from the Plugins screen.
3. Go to Settings > Video Feed.
4. Add a YouTube Data API v3 key.
5. Add the Video Feed block or shortcode to a page or post.

Block usage:

1. Add the Video Feed block in the block editor.
2. Enter a YouTube playlist URL in the block settings.
3. Choose a grid or list layout.
4. Optionally set a video limit or hide the channel name.
5. Optionally open the Styles tab to override card, title, secondary-text, or border colors for that block.

Basic shortcode:

`[public_signal_video_feed url="https://www.youtube.com/playlist?list=PLAYLIST_ID"]`

Optional shortcode attributes:

`layout="grid"` or `layout="list"`

`limit="6"`

`show_channel="true"` or `show_channel="false"`

Example:

`[public_signal_video_feed url="https://www.youtube.com/playlist?list=PLAYLIST_ID" layout="grid" limit="6" show_channel="true"]`

== Frequently Asked Questions ==

= Do I need a YouTube API key? =

Yes. The plugin uses the YouTube Data API v3 to retrieve playlist video details.

= Does the plugin cache YouTube responses? =

Yes. Playlist data is cached with WordPress transients. You can adjust the cache duration in Settings > Video Feed.

= Can I still use the shortcode? =

Yes. The block and shortcode are both supported. The block uses the same frontend rendering as the shortcode.

= Can each block use different colors? =

Yes. Global colors are configured in Settings > Video Feed. A block can override any color from its Styles tab, and clearing an override restores the global value. Shortcodes use the global colors.

= Can I force the plugin to refresh playlist data? =

Yes. Use the Clear Playlist Caches button on the Video Feed settings page.

= What happens if the YouTube API is unavailable? =

The plugin shows a generic availability message and provides a YouTube playlist fallback when possible.

== Screenshots ==

1. A video feed of YouTube's All-Time Most Viewed Music playlist in a grid layout.
2. Fully responsive layouts seamlessly adapt to mobile, tablet, and desktop screens.
3. A keyboard-friendly modal player allows visitors to watch videos without leaving your site.
4. Configure cache settings and set a global default color palette for video feeds.

== Changelog ==

= 1.0.1 =

* Improved compatibility with the fully iframed block editor in WordPress 7.1.
* Tested with WordPress 7.1.

= 1.0.0 =

* Initial release.

== Upgrade Notice ==

= 1.0.1 =

WordPress 7.1 compatibility update for block editor previews.

= 1.0.0 =

Initial release.
