Giter Site home page Giter Site logo

josias1997 / expo-music-library Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 635 KB

Expo Music Library Package - Retrieve songs artworks, albums, artists, genres and songs folders from device's storage

JavaScript 0.16% Kotlin 78.32% Ruby 1.10% Swift 2.84% TypeScript 17.58%

expo-music-library's Introduction

expo-music-library

React Native Expo Native music library to retrieve song's albums, genres, artists, folders. (Only for working for android at the time being, Need a macbook to implements IOS part)

Table Of contents

Installation

 npm install expo-music-library

Usage

  • Import
import * as MedialLibrary from "expo-music-library";
  • Request permission to access storage

          let permissions = await MusicLibrary.requestPermissionsAsync();
          while (!permissions.granted) {
              permissions = await MusicLibrary.requestPermissionsAsync();
          }
    

API Reference

  • Retrieve Audio files

          const results = await MusicLibrary.getAssetsAsync({
              after: lastMediaAsset,
              mediaType: MusicLibrary.MediaType.audio,
              sortBy: sortBy,
          });
    
  • Retrieve Albums

        const folders = await MusicLibrary.getAlbumsAsync()
    
  • Retrieve Album's Songs

        const albumAssets = await MusicLibrary.getAlbumAssetsAsync(albumName)
    
  • Retrieve Artists

        const artists = await MusicLibrary.getArtistsAsync()
    
  • Retrieve Artist's Songs

        const artistAssets = await MusicLibrary.getArtistAssetsAsync(artistId)
    
  • Retrieve Folders

        const folders = await MusicLibrary.getFoldersAsync()
    
  • Retrieve Folder's Songs

        const folderAssets = await MusicLibrary.getFolderAssetsAsync(folderId)
    
  • Retrieve Genres

        const genres = await MusicLibrary.getGenresAsync()
    
  • Retrieve Genre's Songs

        const genreAssets = await MusicLibrary.getGenreAssetsAsync(genreId)
    

Buy me a coffee

If my you find my work usefull and want to support me, kindly buy me a coffee here Buy Me A Coffee

expo-music-library's People

Contributors

josias1997 avatar

Stargazers

Yunus TURE avatar Pedro Henrique Santos Braga avatar

Watchers

 avatar

expo-music-library's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.