Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

IngoreSilentSwitch not working iOS #621

Closed
adriandiaz opened this issue May 15, 2017 · 4 comments
Closed

IngoreSilentSwitch not working iOS #621

adriandiaz opened this issue May 15, 2017 · 4 comments
Labels
stale Closed due to inactivity or lack or resources

Comments

@adriandiaz
Copy link

react-native version: 0.44.0
react-native-video version: 1.0.0
iOS: 10.3.1

I can't get the "ignoreSilentSwitch" prop to work. I've tried in my own app then downloaded the example provided. In both cases, when I set ignoreSilentSwitch={'ignore'} if the silent switch is on then video is muted. It will only play if I toggle with switch to on.

Is anyone else having this issue? Any suggestions?

@rogerkerse
Copy link

Having same problem

@scarlac
Copy link

scarlac commented May 30, 2017

Having looked at the released version (1.0.0), it's no surprise it's not working: There's no mention of the prop ignoreSilentSwitch anywhere.
While the prop is added in the current development version, it hasn't been released. It was pulled on April 20 from pull request #403

It effectively calls [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil]; which you can do yourself in the meantime:

in AppDelegate.m, add this:

#import <AVFoundation/AVFoundation.h>  // import

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  ...
  [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil];  // allow
  ...
}

Haven't tested it myself, but it should give the same effect.

@duhseekoh
Copy link
Contributor

Correct. I authored #403, and indeed can confirm it has not been cut to a proper npm release. Someone needs to do that. I'm not sure who is in charge of that around here. ¯_(ツ)_/¯

@CosmaTrix
Copy link

Hi everybody. I fixed the "issue" installing master version.

yarn add git://github.com/react-native-community/react-native-video#master

A new release on npm would be great! :)

@hueniverse hueniverse added the stale Closed due to inactivity or lack or resources label Apr 22, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
stale Closed due to inactivity or lack or resources
Projects
None yet
Development

No branches or pull requests

6 participants