跳到内容

BarkingLlama Roulette

v1.0.4

grandllama · 2026年3月16日 上架

Spin the wheel to embed a random YouTube playlist video via shortcode or REST API.

正在使用
10 以下
评分
暂无
累计下载
541
最近更新
2026年3月16日
需要 WordPress 6.0+已测试到 7.0.9PHP 7.4+

贡献者

截图

Settings page (playlist, API key, cache, privacy, display settings)
Settings page (playlist, API key, cache, privacy, display settings)
Front-end embed with “Spin again” button and video title
Front-end embed with “Spin again” button and video title

BarkingLlama Roulette adds a simple shortcode and REST endpoint that selects a random YouTube video from a configured playlist and embeds it on your site.

Perfect for motivational cards as Shorts, “daily randomness” pages, or any curated playlist you want to keep fresh.

Features:
* Shortcode: [llama_roulette]
* REST endpoint: /wp-json/llama-roulette/v1/random
* Playlist caching via transients to reduce YouTube API calls
* Optional Privacy Enhanced Mode (youtube-nocookie embeds)
* “Start Muted” setting for reliable autoplay

External services

This plugin uses the YouTube Data API v3 (Google) to retrieve videos from the configured YouTube playlist so it can select and display a random video.

What data is sent and when:
* The configured playlist ID (or playlist ID parsed from a provided playlist URL) is sent when the plugin requests playlist items.
* The configured YouTube API key is sent with those API requests for authentication.
* These requests occur when cached playlist data is missing or expired, or when playlist data must be refreshed.

Service provider:
* Google / YouTube Data API v3

Terms of Service and Privacy Policy:
* Google API Services 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

Shortcode

Basic:
[llama_roulette]

Available attributes:
* button_label – Custom label for the trigger button (e.g., button_label="Try Luck").
* playlist – Optional YouTube Playlist ID or URL to override the global setting.
* autoplay – Set to 1 to auto-load/play, 0 to wait for click.
* muted – Set to 1 to start muted, 0 for sound (Note: browsers block unmuted autoplay).
* show_title – Set to 1 to show the video title below the player, 0 to hide.
* align – left, center, or right.
* max_width – Any CSS width value (e.g., max_width="800px").
* aspect_ratio – CSS aspect-ratio (e.g., 16/9, 4/3).
* class – Append custom CSS classes.

Example:
[llama_roulette playlist=”PLxxxx” button_label=”Spin!” autoplay=”1″ muted=”1″ show_title=”1″]

REST API

GET /wp-json/llama-roulette/v1/random

Optional query param:
* playlist (Playlist ID or URL) to override the configured playlist for that request

Example:
GET /wp-json/llama-roulette/v1/random?playlist=PLabc123

License

This plugin is licensed under the GPLv2 or later.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums