{"id":22505158,"url":"https://github.com/azer/play-url","last_synced_at":"2025-07-10T06:07:07.964Z","repository":{"id":57325730,"uuid":"13353933","full_name":"azer/play-url","owner":"azer","description":"Unified API for playing Youtube, Rdio, SoundCloud and Mp3 URLs.","archived":false,"fork":false,"pushed_at":"2016-12-29T16:50:24.000Z","size":11,"stargazers_count":19,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-20T15:52:58.663Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/azer.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}},"created_at":"2013-10-05T22:53:14.000Z","updated_at":"2023-01-31T20:48:02.000Z","dependencies_parsed_at":"2022-08-31T20:10:57.495Z","dependency_job_id":null,"html_url":"https://github.com/azer/play-url","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/azer/play-url","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Fplay-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Fplay-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Fplay-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Fplay-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azer","download_url":"https://codeload.github.com/azer/play-url/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azer%2Fplay-url/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264537311,"owners_count":23624418,"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-12-07T00:15:28.495Z","updated_at":"2025-07-10T06:07:07.916Z","avatar_url":"https://github.com/azer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## play-url\n\nUnified API for playing Youtube, Rdio, SoundCloud and Mp3 URLs.\n\n```js\nplayer = require('play-url')(/* options */)\n\nplayer.play('http://www.youtube.com/watch?v=fPjW1nwIdsY')\nplayer.play('https://soundcloud.com/veyasin/mode-xl-bul-karayi')\nplayer.play('http://www.rdio.com/artist/The_Chemical_Brothers/album/Push_The_Button/track/Galvanize/')\nplayer.play('http://tayfabandista.org/player/haydi_barikata.mp3')\n```\n\nSee `test/index.js` for more info.\n\n## Install\n\n```bash\n$ npm install play-url\n```\n\nNote: Despite this module using NPM, it is only for web-browsers, not for node.js. [Learn more.](https://github.com/azer/play-url/issues/1)\n\n\n## API\n\n### require('play-url')(`options`)\n\nPass SoundCloud and Rdio API keys:\n\n```js\nplayer = require('play-url')({ soundcloud: 'api-key', rdio: { key: 'api-key', auth: 'auth.html' })\n```\n\n#### .play(`url`)\n\n```js\nplayer.play('http://www.rdio.com/artist/The_Chemical_Brothers/album/Push_The_Button/track/Galvanize/')\n```\n\n#### .pause()\n\n```js\nplayer.pause()\n```\n\n#### .playback()\n\nReturns the active playback object.\n\n```js\nplayer.playback.url\n// =\u003e http://www.youtube.com/watch?v=fPjW1nwIdsY\n```\n\nYou can subscribe to the changes on it:\n\n```js\nplayer.playback.subscribe(function (newPlayback, oldPlayback) {\n  console.log('Started playing %s', newPlayback.url)\n})\n```\n\n#### .onPlay(`callback`)\n\n```js\nplayer.onPlay(function () {\n  player.playback().url\n  // =\u003e http://www.youtube.com/watch?v=fPjW1nwIdsY\n})\n```\n\nFor once:\n\n```js\nplayer.onPlay.subscribe.once(function () {\n\n})\n```\n\nTo unsubscribe:\n\n```js\nplayer.onPlay.unsubscribe(`callback`)\n```\n\n#### .onEnd(`callback`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazer%2Fplay-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazer%2Fplay-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazer%2Fplay-url/lists"}