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
A Flutter music player to play songs (mp3).

?? ?? Flutter Music A Flutter music player to play songs (mp3). Please star ⭐ the repo if you like what you see ?? . ?? Requirements Any Operating Sys

null 109 Dec 16, 2022
WazPlay is just a music app written in flutter and service to download song and play it.

wazplay Introduction WazPlay is just a music app written in flutter and service to download song and play it. WazPlay is the first product for Waz and

Zaw Lin Tun 4 Dec 8, 2022
Play simultaneously music/audio from assets/network/file directly from Flutter, compatible with android / ios / web / macos, displays notifications

?? assets_audio_player ?? Play music/audio stored in assets files (simultaneously) directly from Flutter (android / ios / web / macos). You can also u

Florent CHAMPIGNY 651 Dec 24, 2022
A Flutter audio plugin (Swift/Java) to play remote or local audio files on iOS / Android / MacOS and Web

AudioPlayer A Flutter audio plugin (Swift/Java) to play remote or local audio files on iOS / Android / MacOS and Web. Online demo Features Android / i

Erick Ghaumez 489 Dec 18, 2022
Flutter Music Player - A complete and open source music player designed in flutter.

Flutter Music Player A complete and open source music player designed in flutter. It is first complete music player designed in flutter. This app expl

Nabraj Khadka 3 Aug 20, 2022
A flutter based music player for subsonic compatible music servers.

subsound A subsonic music player. Screenshots Release todo fix random breakage of player sometimes. seems like onStart is not working after background

Eivind Siqveland Larsen 26 Oct 6, 2022
Beautiful-Music-App-UI - Music App page UI Using Flutter

Beautiful Music App UI A Flutter App Music UI developed in Flutter Getting Start

Zain Basharat Ali 5 Jun 17, 2022
Music Player app made with Just audio library and Local database Hive.

Music Player app made with Just audio library and Local database Hive. Find the free and Royelty music with Happy Rock application. The app contains information about singers and you can make your own playlist with Songs.Happy rock App's features are same as the real music app like spotify, amazon music etc.

Ansh rathod 17 Dec 22, 2022
Base on Vap to play alpha video animation

Backdrop Transparent video animation is currently one of the more popular implementations of animation. Major manufacturers have also open source

null 89 Dec 27, 2022
You can play various sounds using this app

Xylophone ?? Our Goal In this tutorial we will be diving into more Dart programming concepts and learning how to use open source Flutter packages. By

Kuldeep Rathor 1 Oct 23, 2021
Flutter plugin for selecting multiple images from the Android and iOS image library

Flutter plugin for selecting multiple images from the Android and iOS image library, taking new pictures with the camera, and edit them before using such as rotating, cropping, adding sticker/filters.

Weta Vietnam 91 Dec 19, 2022
Post and listen to music/recordings uploaded by other users. :tada:

An Audio App Post and listen to music/recordings uploaded by other user . Tech used - Flutter , Firebase Features Signup/Login Upload or Play audio Li

null 6 Nov 11, 2022
An online and offline music player

awesomemusic A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

teamDrt 9 Oct 28, 2022
BlackHole - A Music Player App made with Flutter

BlackHole - A Music Player App made with Flutter

Ankit Sangwan 4.2k Jan 2, 2023
Create responsive music design using Flutter

Create responsive music design using Flutter

Firgia 40 Dec 27, 2022
A Material designed music player developed in Flutter.

Flutter Music Player UI A Material designed music player developed in Flutter. Getting Started This project is a starting point for a Flutter applicat

Packiyanathan Mathulan 17 Jan 13, 2022
Flutter music player application. (仿网易云音乐)

Flutter music player application. (仿网易云音乐)

Bin 3.1k Dec 30, 2022
Flutter Music Interface UI Concept

Flutter Music Interface UI Concept Watch the Video on Youtube - Youtube Video Also Don't Forget to Subscribe to My youtube Channel - Youtube Channel C

Abdi Hamid 178 Aug 29, 2022
A simple music player made using Flutter.

Music Player App This is a beautiful music player, developed using Flutter. Features Play any song included in Flutter Assets Background Play Beautifu

Hash Studios 15 May 21, 2022