{"id":18365206,"url":"https://github.com/festify/cordova-spotify","last_synced_at":"2025-04-06T16:31:10.166Z","repository":{"id":57209277,"uuid":"75433594","full_name":"Festify/cordova-spotify","owner":"Festify","description":":notes: A Cordova / PhoneGap plugin for the Spotify SDKs on iOS and Android","archived":false,"fork":false,"pushed_at":"2020-03-25T16:26:07.000Z","size":305,"stargazers_count":23,"open_issues_count":11,"forks_count":21,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-03-30T06:01:40.615Z","etag":null,"topics":["android-library","cordova-plugin","ios-lib","spotify","spotify-sdk"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Festify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-02T21:47:54.000Z","updated_at":"2024-10-01T20:40:53.000Z","dependencies_parsed_at":"2022-09-18T01:46:12.323Z","dependency_job_id":null,"html_url":"https://github.com/Festify/cordova-spotify","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Festify%2Fcordova-spotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Festify%2Fcordova-spotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Festify%2Fcordova-spotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Festify%2Fcordova-spotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Festify","download_url":"https://codeload.github.com/Festify/cordova-spotify/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247512522,"owners_count":20950878,"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":["android-library","cordova-plugin","ios-lib","spotify","spotify-sdk"],"created_at":"2024-11-05T23:12:52.846Z","updated_at":"2025-04-06T16:31:09.873Z","avatar_url":"https://github.com/Festify.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cordova Spotify SDK Plugin\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/Festify/cordova-spotify.svg)](https://greenkeeper.io/) [![Travis](https://img.shields.io/travis/Festify/cordova-spotify.svg)](https://travis-ci.org/Festify/cordova-spotify)\n\nAn [Apache Cordova](https://cordova.apache.org/) plugin providing access to the Spotify SDK for iOS and Android.\n\n[API documentation](https://festify.github.io/cordova-spotify/)\n\n## Features\n\nThis plugin provides a very simple and atomic layer over playback functionality of the Spotify SDK. It allows you to play Spotify tracks via their URI. Metadata and authentication functionality has deliberately been left out in favor of the [Web API](https://developer.spotify.com/web-api/) and our Spotify OAuth 2 plugin [cordova-spotify-oauth](https://github.com/Festify/cordova-spotify-oauth).\n\n## Installation\n\n```bash\ncordova plugin add cordova-spotify\n```\n\nNote: Make sure your installation path doesn't contain any spaces.\n\n## Examples\n\nThe plugin is very simple to use. All methods can be called at any time and there is no initialization step. The plugin performs all necessary state changes automatically. All methods documented in the API documentation are exported under the global `cordova.plugins.spotify`-object.\n\n### Play some good music\n```js\ncordova.plugins.spotify.play(\"spotify:track:0It6VJoMAare1zdV2wxqZq\", { \n  clientId: \"\u003cYOUR SPOTIFY CLIENT ID\",\n  token: \"\u003cYOUR VALID SPOTIFY ACCESS TOKEN WITH STREAMING SCOPE\u003e\"\n})\n  .then(() =\u003e console.log(\"Music is playing 🎶\"));\n```\n\n### React to user pressing pause button\n```js\ncordova.plugins.spotify.pause()\n  .then(() =\u003e console.log(\"Music is paused ⏸\"));\n```\n\n### Display current playing position\n```js\ncordova.plugins.spotify.getPosition()\n  .then(pos =\u003e console.log(`We're currently ${pos}ms into the track.`))\n  .catch(() =\u003e console.log(\"Whoops, no track is playing right now.\"));\n```\n\n### React to events from native SKDs\n```js\ncordova.plugins.spotify.getEventEmitter()\n  .then(emitter =\u003e emitter.on('playbackevent', eventName =\u003e {\n    switch (eventName) {\n      case 'PlaybackNotifyPlay':\n        console.log(\"Playback was started\");\n         break;\n      case 'PlaybackNotifyPause':\n        console.log(\"Playback was paused\");\n        break;\n      default:\n        console.log(\"Some other event was raised:\", eventName);\n        break;\n    }\n  }))\n```\n\n## Contributing\n\nPull requests are very welcome! Please use the [gitmoji](https://gitmoji.carloscuesta.me/) style for commit messages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffestify%2Fcordova-spotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffestify%2Fcordova-spotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffestify%2Fcordova-spotify/lists"}