All Projects β†’ qreate β†’ spotify-playback-flutter

qreate / spotify-playback-flutter

Licence: MIT License
This is an spotify playback package for flutter

Programming Languages

kotlin
9241 projects
dart
5743 projects
ruby
36898 projects - #4 most used programming language
swift
15916 projects
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to spotify-playback-flutter

cordova-spotify
🎢 A Cordova / PhoneGap plugin for the Spotify SDKs on iOS and Android
Stars: ✭ 22 (-43.59%)
Mutual labels:  spotify, spotify-sdk
Easify-iOS
An iOS application to test out Spotify API. It uses SwiftUI and Combine.
Stars: ✭ 15 (-61.54%)
Mutual labels:  spotify, spotify-sdk
react-tailwind-spotify-clone
Spotify clone with full functionality using React + Tailwind (Not finished)
Stars: ✭ 209 (+435.9%)
Mutual labels:  spotify
spicetify-marketplace
Download extensions and themes directly from Spicetify
Stars: ✭ 125 (+220.51%)
Mutual labels:  spotify
remixr
Discover new music based on the Spotify playlists you know and love!
Stars: ✭ 37 (-5.13%)
Mutual labels:  spotify
spotdlRedesign
spotDL v4 - The spotDL you love and use with plugin support.
Stars: ✭ 17 (-56.41%)
Mutual labels:  spotify
Spotify-Internal
Remove ads and add extra features for spotify desktop version.
Stars: ✭ 25 (-35.9%)
Mutual labels:  spotify
statify
An app where anyone can join with Spotify credentials and see a lot of cool statistics about his/her profile.
Stars: ✭ 23 (-41.03%)
Mutual labels:  spotify
PlaylistPolice
Allows you to whitelist Spotify users for your collaborative playlists
Stars: ✭ 33 (-15.38%)
Mutual labels:  spotify
spotify-true-random
πŸ”€ An application for unbiased truly random playlist and library shuffling with Spotify.
Stars: ✭ 51 (+30.77%)
Mutual labels:  spotify
spotify-auth-code-example-vue
VueJS boilerplate app with Spotify API authentication and data fetching.
Stars: ✭ 12 (-69.23%)
Mutual labels:  spotify
Spotify-Podcast-Feed
A service which provides Spotify podcast as RSS feed, which can be subscribed in any podcast app.
Stars: ✭ 16 (-58.97%)
Mutual labels:  spotify
FCommunity
multi Checkers (Hma/Hulu/Spotify/Call of duty/Instagram/smtp2go/VyprVpn) in One Tool Named FCommunity
Stars: ✭ 26 (-33.33%)
Mutual labels:  spotify
pebblify
Pebblify is a full-featured Spotify app for Pebble watches, made with PebbleJS ⌚🎢 https://apps.rebble.io/en_US/application/5ff3b52b1e6bb11b9eee5c5a
Stars: ✭ 16 (-58.97%)
Mutual labels:  spotify
platzi-music-vue
Web app para el curso Profesional de Vue.js
Stars: ✭ 33 (-15.38%)
Mutual labels:  spotify
spotify-reddit
Spotify playlists backed by subreddits
Stars: ✭ 14 (-64.1%)
Mutual labels:  spotify
Spicetify-Canvas
Spotify Canvas, on Spicetify for Desktop!
Stars: ✭ 34 (-12.82%)
Mutual labels:  spotify
guilyx
Dynamic Profile with github statistics, coding info (time and languages) with WakaTime and music status with the spotify API, leave a ⭐ if you like it
Stars: ✭ 175 (+348.72%)
Mutual labels:  spotify
music-app-electron
Music-Streaming app built with Electron, Webpack, Vue.js, Vuex and the Spotify api.
Stars: ✭ 74 (+89.74%)
Mutual labels:  spotify
spotify-clone
🎢 Spotify Clone
Stars: ✭ 17 (-56.41%)
Mutual labels:  spotify

This project is not being actively maintained please use: https://pub.dev/packages/spotify_sdk

spotify_playback

CircleCI

Spotify Playback Plugin.

No iOS Implementation yet, WIP..

Features

  • Play (track / album / playlist)
  • Resume / pause
  • Queue
  • Playback position
  • Seek
  • Seek to relative position
  • Play Next
  • Play Previous
  • Repeat
  • Shuffle
  • Get image
  • Image link to URI

Installation

IMPORTANT: Make sure you have the Spotify app installed and that you are logged in or your test device!

First, add spotify_playback as a dependency in your pubspec.yaml file.

Afterwards, download the Spotify Android SDK here and move the spotify-app-remote-release-x.x.x.aar file to android/app/libs/ in your project.

Then initialize the spotify playback sdk like this

@override
  void initState() {
    super.initState();
    initConnector();
  }

  /// Initialize the spotify playback sdk, by calling spotifyConnect
  Future<void> initConnector() async {
    try {
      await SpotifyPlayback.spotifyConnect(clientId: "", redirectUrl: "").then(
          (connected) {
        if (!mounted) return;
        // If the method call is successful, update the state to reflect this change
        setState(() {
          _connectedToSpotify = connected;
        });
      }, onError: (error) {
        // If the method call trows an error, print the error to see what went wrong
        print(error);
      });
    } on PlatformException {
      print('Failed to connect.');
    }
  }

After this you can use all the available methods

Available methods

Method description parameters notes
spotifyConnect Initilizes the spotify playback sdk clientId, redirectUrl
play Play's an spotify track, album or playlist spotify uri
pause Pause's the currently playing track
resume Resumes the currently paused track
queue Adds an track / playlist / album to the queue spotify uri
skipNext Play's the next track
skipPrevious Play's the previous track
seekTo Seeks to the passed time time(mS)
seekToRelativePosition Seeks to relative position +-time(mS)
toggleShuffle Toggle shuffle options
toggleShuffle Toggle Repeat options
getPlaybackPosition Get's the current tracks playback position
getImage Gets a Uint8List encoded image(memoryImage) imageUri, quality, size
imageLinkToURi Takes an image url and returns image uri(for get image) imageLink
getAuthToken Gets the authToken by using the redirect url, client id clientId, redirectUrl

Example

Demonstrates how to use the spotify_playback plugin.

See the example documentation for more information.

Function examples

GetImage

Get image accepts the following parameters:

  • URI, the spotify image uri - string
  • Quality, the quality the image should be provided in - int 0-100
  • Size, the spotify image size can be one of the following
    • ImageDimension.THUMBNAIL = 144px
    • ImageDimension.X_SMALL = 240px
    • ImageDimension.SMALL = 360px
    • ImageDimension.MEDIUM = 480px
    • ImageDimension.LARGE = 720px
//You can provide an image uri
SpotifyPlayback.getImage(uri: "spotify:image:3269971d34d3f17f16efc2dfa95e302cc961a36c", quality: 100, size: 360);

//Or you can provide an url returned webAPI
SpotifyPlayback.getImage(uri: SpotifyPlayback.imageLinkToURi("https://i.scdn.co/image/3269971d34d3f17f16efc2dfa95e302cc961a36c"), quality: 100, size:360);

//Theese both return a Uint8List encoded image.
//You can then use the Image.memory() to display the image
Image.memory(yourUint8ListImageHere)

Changelog

See CHANGELOG.md.

Special Thanks

Contributing

Feel free to contribute by opening issues and/or pull requests. Your feedback is very welcome!

License

MIT License

Copyright (c) [2019] [Joran Dob] Copyright (c) [2019] [QREATE]

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].