npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-mediapicker-fork

v0.0.3

Published

This is untested version of the original plugin https://github.com/an-rahulpandey/ios-audio-picker. In this version we have added the Android Support (thanks to [@kukukk](https://github.com/kukukk)). Please test it and repot the issues. If possible please

Downloads

12

Readme

IMPORTANT NOTE

This is untested version of the original plugin https://github.com/an-rahulpandey/ios-audio-picker. In this version we have added the Android Support (thanks to @kukukk). Please test it and repot the issues. If possible please send a pull request for the fixes. Thanks for your support.

Old version of the plugin can be found here - https://github.com/an-rahulpandey/ios-audio-picker/

Description

The plugin allows you to select the song from iOS music library and copy it in your app Document directory. Then you can use the cordova media plugin to play the song. Check the demo on how to play a song via media plugin.

Installation

cordova plugin add https://github.com/an-rahulpandey/cordova-plugin-mediapicker.git

Methods & Usage

  • To select the song from music library
window.plugins.mediapicker.getAudio(success,error,multiple,icloud);

success - will be called when the user has done selecting the songs. You can get the array of songs list using this

    function success(data)
    {
      console.log(JSON.stringify(data));
    }

error - will be called if there are any errors in exporting or selecting the songs

    function error(e)
    {
      console.log(e);
    }

multiple - a boolean variable which allows you the disable multiple songs selection from the user. You can either pass true or false

icloud - a boolean variable if sets true will show the iCloud songs otherwise not.

    var multiple = true; // Will allow user to select multiple songs.
    or
    var multiple = false; // Will allow user to select only one song.
    
    var icloud = true; // Will show iCloud songs.
    or
    var icloud =  false; // Will only show songs available locally on device.
  • To delete the song
window.plugins.mediapicker.deleteSongs(success,error,multiple,src);

multiple - To delete multiple files or single file. You can either pass true or false.

    var multiple = true; // Will delete multiple songs.
    or
    var multiple = false; // Will delete only one song.

src - It depends on the value of option. If the option is true, then the src will be an array containing full path to file. Otherwise a string will single full path. The full path should not contain file://localhost or any encoded string like Value%20Space. It should start like this /var/mobile/....../file name.m4a. See demo for more information.