Socket
Socket
Sign inDemoInstall

cordova-spotify

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-spotify - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

2

package.json
{
"name": "cordova-spotify",
"version": "0.5.4",
"version": "0.5.5",
"description": "Spotify SDK bindings for Cordova Applications",

@@ -5,0 +5,0 @@ "repository": {

@@ -21,4 +21,30 @@ # Cordova Spotify SDK Plugin

## Examples
The 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.
### Play some good music
```js
cordova.plugins.spotify.play("spotify:track:0It6VJoMAare1zdV2wxqZq", {
clientId: "<YOUR SPOTIFY CLIENT ID",
token: "<YOUR VALID SPOTIFY ACCESS TOKEN WITH STREAMING SCOPE>"
})
.then(() => console.log("Music is playing 🎶"));
```
### React to user pressing pause button
```js
cordova.plugins.spotify.pause()
 .then(() => console.log("Music is paused ⏸"));
```
### Display current playing position
```js
cordova.plugins.spotify.getPosition()
 .then(pos => console.log(`We're currently ${pos}ms into the track.`))
.catch(() => console.log("Whoops, no track is playing right now."));
```
## Contributing
Pull requests are very welcome! Please use the [gitmoji](https://gitmoji.carloscuesta.me/) style for commit messages.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc