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

Mute or Pause Audio on screen recording #2380

Open
pro-softs opened this issue Oct 5, 2024 · 1 comment
Open

Mute or Pause Audio on screen recording #2380

pro-softs opened this issue Oct 5, 2024 · 1 comment
Labels

Comments

@pro-softs
Copy link

Describe the Bug
Even if we disable the screen recording with expo , the audio playback gets recorded. I want to disable recording of audio during screen record.

Steps To Reproduce
Play any audio with this module. Then start screen recording. Audio is captured in the screen recording video

Environment Info:
Paste the results of npx react-native info -
System:
OS: macOS 14.4.1
CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
Memory: 47.28 MB / 8.00 GB
Shell:
version: 3.2.57
path: /bin/bash
Binaries:
Node:
version: 20.1.0
path: ~/.nvm/versions/node/v20.1.0/bin/node
Yarn:
version: 1.22.22
path: ~/Documents/projects/fanfliq/fanfliq-app/fanfliq-fan-app/node_modules/.bin/yarn
npm:
version: 9.6.4
path: ~/.nvm/versions/node/v20.1.0/bin/npm
Watchman:
version: 2024.01.22.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /Users/progupta/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.5
- iOS 17.5
- macOS 14.5
- tvOS 17.5
- visionOS 1.2
- watchOS 10.5
Android SDK:
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2023.2 AI-232.10300.40.2321.11668458
Xcode:
version: 15.4/15F31d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.9
path: /usr/local/opt/openjdk@17/bin/javac
Ruby:
version: 2.6.3
path: /Users/progupta/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.5
wanted: 0.74.5
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

react-native-track-player version - 4.1.1
Using on Real device
Both Android and ios.

How I can Help
There is an option in Android using AudioManager.setAllowedCapturePolicy in android to disable system or third-party app to disable the audio capture. Any possibility to use this in the code. I tried adding this in the MusicService.kt file but couldn't get it working. Can anyone help out with this.

@pro-softs pro-softs added the Bug label Oct 5, 2024
@lovegaoshi
Copy link
Contributor

this should be implemented by YOU. organize AudioManager.setAllowedCapturePolicy calls in your own module/activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants