Giter VIP home page Giter VIP logo

Comments (5)

johnsonsu avatar johnsonsu commented on June 8, 2024

It should be playSoundFile

from react-native-sound-player.

omkarsk98 avatar omkarsk98 commented on June 8, 2024

If it is so, please update your docs.
It still doesnt help with playSoundFile method.

from react-native-sound-player.

johnsonsu avatar johnsonsu commented on June 8, 2024

The doc has been updated already.

How are you storing the file in your system? Can you post some of your code here?

from react-native-sound-player.

omkarsk98 avatar omkarsk98 commented on June 8, 2024

I am reading the music files from the phone dynamically . I am using react-native-get-music-files. It returns an array of objects with all the music files and their paths. A sample return value is here.
[ { id : 1, title : "La danza del fuego", author : "Mago de Oz", album : "Finisterra", genre : "Folk", duration : 132132312321, // miliseconds cover : "file:///sdcard/0/123.png", blur : "file:///sdcard/0/123-blur.png", //Will come null if createBLur is set to false path : "/sdcard/0/la-danza-del-fuego.mp3" } ]
So what do I use as the parameters for the function playSoundFile()?
Please help.

from react-native-sound-player.

johnsonsu avatar johnsonsu commented on June 8, 2024

Can you please try playSoundFile("file:///sdcard/0/la-danza-del-fuego.mp3")?
Basically try add file:// in front of the path returned to you from react-native-get-music-files.

from react-native-sound-player.

Related Issues (20)

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.