All Projects → Festify → cordova-spotify

Festify / cordova-spotify

Licence: MIT license
🎶 A Cordova / PhoneGap plugin for the Spotify SDKs on iOS and Android

Programming Languages

objective c
16641 projects - #2 most used programming language
java
68154 projects - #9 most used programming language
typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to cordova-spotify

cordova-spotify-oauth
🔐 Easy Spotify authentication for Cordova / PhoneGap apps
Stars: ✭ 15 (-31.82%)
Mutual labels:  spotify, cordova-plugin, ios-lib
spotify-playback-flutter
This is an spotify playback package for flutter
Stars: ✭ 39 (+77.27%)
Mutual labels:  spotify, spotify-sdk
Easify-iOS
An iOS application to test out Spotify API. It uses SwiftUI and Combine.
Stars: ✭ 15 (-31.82%)
Mutual labels:  spotify, spotify-sdk
Wox.Plugin.Spotify
Spotify plugin for Wox launcher
Stars: ✭ 29 (+31.82%)
Mutual labels:  spotify
cordova-plugin-webpack
Integrate webpack into your Cordova workflow.
Stars: ✭ 61 (+177.27%)
Mutual labels:  cordova-plugin
now-playing
A macOS application for Spotify notifications and a now playing visual widget!
Stars: ✭ 62 (+181.82%)
Mutual labels:  spotify
LyricsPyRobot
A Telegram bot for searching lyrics.
Stars: ✭ 29 (+31.82%)
Mutual labels:  spotify
yet-another-spotify-lyrics
Command Line Spotify Lyrics with Album Cover
Stars: ✭ 78 (+254.55%)
Mutual labels:  spotify
react-native-spotify-remote
React Native wrapper around the Spotify Remote SDK
Stars: ✭ 194 (+781.82%)
Mutual labels:  spotify
spottr
🌵 Your Spotify stats all in one place.
Stars: ✭ 25 (+13.64%)
Mutual labels:  spotify
alexa-spotify-connect
Control Spotify Connect devices with Alexa
Stars: ✭ 92 (+318.18%)
Mutual labels:  spotify
listentogether-hackathon
Grab some friends, connect your Spotify account, and listen to music in sync with each other.
Stars: ✭ 20 (-9.09%)
Mutual labels:  spotify
Moosync
A simple music player capable of playing local audio or from Youtube or Spotify
Stars: ✭ 185 (+740.91%)
Mutual labels:  spotify
Motion-Tab-Bar
A beautiful animated flutter widget package library. The tab bar will attempt to use your current theme out of the box, however you may want to theme it.
Stars: ✭ 237 (+977.27%)
Mutual labels:  ios-lib
sonos-wejay
Slack integration for a local Sonos system
Stars: ✭ 19 (-13.64%)
Mutual labels:  spotify
spotipy2
The next generation Spotify Web API wrapper for Python 3.7+
Stars: ✭ 25 (+13.64%)
Mutual labels:  spotify
mulukhiya-toot-proxy
各種ActivityPub対応インスタンスへの投稿に対して、内容の更新等を行うプロキシ。通称「モロヘイヤ」。
Stars: ✭ 24 (+9.09%)
Mutual labels:  spotify
cordova-plugin-dbmeter
🎤📣 Cordova plugin to get decibels from the microphone
Stars: ✭ 33 (+50%)
Mutual labels:  cordova-plugin
mute-spotify-ads-mac-osx
Mute Mac (osx) computer audio when Spotify plays an AD
Stars: ✭ 78 (+254.55%)
Mutual labels:  spotify
JFrogfy
a simple clone of spotify built in Emberjs octane the music is played with youtube
Stars: ✭ 27 (+22.73%)
Mutual labels:  spotify

Cordova Spotify SDK Plugin

Greenkeeper badge Travis

An Apache Cordova plugin providing access to the Spotify SDK for iOS and Android.

API documentation

Features

This 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 and our Spotify OAuth 2 plugin cordova-spotify-oauth.

Installation

cordova plugin add cordova-spotify

Note: Make sure your installation path doesn't contain any spaces.

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

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

cordova.plugins.spotify.pause()
  .then(() => console.log("Music is paused ⏸"));

Display current playing position

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."));

React to events from native SKDs

cordova.plugins.spotify.getEventEmitter()
  .then(emitter => emitter.on('playbackevent', eventName => {
    switch (eventName) {
      case 'PlaybackNotifyPlay':
        console.log("Playback was started");
         break;
      case 'PlaybackNotifyPause':
        console.log("Playback was paused");
        break;
      default:
        console.log("Some other event was raised:", eventName);
        break;
    }
  }))

Contributing

Pull requests are very welcome! Please use the gitmoji style for commit messages.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].