Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ignoreSilentSwitch not working on iOS #2157

Closed
jamesdarabi opened this issue Sep 22, 2020 · 2 comments
Closed

ignoreSilentSwitch not working on iOS #2157

jamesdarabi opened this issue Sep 22, 2020 · 2 comments
Labels
stale Closed due to inactivity or lack or resources

Comments

@jamesdarabi
Copy link

jamesdarabi commented Sep 22, 2020

Bug

Setting the ignoreSilentSwitch prop to ignore as specified in the docs doesn't work on iOS. @akhan118 indicates here that he is having a similar problem - specifically, he thinks the issue might be related to having the paused prop set to true.

Platform

Which player are you experiencing the problem on:

  • iOS

Environment info

React native info output:

System:
    OS: macOS 10.15.6
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 3.02 GB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.11.0 - ~/.nvm/versions/node/v14.11.0/bin/node
    Yarn: Not Found
    npm: 6.14.8 - ~/.nvm/versions/node/v14.11.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
    Android SDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6626763
    Xcode: 12.0/12A7209 - /usr/bin/xcodebuild
  Languages:
    Java: javac 15 - /usr/bin/javac
    Python: 3.8.5 - /Users/jamesdarabi/.pyenv/shims/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: 0.63.2 => 0.63.2
  npmGlobalPackages:
    *react-native*: Not Found

Library version: 0.63.2

Steps To Reproduce

  1. Set ignoreSilentSwitch prop to ignore.
  2. Try to play video while iOS device is in silent mode.
  3. The video plays without any audio.

Expected behaviour

  1. The audio plays despite the iOS device being in silent mode.

Reproducible sample code

<Video
  controls={true}
  ignoreSilentSwitch={'ignore'} // This doesn't work.
  onEnd={() =>
    analytics().logEvent('video_end', { name: video.storagePath })
  }
  onError={handleError}
  paused={true}
  ref={player}
  source={{ uri: getOSPath(fileSystemPath) }}
  style={styles.video}
/>
@jamesdarabi
Copy link
Author

https://github.com/react-native-community/react-native-video/blob/master/ios/Video/RCTVideo.m#L929:L929 < looks like it is related to having the paused prop set to true.

@jannisringwald
Copy link

+1

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

No branches or pull requests

3 participants