Playify is a Flutter plugin for play/pause/seek songs, fetching music metadata, and browsing music library.

Overview

Playify

Pub Version

Playify is a Flutter plugin for play/pause/seek songs, fetching music metadata, and browsing music library. Playify was built using iOS's Media Player Framework to fetch and play music from iOS's Music Library. Currently supports only iOS, but Android support is being developed. PR's are welcomed. Checkout the documentation.

Requirements:

Usage

import 'package:playify/playify.dart';

//Create an instance
Playify myplayer = Playify();

//Play from the latest queue.
await myplayer.play();

//Fetch all songs from iOS's Apple Music.
var artists = await myplayer.getAllSongs(sort: true);

//Fetch song information about the currently playing song in the queue.
var songInfo = await myplayer.nowPlaying();

//Set the queue using songIDs for iOS.
await myplayer.setQueue(songIDs: songIDs);

//Skip to the next song in the queue.
await myplayer.next();

//Skip to the previous song in the queue.
await myplayer.previous();

//Set the playback time of the song.
await myplayer.setPlaybackTime(time);

//Set the shuffle mode.
await myplayer.setShuffleMode(mode);

iOS

  • For iOS, Playify uses iOS's Media Player framework. This makes Playify available only on iOS >= 10.3. Make sure to specify the minimum version of the supported iOS version of your app from Xcode.

  • Getting All Songs: For geting all songs from the Apple Music library of the iPhone, you can specify whether to sort the artists. The songs are sorted by their track number, and the albums are sorted alphabetically. The cover art of each album is fetched individually, and you can specify the size of the cover art. The larger the cover art, the more amount of RAM it consumes and longer it takes to fetch. In my case, the default value takes about 1-2 seconds with 800+ songs.

Screenshots

Screenshot Screenshot Screenshot Screenshot

Comments
  • getAllSongs crashes for large music libraries, regardless of coverArtSize.

    getAllSongs crashes for large music libraries, regardless of coverArtSize.

    Even if I set coverArtSize to 0, getAllSongs crashes for bigger libraries. Is there a way around this? Ex. doing it batch wise.

    I actually just want to retrieve the artists, would you be able to implement getAllArtists? This is a common use case for tracking concerts, and comparing similarity of music tastes etc.

    opened by Justus-M 2
  • error building for android

    error building for android

    I know it's a plugin for ios, but it won't let me build for android:

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':playify:compileReleaseKotlin'.

    Compilation error. See log for more details

    opened by Justus-M 1
  • Is there any way I can get songs based on genre?

    Is there any way I can get songs based on genre?

    Or get a list of genre's available on the user's library and then get songs based on that? I looked at your documentation and didn't find anything so wondering if it's there

    opened by omartoutounji 1
  • Type mismatch: inferred type is String? but String was expected

    Type mismatch: inferred type is String? but String was expected

    I got following error on Android so I couldn't build the App:

    C:\Users\user\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\playify-2.0.0\android\src\main\kotlin\com\kaya\playify\playify\PlayifyPlayer.kt: (76, 34): Type mismatch: inferred type is String? but String was expected

    I solved this with commenting line 76 in PlayifyPlayer. The causing line was Log.d("playify", albumArt)

    opened by xxjonesriderxx 1
  • Added playlists and better documentation

    Added playlists and better documentation

    • Added playlist support. Currently playlists are read-only.
    • Added several new functions: append, prepend, skipToBeginning, and getPlaylists.
    • Added better documentation.
    • Several minor breaking changes viewable at CHANGELOG.
    opened by iberatkaya 1
  • statusStream to get playback state and playing item changes

    statusStream to get playback state and playing item changes

    I added getting playback state as a stream, example app is updated to use that for play/pause button so it works better. State is also updated when playing item changes, could be better to make that its own stream though

    opened by XMitja 0
  • Crash on Android : Unable to instantiate receiver com.kaya.playify.playify.PlayifyPlayer

    Crash on Android : Unable to instantiate receiver com.kaya.playify.playify.PlayifyPlayer

    Hey , am facing a crash on my android device , with error :

    Unable to instantiate receiver com.kaya.playify.playify.PlayifyPlayer: java.lang.ClassCastException: com.kaya.playify.playify.PlayifyPlayer cannot be cast to android.content.BroadcastReceiver

    only when i try to change Volume ( either programatically , or using hardware button )

    I got this crash only on Samsung device ( Android version 12 )

    And it was working fine on One plus ( Android Version 11 )

    opened by rohitsangwan01 0
Releases(2.2.1)
Owner
Ibrahim Berat Kaya
Software Developer interested in Node.js, Flutter, Swift & SwiftUI, React Native, and React.js.
Ibrahim Berat Kaya
🎵 Elegant music app to play local music & YouTube music. Distributes music into albums & artists. Has playlists & lyrics. Windows + Linux + Android.

