Skip to content

Conversation

@OnestarLee
Copy link
Collaborator

@OnestarLee OnestarLee commented Sep 12, 2025

External Contributions

This project is not yet set up to accept pull requests from external contributors.

If you have a pull request that you believe should be accepted, please contact
the Developer Relations team [email protected] with details
and we'll evaluate if we can setup a CLA to allow for the contribution.

For Internal Contributors

[CLNP-7546](https://sendbird.atlassian.net/browse/CLNP-7546)

Description Of Changes

React Native 0.81 지원을 위해 react-native-nitro-sound 사용 가능하도록 추가하였습니다
인터페이스나, 타입등이 다른것들이 많아서, 패키지별 Adapter 클래스를 별도로 추가하여 모둘에 특화된 처리를 분기하였고, 그외에는 공통으로 사용가능하도록 처리하였습니다.

레코딩중 stop 처리후 바로 send를 할경우 send 내부에서 처리되는 clear -> reset -> stop 로 인해 stopRecorder 가 중복으로 호출될경우 exception 이 발생하는 문제가 있습니다. 기존 react-native-audio-recorder-player 에서는 중복 호출되어도 문제가 없었던것 같은데 react-native-nitro-sound 에서는 exception이 발생하여 관련 처리 추가하였습니다.

ui 상 레코딩중 바로 send 처리가 가능한데, 기존에는 문제가 없었지만 react-native-nitro-sound 에서는 stopRecorder 가 완전히 처리 되지 않은 상황에서는 파일을 제대로 읽지 못하는 문제가 발생하여 관련 처리 추가하였습니다.

Types Of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply_

  • Bugfix
  • New feature
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance (ex) Prettier)
  • Build configuration
  • Improvement (refactor code)
  • Test

@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2025

Codecov Report

❌ Patch coverage is 0% with 255 lines in your changes missing coverage. Please review.
✅ Project coverage is 11.09%. Comparing base (3c50737) to head (7dcf0cc).

Files with missing lines Patch % Lines
...native/src/platform/createPlayerService.native.tsx 0.00% 129 Missing ⚠️
...tive/src/platform/createRecorderService.native.tsx 0.00% 117 Missing ⚠️
...kit-react-native/src/hooks/useVoiceMessageInput.ts 0.00% 6 Missing ⚠️
...native/src/platform/createRecorderService.expo.tsx 0.00% 2 Missing ⚠️
.../src/components/ChannelInput/VoiceMessageInput.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #263      +/-   ##
==========================================
- Coverage   11.22%   11.09%   -0.13%     
==========================================
  Files         360      360              
  Lines        8716     8818     +102     
  Branches     2479     2480       +1     
==========================================
  Hits          978      978              
- Misses       7662     7764     +102     
  Partials       76       76              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@OnestarLee OnestarLee changed the title feat: add react-native-nitro-sound for React Native 0.81 support [CLNP-7546] feat: add react-native-nitro-sound for React Native 0.81 support Sep 12, 2025
@OnestarLee OnestarLee requested review from bang9 and Copilot September 12, 2025 07:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for React Native 0.81 by introducing react-native-nitro-sound as an alternative to react-native-audio-recorder-player for voice message functionality. It implements adapter classes to handle differences between the two audio modules while maintaining backward compatibility.

Key changes include:

  • Added React Native 0.81 support with react-native-nitro-sound integration
  • Implemented adapter pattern for both recorder and player services to handle different module interfaces
  • Fixed concurrency issues with recording operations to prevent duplicate stop calls
  • Updated iOS minimum version requirement to 15.1

Reviewed Changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sample/ios/SendbirdUIKitSample.xcodeproj/project.pbxproj Updated Xcode project configuration and linker flags for new dependencies
sample/ios/Podfile Increased minimum iOS version from 14 to 15.1 for nitro-sound compatibility
packages/uikit-react-native/src/platform/createRecorderService.native.tsx Refactored to use adapter pattern supporting both audio modules with concurrency safety
packages/uikit-react-native/src/platform/createPlayerService.native.tsx Implemented adapter pattern for player service to support both audio modules
packages/uikit-react-native/src/platform/createFileService.native.ts Fixed iOS file path handling for voice message files
packages/uikit-react-native/src/hooks/useVoiceMessageInput.ts Added proper stop handling when sending voice messages during recording
packages/uikit-react-native/src/components/ChannelInput/VoiceMessageInput.tsx Enhanced error logging with additional error details
packages/uikit-react-native/package.json Added nitro-sound dependencies and marked audio modules as optional
packages/uikit-react-native/README.md Updated documentation to reference nitro-sound instead of audio-recorder-player
docs-validation/package.json Updated validation dependencies to include nitro-sound
docs-validation/1_introduction/SendYourFirstMessage.tsx Updated example imports to use nitro-sound
docs-validation/1_introduction/NativeModules.tsx Updated example imports to use nitro-sound

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@bang9
Copy link
Collaborator

bang9 commented Sep 12, 2025

Q. react-native-audio-recorder-player 는 v3 로 유지하는건가요?

@OnestarLee OnestarLee requested a review from bang9 September 15, 2025 00:53
Copy link
Collaborator

@bang9 bang9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! 고생하셨습니다.

@OnestarLee OnestarLee force-pushed the feat/support-nitro-sound branch from 0ddf3c8 to 7dcf0cc Compare September 15, 2025 05:35
@OnestarLee OnestarLee added this pull request to the merge queue Sep 15, 2025
Merged via the queue into main with commit 7fa917b Sep 15, 2025
7 checks passed
@OnestarLee OnestarLee deleted the feat/support-nitro-sound branch September 15, 2025 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants