{"id":206755,"date":"2024-10-06T20:12:17","date_gmt":"2024-10-06T20:12:17","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/simple-radio-forty-two\/"},"modified":"2026-08-25T12:58:42","modified_gmt":"2026-08-25T12:58:42","slug":"simple-radio-forty-two","status":"publish","type":"plugin","link":"https:\/\/ast.wordpress.org\/plugins\/simple-radio-forty-two\/","author":22011295,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.1.0","stable_tag":"2.1.0","tested":"7.1","requires":"5.0","requires_php":"7.4","requires_plugins":null,"header_name":"Simple Radio Forty Two","header_author":"tlloancy","header_description":"A simple radio player plugin inspired by Radio 42.","assets_banners_color":"ffffff","last_updated":"2026-08-25 12:58:42","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":5,"author_block_rating":0,"active_installs":10,"downloads":1433,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"tlloancy","date":"2024-10-06 20:11:44"},"1.2":{"tag":"1.2","author":"tlloancy","date":"2024-10-10 21:41:18"},"1.2.1":{"tag":"1.2.1","author":"tlloancy","date":"2025-05-10 18:05:38"},"1.2.2":{"tag":"1.2.2","author":"tlloancy","date":"2025-05-10 18:20:40"},"1.2.3":{"tag":"1.2.3","author":"tlloancy","date":"2026-03-29 06:44:44"},"1.3.0":{"tag":"1.3.0","author":"tlloancy","date":"2026-03-29 06:44:44"},"1.3.1":{"tag":"1.3.1","author":"tlloancy","date":"2026-03-30 08:26:00"},"2.0.0":{"tag":"2.0.0","author":"tlloancy","date":"2026-05-26 21:43:38"},"2.1.0":{"tag":"2.1.0","author":"tlloancy","date":"2026-08-25 12:58:42"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":1},"assets_icons":[],"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":3166820,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":{"sr42\/radio":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":2,"name":"sr42\/radio","title":"Simple Radio Forty Two","category":"media","icon":"format-audio","description":"Embed the radio player. Stations are configured under Simple Radio \u2192 Settings.","keywords":["radio","stream","audio","icecast"],"textdomain":"simple-radio-forty-two","editorScript":"sr42-block-editor","editorStyle":"sr42-block-editor-style","supports":{"html":false,"multiple":false,"align":["wide"]}}},"tagged_versions":["1.0","1.2","1.2.1","1.2.2","1.2.3","1.3.0","1.3.1","2.0.0","2.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.gif":{"filename":"screenshot-1.gif","revision":3166820,"resolution":"1","location":"assets","locale":"","width":600,"height":338},"screenshot-2.gif":{"filename":"screenshot-2.gif","revision":3166820,"resolution":"2","location":"assets","locale":"","width":600,"height":338},"screenshot-3.gif":{"filename":"screenshot-3.gif","revision":3166820,"resolution":"3","location":"assets","locale":"","width":600,"height":338}},"screenshots":[]},"plugin_section":[],"plugin_tags":[452,218,444,704,582],"plugin_category":[50],"plugin_contributors":[232640],"plugin_business_model":[],"class_list":["post-206755","plugin","type-plugin","status-publish","hentry","plugin_tags-audio","plugin_tags-music","plugin_tags-player","plugin_tags-radio","plugin_tags-streaming","plugin_category-media","plugin_contributors-tlloancy","plugin_committers-tlloancy"],"banners":{"banner":"https:\/\/ps.w.org\/simple-radio-forty-two\/assets\/banner-772x250.png?rev=3166820","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/simple-radio-forty-two_ffffff.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/simple-radio-forty-two\/assets\/screenshot-1.gif?rev=3166820","caption":""},{"src":"https:\/\/ps.w.org\/simple-radio-forty-two\/assets\/screenshot-2.gif?rev=3166820","caption":""},{"src":"https:\/\/ps.w.org\/simple-radio-forty-two\/assets\/screenshot-3.gif?rev=3166820","caption":""}],"raw_content":"<!--section=description-->\n<p>Simple Radio Forty Two is a small radio player for WordPress, inspired by Radio 42. It is written in vanilla JavaScript (no jQuery). You configure stations once, then drop the player on any page with <code>[sr42_radio]<\/code> or the <strong>Simple Radio Forty Two<\/strong> block.<\/p>\n\n<p><strong>What it does<\/strong><\/p>\n\n<ul>\n<li>Plays Icecast \/ MPC, SomaFM, and Radio Paradise streams from a dropdown.<\/li>\n<li>Shows now-playing metadata (artist, title, next track when the source provides it) via the REST route <code>\/wp-json\/sr42\/v1\/meta<\/code>.<\/li>\n<li>On supporting mobile browsers, uses the <strong>Media Session API<\/strong>: lock-screen title, artwork, play\/pause, and previous\/next station.<\/li>\n<li>Remembers the last station and volume in <code>localStorage<\/code>. If you navigate to another page that also contains the player, it tries to resume playback. See the FAQ: browsers often block that autoplay.<\/li>\n<li>Optional custom title and button\/background images under <strong>Simple Radio \u2192 Styling<\/strong>.<\/li>\n<\/ul>\n\n<p>This plugin does <strong>not<\/strong> keep audio playing across a full page load by itself (no background Service Worker). Media Session controls work while the tab that started playback stays open, including with the phone locked.<\/p>\n\n<h3>Configuration<\/h3>\n\n<ol>\n<li><strong>Simple Radio<\/strong> \u2014 copy the shortcode.<\/li>\n<li><strong>Settings<\/strong> \u2014 station name, stream URL, and server type (Icecast \/ SomaFM \/ Radio Paradise).<\/li>\n<li><strong>Styling<\/strong> \u2014 title and image URLs, with a live preview. Save to apply on the public player.<\/li>\n<\/ol>\n\n<h3>Usage<\/h3>\n\n<ul>\n<li>Shortcode: <code>[sr42_radio]<\/code><\/li>\n<li>Block: <strong>Simple Radio Forty Two<\/strong> (Media category). Dynamic render: the same HTML as the shortcode. Stations always come from Settings (no per-block station list).<\/li>\n<\/ul>\n\n<p>There is no separate classic widget. On a classic widget screen you can put the shortcode in a Shortcode or Custom HTML widget.<\/p>\n\n<h3>License<\/h3>\n\n<p>Simple Radio Forty Two is licensed under the GPLv2 or later. See LICENSE.txt for details.<\/p>\n\n<h3>Acknowledgments<\/h3>\n\n<p>Thanks to the WordPress community and the Radio 42 developers for the inspiration.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install from Plugins \u2192 Add New, or upload the plugin folder to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate <strong>Simple Radio Forty Two<\/strong>.<\/li>\n<li>Open <strong>Simple Radio \u2192 Settings<\/strong> and add or edit stations.<\/li>\n<li>Insert <code>[sr42_radio]<\/code> in a page, or add the <strong>Simple Radio Forty Two<\/strong> block in the editor.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"why%20is%20there%20a%20%E2%80%9Cplease%20wait%E2%80%9D%20message%20at%20startup%3F\"><h3>Why is there a \u201cPlease wait\u201d message at startup?<\/h3><\/dt>\n<dd><p>On the default Radio 42 Icecast stream, the player briefly buffers (about five seconds) so the first play is less likely to stutter. Other stations skip that wait.<\/p><\/dd>\n<dt id=\"does%20it%20remember%20my%20station%20after%20a%20refresh%3F\"><h3>Does it remember my station after a refresh?<\/h3><\/dt>\n<dd><p>Yes. The last stream URL is stored in <code>localStorage<\/code>. Volume is stored the same way.<\/p><\/dd>\n<dt id=\"will%20music%20keep%20playing%20when%20i%20open%20another%20page%3F\"><h3>Will music keep playing when I open another page?<\/h3><\/dt>\n<dd><p>Only if that other page also embeds the player <strong>and<\/strong> the browser allows autoplay. After a full navigation, Chrome and Safari usually require a tap on Play. That is a browser rule, not a missing feature.<\/p><\/dd>\n<dt id=\"what%20about%20the%20lock%20screen%3F\"><h3>What about the lock screen?<\/h3><\/dt>\n<dd><p>While the player page stays in memory and audio is playing, supporting phones show title, artwork, and play\/pause (and station skip) via Media Session. Closing the tab or killing the browser stops the stream.<\/p><\/dd>\n<dt id=\"does%20it%20support%20mobile%20devices%3F\"><h3>Does it support mobile devices?<\/h3><\/dt>\n<dd><p>Yes. Play\/pause are real buttons (keyboard and screen-reader accessible). Volume and station selects have labels.<\/p><\/dd>\n<dt id=\"can%20i%20add%20the%20player%20in%20the%20block%20editor%3F\"><h3>Can I add the player in the block editor?<\/h3><\/dt>\n<dd><p>Yes. The block is registered with <code>block.json<\/code> and rendered in PHP. It does not replace the shortcode.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.1.0<\/h4>\n\n<ul>\n<li><strong>Compat:<\/strong> Tested up to WordPress 7.1.<\/li>\n<li><strong>Added:<\/strong> Media Session API \u2014 now-playing title\/artist, artwork, play\/pause, previous\/next station on supporting lock screens.<\/li>\n<li><strong>Added:<\/strong> After in-site navigation, the player tries to resume if <code>sessionStorage<\/code> says it was playing. Autoplay is often blocked; the FAQ explains why.<\/li>\n<li><strong>Added:<\/strong> Gutenberg block <code>sr42\/radio<\/code> is registered from <code>blocks\/radio\/block.json<\/code> with a dynamic PHP render (same output as the shortcode). The 2.0.0 JS-only registration is replaced, not duplicated.<\/li>\n<li><strong>Design:<\/strong> Player and admin screens drop gold \u201claser\u201d glow. Native admin layout (<code>.wrap<\/code>, <code>.form-table<\/code>, <code>.button<\/code>). Play\/pause are <code>&lt;button&gt;<\/code>s with <code>aria-label<\/code> and visible focus.<\/li>\n<li><strong>Docs:<\/strong> <code>readme.txt<\/code> plus <code>docs\/USER-GUIDE.md<\/code> (English) and <code>docs\/MODE-DEMPLOI.md<\/code> (French).<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li><strong>New:<\/strong> Native Gutenberg block <code>sr42\/radio<\/code> \u2014 drop the player anywhere in the block editor with zero shortcode knowledge required.<\/li>\n<li><strong>New:<\/strong> Metadata now fetched via a proper REST API endpoint (<code>\/wp-json\/sr42\/v1\/meta<\/code>) instead of <code>admin-ajax.php<\/code> \u2014 faster, cacheable, and standards-compliant.<\/li>\n<li><strong>Fix:<\/strong> Replaced deprecated <code>document.execCommand('copy')<\/code> with the modern Clipboard API in the admin shortcode tool.<\/li>\n<li><strong>Fix:<\/strong> All hardcoded French error strings in the front-end JS are now fully translated via <code>wp_localize_script<\/code>.<\/li>\n<li><strong>Fix:<\/strong> Aligned CSS asset version with plugin version (was 1.4.1, now 2.0.0).<\/li>\n<li><strong>Compat:<\/strong> Tested and confirmed compatible with WordPress 7.0.<\/li>\n<li><strong>Compat:<\/strong> Raised minimum PHP requirement to 7.4 (null coalescing assignment, named args).<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li><strong>Fix:<\/strong> Corrected the Shortcode copy tool to support modern Clipboard API and added UI feedback.<\/li>\n<li><strong>Fix:<\/strong> Implemented station persistence (F5) via localStorage.<\/li>\n<li><strong>Fix:<\/strong> Added default \"fallback\" stations if the database is empty (Radio 42, SomaFM, Radio Paradise).<\/li>\n<li><strong>Fix:<\/strong> Resolved a regression where the selected station was reset on initial load.<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Way cleaner UI and overall performance optimization.<\/li>\n<li>Final stable release for WordPress 6.9.<\/li>\n<li>Integrated Icecast\/SomaFM metadata (Artist\/Title) via AJAX.<\/li>\n<li>Added \"Laser Glow\" visual effect on the volume slider.<\/li>\n<li>Synchronized initial buffer with page load cycle.<\/li>\n<\/ul>\n\n<h4>1.2.3<\/h4>\n\n<ul>\n<li>Switched to pure Vanilla JS (jQuery-free).<\/li>\n<li>Added 4 predefined radio stations.<\/li>\n<li>Added Click Lock mechanism to prevent UI spamming.<\/li>\n<\/ul>\n\n<h4>1.2.2<\/h4>\n\n<ul>\n<li>Fixed shortcode detection bug.<\/li>\n<li>Updated compatibility for WordPress 6.7.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>First stable version.<\/li>\n<li>Added basic radio player and customization options.<\/li>\n<\/ul>","raw_excerpt":"A shortcode and Gutenberg radio player for Icecast, SomaFM, and Radio Paradise streams, with lock-screen Media Session controls.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/206755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=206755"}],"author":[{"embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/tlloancy"}],"wp:attachment":[{"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=206755"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=206755"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=206755"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=206755"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=206755"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ast.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=206755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}