edoctor-sendbird-calls 1.2.0-beta.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +19 -54
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,51 +1,28 @@
1
1
  # edoctor-sendbird-calls
2
2
 
3
- React Native module for Sendbird Calls SDK.
4
-
5
- ## Installation
3
+ React Native bridge cho Sendbird Calls (voice/video), kèm iOS framework và tiện ích sự kiện/video view.
6
4
 
5
+ ## Cài đặt nhanh
7
6
  ```sh
8
7
  yarn add edoctor-sendbird-calls
9
8
  ```
10
9
 
11
- ## iOS Setup
12
-
13
- **Requirements:** iOS 14.0+, Xcode 15.0+, CocoaPods 1.10.0+
14
-
15
- ### 1. Install Pod
16
- ```sh
17
- cd ios && pod install
18
- ```
19
-
20
- ### 2. SendBirdCalls & WebRTC frameworks
21
- The pod now vendors `SendBirdCalls.xcframework` and `WebRTC.xcframework` directly, so no extra Swift Package dependency is required.
22
- If you previously added the `sendbird-calls-ios` package in Xcode, remove it from **Package Dependencies** to avoid missing product or duplicate symbol errors.
23
-
24
- ### 3. Configure Permissions
25
-
26
- **Info.plist:**
27
- ```xml
28
- <key>NSMicrophoneUsageDescription</key>
29
- <string>$(PRODUCT_NAME) needs microphone access for voice calls</string>
30
- <key>NSCameraUsageDescription</key>
31
- <string>$(PRODUCT_NAME) needs camera access for video calls</string>
32
- ```
33
-
34
- **Background Modes:**
35
- Xcode → **Signing & Capabilities** → **+ Capability** → **Background Modes**
36
- Enable:
37
- - Audio, AirPlay, and Picture in Picture
38
- - Voice over IP
10
+ ### iOS
11
+ - Yêu cầu: iOS 14+, Xcode 15+, CocoaPods ≥ 1.10.
12
+ - Autolinking: không cần khai báo Podfile. Chỉ chạy:
13
+ ```sh
14
+ cd ios && pod install
15
+ ```
16
+ - Podspec vendored `SendBirdCalls.xcframework` và phụ thuộc `WebRTC-SDK`. Không cần thêm WebRTC thủ công/SPM. Nếu app đã có WebRTC khác, giữ lại một nguồn WebRTC duy nhất để tránh xung đột.
17
+ - Quyền: thêm `NSMicrophoneUsageDescription`, `NSCameraUsageDescription`; bật Background Modes: Audio + VoIP.
39
18
 
40
- ## Android Setup
41
-
42
- Ensure `minSdkVersion >= 24` in `android/build.gradle`.
19
+ ### Android
20
+ - Yêu cầu `minSdkVersion >= 24` trong `android/build.gradle`.
43
21
 
44
22
  ## Usage
45
23
 
46
24
  ### Initialize & Authenticate
47
-
48
- ```javascript
25
+ ```ts
49
26
  import { SendBirdCalls } from 'edoctor-sendbird-calls';
50
27
 
51
28
  await SendBirdCalls.initSendBird('YOUR_APP_ID');
@@ -53,8 +30,7 @@ const result = await SendBirdCalls.authenticate(userId, accessToken);
53
30
  ```
54
31
 
55
32
  ### Make a Call
56
-
57
- ```javascript
33
+ ```ts
58
34
  const dialResult = await SendBirdCalls.dial(
59
35
  targetUserId,
60
36
  isVideoCall, // boolean
@@ -64,19 +40,18 @@ const dialResult = await SendBirdCalls.dial(
64
40
  ```
65
41
 
66
42
  ### Handle Events
67
-
68
- ```javascript
43
+ ```ts
69
44
  import { SendBirdCallsEvents } from 'edoctor-sendbird-calls';
70
45
 
71
46
  const ringingListener = SendBirdCallsEvents.listenerRinging((data) => {
72
47
  console.log('Incoming call:', data.callId);
73
48
  });
74
49
 
75
- const connectedListener = SendBirdCallsEvents.listenerConnected((data) => {
50
+ const connectedListener = SendBirdCallsEvents.listenerConnected(() => {
76
51
  console.log('Call connected');
77
52
  });
78
53
 
79
- const endedListener = SendBirdCallsEvents.listenerEnded((data) => {
54
+ const endedListener = SendBirdCallsEvents.listenerEnded(() => {
80
55
  console.log('Call ended');
81
56
  });
82
57
 
@@ -85,25 +60,15 @@ ringingListener.remove();
85
60
  ```
86
61
 
87
62
  ### Video Component
88
-
89
- ```javascript
63
+ ```tsx
90
64
  import { SendBirdCallsVideo } from 'edoctor-sendbird-calls';
91
65
 
92
66
  <SendBirdCallsVideo
93
67
  callId={callId}
94
68
  local={false} // false: remote, true: local preview
95
69
  style={{ flex: 1 }}
96
- />
70
+ />;
97
71
  ```
98
72
 
99
- ## Contributing
100
-
101
- See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
102
-
103
73
  ## License
104
-
105
74
  MIT
106
-
107
- ---
108
-
109
- Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edoctor-sendbird-calls",
3
- "version": "1.2.0-beta.1",
3
+ "version": "1.2.0",
4
4
  "description": "edoctor-sendbird-calls",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/module/index.js",