Harmonoid Elegant music app to play local music & YouTube music. Download Now ?? Windows, Linux & Android. Feel free to report bugs & issues. Loving t

Harmonoid 1.9k Aug 10, 2022
Flutter Music Player - First Open Source Flutter based material design music player with audio plugin to play local music files.

Flutter Music Player First Open Source Flutter based Beautiful Material Design Music Player(Online Radio will be added soon.) Demo App Play Store BETA

Pawan Kumar 1.5k Jan 8, 2023
Android app to show movie ratings when browsing Netflix, Amazon Prime Video and other supported video streaming apps on the phone

Flutter - Movie Ratings You can get the latest Playstore version here on Playstore - or download directly - 0.4.5 Screenshots of master Search Page Fa

Jay Rambhia 71 Nov 23, 2022
Flutter apple music preview - A Music App that leverages the iTunes Rest API to get music data and playable music trailers

Apple Music Preview App Description This project is a Music App that leverages t

Willy Adinata Saragih 2 May 23, 2022
A Flutter plugin to read 🔖 metadata of 🎵 media files. Supports Windows, Linux & Android.

flutter_media_metadata A Flutter plugin to read metadata of media files. A part of Harmonoid open source project ?? Install Add in your pubspec.yaml.

Harmonoid 60 Dec 2, 2022
Generate a new file by compressed video, and provide metadata. Get video thumbnail from a video path, supports JPEG/GIF. To reduce app size not using FFmpeg in IOS.

flutter_video_compress Generate a new path by compressed video, Choose to keep the source video or delete it by a parameter. Get video thumbnail from

天海るり 179 Dec 8, 2022
News App created in Flutter using News API for fetching realtime data and Firebase as the backend and authenticator.

News Buzz News App created in Flutter using News API for fetching realtime data and Firebase as the backend and authenticator. Features Custom news fe

Ankur Kedia 545 Dec 30, 2022
Flutter app fetching nasa's picture of the day api

NASA Project the nasa project created in flutter using BLoc for state management and NASA astronomy picture of the day api Getting Started The app con

Nader ismaiel 1 Jan 7, 2022
Google Play Store one page design with flutter

playstore A new Flutter project. Getting Started Google Play Store one page desi

Ozan Takır 0 Dec 23, 2021
A Flutter plugin for playing music on iOS and Android.

Stereo plugin for Flutter A Flutter plugin for playing music on iOS and Android. Features Play/pause Stop Duration / seek to position Load track from

2find 67 Sep 24, 2022
A Flutter plugin for music sequencing.

flutter_sequencer This Flutter plugin lets you set up sampler instruments and create multi-track sequences of notes that play on those instruments. Yo

Mike Perri 63 Dec 29, 2022
Audio manager - A flutter plugin for music playback, including notification handling.

audio_manager A flutter plugin for music playback, including notification handling. This plugin is developed for iOS based on AVPlayer, while android

Jerome Xiong 96 Oct 25, 2022
Caffodils - Download everything | Flutter app for Android and IOS. Download Video, Reels, Shorts, Music, Images, Files from Instagram, Facebook and Youtube

caffodils Caffodils - Download everything Flutter app for Android and IOS. Download Video, Reels, Shorts, Music, Images, Files from Instagram, Faceboo

Caffodils 11 Oct 24, 2022
A Flutter package for working with piano keys and sheet music

Piano A Flutter package that provides: logic for working with musical notes, clefs and octaves; a widget that can render notes on a clef; an interacti

Craig McMahon 32 Jan 5, 2023
A mobile music streaming app with a complex UI built with Flutter and the Deezer API🚀

Sap Sap is a music streaming & discovery app built with the Deezer API for iOS and Android. It includes a mini player, search and local storage. Be su

Carlton Aikins 53 Dec 28, 2022
Music Streaming and Downloading app made in Flutter

Musify Music Streaming and Downloading app made in Flutter! Show some ❤️ and ⭐ the Repo Features Online Song Search ?? Streaming Support ?? Offline Do

Harsh Sharma 257 Dec 30, 2022
A Music Recommendation System made using Flutter and backed by FastAPI.

ProjectX Music A Music Recommendation System made using Flutter and backed by FastAPI. Introduction ProjectX Music is an online mobile application tha

ProjectX Music App 11 Dec 27, 2022
Music App made with flutter

Chillify A Flutter music app made with Provider and BLoC pattern. (Works on Android for now) Recommended Flutter version: 1.7.8+hotfix.4 UI heavily in

Karim Elghamry 632 Jan 4, 2023
:lock: this is flutter mobile application music using glass morphism concept

Flutter Glass Morphism ?? Description: This is source flutter using glass morphism concept How I can run it? ?? Clone this repo ?? Run below code in t

Dao Hong Vinh 12 Jan 19, 2022