Giter Club home page Giter Club logo

react-native-audio-session's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-audio-session's Issues

Setting multiple options?

AVAudioSession allows you to set multiple options at the same time.

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker |  AVAudioSessionCategoryOptionAllowBluetoothA2DP | AVAudioSessionCategoryOptionAllowBluetooth error:nil];

Maybe I'm being thick, but I cannot figure out how to do that with this implementation.

Argument list too long: recursive header expansion failed

Screenshot 2020-08-28 at 6 10 14 PM

Argument list too long: recursive header expansion failed at /Users/iPhone/../../../../node_modules/react-native-audio-session/ios/../../../ios/Pods/React/node_modules/acorn-jsx/node_modules/acorn/src/loose.

Getting this error after linking.

Please help me to fix this issue.

"react-native-audio-session": "0.0.4",
"react-native": "^0.59.10",
"xcode": "11.3",

Change constants values to same as in ios reference

I'm trying to change the ducking behaviour without changing category, so I need to look it up and use right away.

const audioCategory = await ReactNativeAudioSession.currentCategory()
// => 'AVAudioSessionCategoryPlayback'

await ReactNativeAudioSession.setCategory(audioCategory, audioOptions)
// => throws 'Audio session could not be set' 

currentCategory() returns values in the format not supported by setCategory(). e.g 'AVAudioSessionCategoryPlayback' vs 'Playback'

I will just make a map of iOS categories to react-native-audio-session categories for now. But changing the constants maps to use same values as in iOS reference would have been more convenient.

Is that something worth making?

"Playback" category

Hello. I'm doing an iOS VoIP app with push-to-talk functionality, and it works fine in foreground.
But when it goes to background, I set audiosession category to Playback, from PlayAndRecord because I need to still play audio on device, and user has no possibility to record while app is in background. But the red recording indicator is still shown in the status bar while app is in background as if my app is recording. Is there another way to turn of microphone while app is in background?

Setting Playback and DuckOthers does not work

import * as ReactNativeAudioSession from 'react-native-audio-session'

await ReactNativeAudioSession.default.setCategory(
  ReactNativeAudioSession.AudioCategories.Playback,    
  ReactNativeAudioSession.AudioOptions.DuckOthers
)

Errors out with Error Domain=NSOSStatusErrorDomain Code=-50 "(null)" which means parameters error according to this issue:
https://stackoverflow.com/questions/1861989/avaudioplayer-initialization-error-code-50

Any idea why this happens?

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.