{"id":284533,"date":"2026-03-16T14:22:20","date_gmt":"2026-03-16T14:22:20","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/llama-roulette\/"},"modified":"2026-03-16T14:32:50","modified_gmt":"2026-03-16T14:32:50","slug":"barkingllama-roulette","status":"publish","type":"plugin","link":"https:\/\/sa.wordpress.org\/plugins\/barkingllama-roulette\/","author":7783626,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.4","stable_tag":"1.0.4","tested":"7.0","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"BarkingLlama Roulette","header_author":"Barking Llama Designwerks","header_description":"The Reckless Llama Video Chooser - Displays a random YouTube video from a playlist via shortcode and REST API.","assets_banners_color":"404145","last_updated":"2026-03-16 14:32:50","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/barkingllama.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":164,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.3":{"tag":"1.0.3","author":"grandllama","date":"2026-03-16 14:22:20"},"1.0.4":{"tag":"1.0.4","author":"grandllama","date":"2026-03-16 14:32:50"}},"upgrade_notice":{"1.0.4":"<p>Generic bug fixes and testing up to Wordpress 7.0<\/p>","1.0.1":"<p>Security fixes and new autoplay settings.<\/p>","1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.jpg":{"filename":"icon-128x128.jpg","revision":3483949,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":3483949,"resolution":"256x256","location":"assets","locale":""},"icon.svg":{"filename":"icon.svg","revision":3483949,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":3483949,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":3483949,"resolution":"772x250","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3483949,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.3","1.0.4"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3483949,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3483949,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Settings page (playlist, API key, cache, privacy, display settings)","2":"Front-end embed with \u201cSpin again\u201d button and video title"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[220,244,80,222,1610],"plugin_category":[43,50,56],"plugin_contributors":[248795],"plugin_business_model":[],"class_list":["post-284533","plugin","type-plugin","status-publish","hentry","plugin_tags-playlist","plugin_tags-random","plugin_tags-shortcode","plugin_tags-video","plugin_tags-youtube","plugin_category-customization","plugin_category-media","plugin_category-social-and-sharing","plugin_contributors-grandllama","plugin_committers-grandllama"],"banners":{"banner":"https:\/\/ps.w.org\/barkingllama-roulette\/assets\/banner-772x250.png?rev=3483949","banner_2x":"https:\/\/ps.w.org\/barkingllama-roulette\/assets\/banner-1544x500.jpg?rev=3483949","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/barkingllama-roulette\/assets\/icon.svg?rev=3483949","icon":"https:\/\/ps.w.org\/barkingllama-roulette\/assets\/icon.svg?rev=3483949","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/barkingllama-roulette\/assets\/screenshot-1.png?rev=3483949","caption":"Settings page (playlist, API key, cache, privacy, display settings)"},{"src":"https:\/\/ps.w.org\/barkingllama-roulette\/assets\/screenshot-2.png?rev=3483949","caption":"Front-end embed with \u201cSpin again\u201d button and video title"}],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<p>Perfect for motivational cards as Shorts, \u201cdaily randomness\u201d pages, or any curated playlist you want to keep fresh.<\/p>\n\n<p>Features:\n* Shortcode: [llama_roulette]\n* REST endpoint: \/wp-json\/llama-roulette\/v1\/random\n* Playlist caching via transients to reduce YouTube API calls\n* Optional Privacy Enhanced Mode (youtube-nocookie embeds)\n* \"Start Muted\" setting for reliable autoplay<\/p>\n\n<h3>External services<\/h3>\n\n<p>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.<\/p>\n\n<p>What data is sent and when:\n* The configured playlist ID (or playlist ID parsed from a provided playlist URL) is sent when the plugin requests playlist items.\n* The configured YouTube API key is sent with those API requests for authentication.\n* These requests occur when cached playlist data is missing or expired, or when playlist data must be refreshed.<\/p>\n\n<p>Service provider:\n* Google \/ YouTube Data API v3<\/p>\n\n<p>Terms of Service and Privacy Policy:\n* Google API Services Terms of Service: https:\/\/developers.google.com\/terms\/\n* YouTube API Services Terms of Service: https:\/\/developers.google.com\/youtube\/terms\/api-services-terms-of-service\n* Google Privacy Policy: https:\/\/policies.google.com\/privacy<\/p>\n\n<h3>Shortcode<\/h3>\n\n<p>Basic:\n    [llama_roulette]<\/p>\n\n<p>Available attributes:\n* <code>button_label<\/code> - Custom label for the trigger button (e.g., <code>button_label=\"Try Luck\"<\/code>).\n* <code>playlist<\/code> - Optional YouTube Playlist ID or URL to override the global setting.\n* <code>autoplay<\/code> - Set to <code>1<\/code> to auto-load\/play, <code>0<\/code> to wait for click.\n* <code>muted<\/code> - Set to <code>1<\/code> to start muted, <code>0<\/code> for sound (Note: browsers block unmuted autoplay).\n* <code>show_title<\/code> - Set to <code>1<\/code> to show the video title below the player, <code>0<\/code> to hide.\n* <code>align<\/code> - <code>left<\/code>, <code>center<\/code>, or <code>right<\/code>.\n* <code>max_width<\/code> - Any CSS width value (e.g., <code>max_width=\"800px\"<\/code>).\n* <code>aspect_ratio<\/code> - CSS aspect-ratio (e.g., <code>16\/9<\/code>, <code>4\/3<\/code>).\n* <code>class<\/code> - Append custom CSS classes.<\/p>\n\n<p>Example:\n    [llama_roulette playlist=\"PLxxxx\" button_label=\"Spin!\" autoplay=\"1\" muted=\"1\" show_title=\"1\"]<\/p>\n\n<h3>REST API<\/h3>\n\n<p>GET \/wp-json\/llama-roulette\/v1\/random<\/p>\n\n<p>Optional query param:\n* playlist (Playlist ID or URL) to override the configured playlist for that request<\/p>\n\n<p>Example:\nGET \/wp-json\/llama-roulette\/v1\/random?playlist=PLabc123<\/p>\n\n<h3>License<\/h3>\n\n<p>This plugin is licensed under the GPLv2 or later.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to \/wp-content\/plugins\/ or install via the Plugins screen.<\/li>\n<li>Activate the plugin.<\/li>\n<li>Go to Settings \u2192 BarkingLlama Roulette.<\/li>\n<li>Enter:\n\n<ul>\n<li>Playlist URL or ID<\/li>\n<li>YouTube API Key<\/li>\n<\/ul><\/li>\n<li>Add the shortcode [llama_roulette] to any post or page.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"do%20i%20need%20a%20youtube%20api%20key%3F\"><h3>Do I need a YouTube API key?<\/h3><\/dt>\n<dd><p>Yes for v1. BarkingLlama Roulette uses the YouTube Data API to fetch playlist items. The plugin caches results to reduce quota usage.<\/p><\/dd>\n<dt id=\"how%20do%20i%20find%20my%20playlist%20id%3F\"><h3>How do I find my Playlist ID?<\/h3><\/dt>\n<dd><p>If your playlist URL looks like:\nhttps:\/\/www.youtube.com\/playlist?list=PLabc123...\n\u2026the playlist ID is the value after \"list=\".<\/p><\/dd>\n<dt id=\"does%20it%20work%20on%20mobile%3F\"><h3>Does it work on mobile?<\/h3><\/dt>\n<dd><p>Yes. It uses a standard YouTube embed iframe.<\/p><\/dd>\n<dt id=\"how%20do%20i%20use%20privacy%20enhanced%20mode%3F\"><h3>How do I use Privacy Enhanced Mode?<\/h3><\/dt>\n<dd><p>Enable \u201cPrivacy Enhanced Mode\u201d in Settings \u2192 BarkingLlama Roulette to embed using youtube-nocookie.com.<\/p><\/dd>\n<dt id=\"why%20does%20autoplay%20not%20work%20with%20sound%3F\"><h3>Why does autoplay not work with sound?<\/h3><\/dt>\n<dd><p>Modern browsers block videos from autoplaying with sound on initial load unless a user has interacted with the page first. For reliable autoplay, enable the \"Default Muted\" setting.<\/p><\/dd>\n<dt id=\"how%20do%20i%20get%20a%20youtube%20data%20api%20key%3F\"><h3>How do I get a YouTube Data API key?<\/h3><\/dt>\n<dd><p>BarkingLlama Roulette uses the YouTube Data API to retrieve videos from your playlist. Google requires an API key for this.<\/p>\n\n<p>Follow these steps:<\/p>\n\n<ol>\n<li><p>Go to the Google Cloud Console:\nhttps:\/\/console.cloud.google.com\/<\/p><\/li>\n<li><p>Sign in with the Google account that owns (or can access) the YouTube playlist.<\/p><\/li>\n<li><p>Create a new project:<\/p>\n\n<ul>\n<li>Click the project dropdown at the top<\/li>\n<li>Click \u201cNew Project\u201d<\/li>\n<li>Give it any name (for example: \u201cBarkingLlama Roulette\u201d)<\/li>\n<li>Click Create<\/li>\n<\/ul><\/li>\n<li><p>Enable the YouTube Data API:<\/p>\n\n<ul>\n<li>With your project selected, go to:\nAPIs &amp; Services \u2192 Library<\/li>\n<li>Search for \u201cYouTube Data API v3\u201d<\/li>\n<li>Click it, then click \u201cEnable\u201d<\/li>\n<\/ul><\/li>\n<li><p>Create an API key:<\/p>\n\n<ul>\n<li>Go to:\nAPIs &amp; Services \u2192 Credentials<\/li>\n<li>Click \u201cCreate Credentials\u201d<\/li>\n<li>Choose \u201cAPI key\u201d<\/li>\n<li>Copy the generated key<\/li>\n<\/ul><\/li>\n<li><p>(Optional but recommended) Restrict the API key:<\/p>\n\n<ul>\n<li>In the Credentials screen, click your new API key<\/li>\n<li>Under \u201cAPI restrictions\u201d, select \u201cRestrict key\u201d<\/li>\n<li>Choose \u201cYouTube Data API v3\u201d<\/li>\n<li>Save changes<\/li>\n<\/ul><\/li>\n<li><p>Paste the API key into WordPress:<\/p>\n\n<ul>\n<li>Go to Settings \u2192 BarkingLlama Roulette<\/li>\n<li>Paste the key into the \u201cYouTube API Key\u201d field<\/li>\n<li>Save changes<\/li>\n<\/ul><\/li>\n<\/ol>\n\n<p>That\u2019s it. BarkingLlama Roulette will automatically cache playlist data to minimize API usage.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>FIX: Generic bugs<\/li>\n<li>TESTED: Up to 7.0<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>FEATURE: Added \"Show Video Title\" option in admin settings and shortcode.<\/li>\n<li>FEATURE: Added <code>playlist<\/code> attribute to shortcode for per-instance overrides.<\/li>\n<li>FIX: Improved shortcode initialization and reliability for multiple instances.<\/li>\n<li>FIX: Added automatic cache refresh when switching to title-inclusive data format.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>SECURITY: Added output escaping for all template variables.<\/li>\n<li>SECURITY: Improved redirect logic with <code>wp_safe_redirect<\/code>.<\/li>\n<li>FIX: Endpoint button label now respects default settings.<\/li>\n<li>FEATURE: Added \"Start Muted\" setting for reliable autoplay.<\/li>\n<li>FEATURE: Added <code>muted<\/code> attribute to shortcode.<\/li>\n<li>FIX: Improved shortcode attribute reliability via data attributes.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release: shortcode + REST endpoint + playlist caching + privacy mode<\/li>\n<\/ul>","raw_excerpt":"Spin the wheel to embed a random YouTube playlist video via shortcode or REST API.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/284533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=284533"}],"author":[{"embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/grandllama"}],"wp:attachment":[{"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=284533"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=284533"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=284533"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=284533"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=284533"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/sa.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=284533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}