Optional playback-only iOS build without microphone APIs
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp, ios, objective-c, react-native, swift
- Lĩnh vực
- audio-video-rtc, build-system, mobile
Hướng nghiên cứu
Start by reviewing the attached v0.13.6 patch and the iOS recorder implementations named in the issue: IOSAudioRecorder, NativeAudioRecorder, IOSRecorderCallback, and AudioRecorderHostObject. Trace how the iOS build is configured for CocoaPods, Swift Package Manager, and Expo config plugins, then define and verify the disabled build behavior: playback and synthesis remain available, while recording requests return an unsupported-operation error. The issue reports a working local proof of concept but no comprehensive validation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Feature Request
Problem
Some applications use react-native-audio-api exclusively for audio playback and synthesis, without requiring microphone input or audio recording.
However, the iOS binary still includes recording-related implementations and references to microphone permission APIs, even when the application never uses these features.
This can complicate App Store privacy audits and introduces native functionality that is unnecessary for playback-only applications.
Proposed solution
Introduce an optional build-time configuration to disable audio recording on iOS.
For example:
RNAudioAPI_ENABLE_RECORDING=false
The option would:
- Exclude iOS recorder implementations from compilation.
- Remove references to microphone permission request/check APIs from the playback-only build.
- Preserve audio playback, synthesis, decoding, and the existing audio engine.
- Return a clear unsupported-operation error if recording is requested.
- Keep recording enabled by default for full backward compatibility.
Ideally, the configuration would support CocoaPods, Swift Package Manager, and Expo config plugins.
Existing implementation
I maintain a React Native application that uses this library exclusively for synthesized workout audio cues.
For react-native-audio-api 0.13.6, I implemented a local Yarn patch that:
- Excludes IOSAudioRecorder, NativeAudioRecorder, IOSRecorderCallback, and AudioRecorderHostObject implementations from the iOS CocoaPods build.
- Removes calls to AVAudioApplication / AVAudioSession microphone permission APIs.
- Preserves the JSI recorder factory but makes recording attempts fail explicitly.
- Uses MA_NO_DEVICE_IO=1 for miniaudio while retaining decoding and playback through AVAudioEngine.
The patched version builds and runs on iOS, and audio playback works. This is not yet a comprehensive validation of every audio scenario.
Related implementation patterns
I have implemented optional native build configurations in two other React Native libraries:
react-native-file-hash
https://github.com/Preeternal/react-native-file-hash
Supports build-time engine selection across Android, CocoaPods, SwiftPM, and Expo, compiling and linking only the selected implementation.
react-native-document-scanner-plugin
https://github.com/Preeternal/react-native-document-scanner-plugin
Supports optional Android analysis features through Gradle properties and an Expo config plugin.
Contribution
Would you be interested in supporting an optional playback-only iOS build?
I’ve attached my current Yarn patch against v0.13.6 as a proof of concept. It is application-specific and not intended as a ready-to-merge solution, but it demonstrates the changes needed for a playback-only iOS build. I’m happy to help adapt it into a configurable upstream implementation.
- Ngôn ngữ chính
- C++
- Star
- 856
- Fork
- 100
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 34
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của software-mansion/react-native-audio-api
-
Android: audio focus listener posts to a dead looper after JS reload, interruptions (calls) are missedCó thể đã có người làm @JaydeepAgravat đã nhận 2 ngày trước. Đang mởandroid bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
software-mansion/react-native-audio-api#1358 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
android bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
software-mansion/react-native-audio-api#1273 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug ios
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
software-mansion/react-native-audio-api#1238 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
software-mansion/react-native-audio-api#1418 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
software-mansion/react-native-audio-api#1416 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của software-mansion/react-native-audio-api
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Niko1221/Strata#5560 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
NVIDIA windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[辞書] C/C++のプリプロセッサ指令名を英字のままにするĐang mở要トリアージ 辞書
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
yksr-melt/Meltype#1625 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[yugabyted] xcluster set_up and add_to_replication fail for database names containing - . or (Đang mởkind/bug priority/medium qa_automation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
yugabyte/yugabyte-db#37324 ·
Maintainer thường phản hồi trong vòng 1 ngày