{"id":15879590,"url":"https://github.com/ticky/psp-radio","last_synced_at":"2025-03-16T09:33:39.554Z","repository":{"id":40308771,"uuid":"173002449","full_name":"ticky/psp-radio","owner":"ticky","description":"📻 SDK shim \u0026 emulation layer for the PlayStation Portable’s Radio player API","archived":false,"fork":false,"pushed_at":"2024-10-29T21:42:08.000Z","size":3919,"stargazers_count":5,"open_issues_count":37,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2024-10-29T23:47:31.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://ticky.github.io/psp-radio/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ticky.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-27T22:48:06.000Z","updated_at":"2024-06-14T03:18:28.000Z","dependencies_parsed_at":"2023-10-25T16:51:51.567Z","dependency_job_id":"0ed62e44-6469-4b95-9f3e-5d4c4ea3aee6","html_url":"https://github.com/ticky/psp-radio","commit_stats":{"total_commits":74,"total_committers":3,"mean_commits":"24.666666666666668","dds":"0.28378378378378377","last_synced_commit":"9582e0996e71f43842fb518a7a3a9af09b9c902c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticky%2Fpsp-radio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticky%2Fpsp-radio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticky%2Fpsp-radio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ticky%2Fpsp-radio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ticky","download_url":"https://codeload.github.com/ticky/psp-radio/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809888,"owners_count":20351407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T03:02:37.865Z","updated_at":"2025-03-16T09:33:38.375Z","avatar_url":"https://github.com/ticky.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PSP Radio Emulator\n\nA from-scratch implementation of the PSP Internet Radio player API, allowing the players to be used in a modern web browser.\n\n## What?!\n\nThe PSP, in [firmware update 3.80](https://blog.us.playstation.com/2007/12/17/attention-music-lovers-psp-firmware-v380-is-live/), added support for Internet Radio players.\n\nSony provided a handful of players of their on, some of them mundane, and some of them quite novel. They generally tune to internet radio streams from Shoutcast or Icecast's registries.\n\nThe players actually run within the PSP's NetFront internet browser, but in a special mode where they're allowed to embed an `application/x-psp-extplugin` object, which then provides DOM methods for interacting with a non-JavaScript radio player implementation.\n\nThis project constitutes a reimplementation of the `application/x-psp-extplugin`'s API in JavaScript, along with a wrapper for running and interacting with the radio players themselves. the ultimate shape of the wrapper is still to be determined, but whilst it is possible to run within a web browser, it imposes several limitations the original did not have.\n\n## How?\n\nThe radio players, at this stage, must be patched to embed the project's shim code. This is less of a problem now that [Sony's original catalogue is down](http://web.archive.org/web/20140704222439id_/http://www.playstation.com/psp-app/radio/index.html) (Internet Archive link for your convenience)!\n\nFrom there, we attach ourselves to the document in a few ways;\n\n1. Pretending the browser has the `application/x-psp-extplugin` plugin available\n2. Searching the document for any elements with an `id`, but no `name`, and copying the `id` value to the `name` so they become named properties of the `document` object\n3. Setting a global `psp` variable, which tricks some of the PSP's players into not actually embedding their `application/x-psp-extplugin` plugins, but just using that reference\n\nThen, within the `psp` object, we keep a bunch of state and audio objects, so that we can respond to the players' requests to open streams and fetch data over HTTP. We also proxt HTTP requests via a cors proxy, as the Shoutcast and Icecast lookup APIs would otherwise be inaccesible to the web browser.\n\nFinally, because web browsers' audio players do not expose any script-side access to the `icy` or other metadata from a Shoutcast stream, there is a method for polling a poorly-documented, and unfortunately poorly-supported metadata endpoint supported by some Shoutcast and Icecast servers.\n\n## What works? What's missing?\n\n- [x] Loading Sony's players\n  - [x] SCE HTTP request API, rebuilt atop `fetch`\n  - [x] SCE String manipulation API, made no-op as UTF-8 conversion is not necessary\n  - [x] Streaming a radio station\n  - [x] Reading radio station metadata (Flaky)\n  - [x] Starting audio playback in Safari (with \"allow all auto-play\" set for the domain)\n  - [ ] Starting audio playback in Firefox/Edge/Chrome (don't support the pls format, do seem to support MPEG streams, maybe conversion is possible?)\n- [ ] Full audio pipeline\n  - [ ] Audio effects\n  - [ ] Noise, sound effect and wave generator functions\n    - [ ] Morse code generator in sine wave oscillator (I am not joking!)\n  - [ ] Gain controls\n  - [ ] Audio peak meter functions\n- [ ] Finalised UI\n  - [ ] Determining if the audio pipeline is feasible on the web\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticky%2Fpsp-radio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fticky%2Fpsp-radio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticky%2Fpsp-radio/lists"}