Git Product home page Git Product logo

Comments (13)

glamp avatar glamp commented on June 17, 2024 7

Ok got it working. Added this to my Info.plist file. 👍

    <key>UIBackgroundModes</key>
    <array>
        <string>audio</string>
    </array>

Thanks for a great library!

from react-native-sound.

tmaly1980 avatar tmaly1980 commented on June 17, 2024 6

What about Android?

from react-native-sound.

yelnar avatar yelnar commented on June 17, 2024 3

@MarinaArimany I ended up using react-native-background-timer.

from react-native-sound.

glamp avatar glamp commented on June 17, 2024 2

I'm running the following and when I leave the app, the sound fades and then stops.

var filepath = '/path/to/audio/../sound.mp3';
var currentAudio = new Sound(filepath);
currentAudio.setCategory('Playback');

Am I doing something wrong? I've installed from:

npm install git+ssh://[email protected]/zmxv/react-native-sound.git

from react-native-sound.

galmis avatar galmis commented on June 17, 2024 1

Hi, maybe #25 could help (iOS only)? To play sound when app is in background, you could simply call mySound.setCategory("Playback");

from react-native-sound.

zmxv avatar zmxv commented on June 17, 2024

Not at the moment. PRs are always welcome.

from react-native-sound.

danvass avatar danvass commented on June 17, 2024

@zmxv Any pointers on how this would be implemented, interested at seeing if I can add it in.

from react-native-sound.

bringking avatar bringking commented on June 17, 2024

@zmxv Any status on merging #25? We need it and I would like to avoid running off a fork. Anything we can do to help move it along?

from react-native-sound.

zmxv avatar zmxv commented on June 17, 2024

Sorry for the slow response. I'll verify the PR in a day.

from react-native-sound.

zmxv avatar zmxv commented on June 17, 2024

@glamp I've updated README with your tip. Thanks!

from react-native-sound.

yelnar avatar yelnar commented on June 17, 2024

I cannot play audio in the background on Andorid. Any idea on what I could do wrong?

from react-native-sound.

MarinaAmy avatar MarinaAmy commented on June 17, 2024

@yelnar Did you find a solution ? Thank you

from react-native-sound.

MarinaAmy avatar MarinaAmy commented on June 17, 2024

@yelnar Thank you ;)

from react-native-sound.

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.