@daily-co/react-native-daily-js 0.28.0 → 0.30.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.
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Install `react-native-daily-js` along with its peer dependencies:
|
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
17
|
npm i @daily-co/react-native-daily-js @react-native-async-storage/async-storage@^1.15.7 react-native-background-timer@^2.3.1
|
|
18
|
-
npm i --save-exact @daily-co/react-native-webrtc@1.94.1-daily.
|
|
18
|
+
npm i --save-exact @daily-co/react-native-webrtc@1.94.1-daily.5
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Then, follow the below steps to set up your native project on each platform. **Note that these steps assume you're using a version of React Native that supports autolinking (>= 60).**
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daily-co/react-native-daily-js",
|
|
3
|
-
"
|
|
4
|
-
"version": "0.28.0",
|
|
3
|
+
"version": "0.30.0",
|
|
5
4
|
"description": "React Native library for making video calls using Daily",
|
|
6
5
|
"main": "dist/index.js",
|
|
7
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,18 +26,18 @@
|
|
|
27
26
|
"baseUrl": "https://github.com/daily-co/react-native-daily-js"
|
|
28
27
|
},
|
|
29
28
|
"dependencies": {
|
|
30
|
-
"@daily-co/daily-js": "^0.
|
|
29
|
+
"@daily-co/daily-js": "^0.32.0",
|
|
31
30
|
"@types/react-native-background-timer": "^2.0.0",
|
|
32
31
|
"react-native-url-polyfill": "^1.1.2"
|
|
33
32
|
},
|
|
34
33
|
"///": "WHEN ONE OF THESE CHANGE, PLEASE UPDATE README.md INSTALL SNIPPET ACCORDINGLY",
|
|
35
34
|
"peerDependencies": {
|
|
36
|
-
"@daily-co/react-native-webrtc": "1.94.1-daily.
|
|
35
|
+
"@daily-co/react-native-webrtc": "1.94.1-daily.5",
|
|
37
36
|
"@react-native-async-storage/async-storage": "^1.15.7",
|
|
38
37
|
"react-native-background-timer": "^2.3.1"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
|
-
"@daily-co/react-native-webrtc": "1.94.1-daily.
|
|
40
|
+
"@daily-co/react-native-webrtc": "1.94.1-daily.5",
|
|
42
41
|
"@react-native-async-storage/async-storage": "^1.15.7",
|
|
43
42
|
"react-native-background-timer": "^2.3.1",
|
|
44
43
|
"typescript": "^3.8.3"
|
|
@@ -47,6 +47,7 @@ export type DailyEvent =
|
|
|
47
47
|
| 'participant-joined'
|
|
48
48
|
| 'participant-updated'
|
|
49
49
|
| 'participant-left'
|
|
50
|
+
| 'participant-counts-updated'
|
|
50
51
|
| 'track-started'
|
|
51
52
|
| 'track-stopped'
|
|
52
53
|
| 'recording-started'
|
|
@@ -119,6 +120,8 @@ export interface DailyCallOptions {
|
|
|
119
120
|
receiveSettings?: DailyReceiveSettings;
|
|
120
121
|
userName?: string;
|
|
121
122
|
userData?: unknown;
|
|
123
|
+
startVideoOff?: boolean;
|
|
124
|
+
startAudioOff?: boolean;
|
|
122
125
|
}
|
|
123
126
|
|
|
124
127
|
export interface DailyLoadOptions extends DailyCallOptions {
|
|
@@ -172,10 +175,29 @@ export interface DailyTrackState {
|
|
|
172
175
|
byUser?: boolean;
|
|
173
176
|
byRemoteRequest?: boolean;
|
|
174
177
|
byBandwidth?: boolean;
|
|
178
|
+
byCanSendPermission?: boolean;
|
|
175
179
|
};
|
|
176
180
|
track?: MediaStreamTrack;
|
|
177
181
|
}
|
|
178
182
|
|
|
183
|
+
export interface DailyParticipantPermissions {
|
|
184
|
+
hasPresence: boolean;
|
|
185
|
+
canSend:
|
|
186
|
+
| Set<
|
|
187
|
+
| 'video'
|
|
188
|
+
| 'audio'
|
|
189
|
+
| 'screenVideo'
|
|
190
|
+
| 'screenAudio'
|
|
191
|
+
| 'customVideo'
|
|
192
|
+
| 'customAudio'
|
|
193
|
+
>
|
|
194
|
+
| boolean;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export type DailyParticipantPermissionsUpdate = {
|
|
198
|
+
[Property in keyof DailyParticipantPermissions]+?: DailyParticipantPermissions[Property];
|
|
199
|
+
};
|
|
200
|
+
|
|
179
201
|
export interface DailyParticipant {
|
|
180
202
|
// tracks
|
|
181
203
|
audioTrack?: MediaStreamTrack;
|
|
@@ -205,6 +227,7 @@ export interface DailyParticipant {
|
|
|
205
227
|
will_eject_at: Date;
|
|
206
228
|
local: boolean;
|
|
207
229
|
owner: boolean;
|
|
230
|
+
permissions: DailyParticipantPermissions;
|
|
208
231
|
record: boolean;
|
|
209
232
|
|
|
210
233
|
// video element info (iframe-based calls using standard UI only)
|
|
@@ -212,6 +235,11 @@ export interface DailyParticipant {
|
|
|
212
235
|
screen_info: {} | DailyVideoElementInfo;
|
|
213
236
|
}
|
|
214
237
|
|
|
238
|
+
export interface DailyParticipantCounts {
|
|
239
|
+
present: number;
|
|
240
|
+
hidden: number;
|
|
241
|
+
}
|
|
242
|
+
|
|
215
243
|
export interface DailyWaitingParticipant {
|
|
216
244
|
id: string;
|
|
217
245
|
name: string;
|
|
@@ -234,6 +262,7 @@ export interface DailyParticipantUpdateOptions {
|
|
|
234
262
|
setVideo?: boolean;
|
|
235
263
|
setSubscribedTracks?: DailyTrackSubscriptionOptions;
|
|
236
264
|
eject?: true;
|
|
265
|
+
updatePermissions?: DailyParticipantPermissionsUpdate;
|
|
237
266
|
}
|
|
238
267
|
|
|
239
268
|
export interface DailyWaitingParticipantUpdateOptions {
|
|
@@ -287,7 +316,8 @@ export interface DailyRoomInfo {
|
|
|
287
316
|
exp?: number;
|
|
288
317
|
max_participants?: number;
|
|
289
318
|
enable_screenshare?: boolean;
|
|
290
|
-
|
|
319
|
+
enable_breakout_rooms?: boolean;
|
|
320
|
+
enable_emoji_reactions?: boolean;
|
|
291
321
|
enable_chat?: boolean;
|
|
292
322
|
enable_knocking?: boolean;
|
|
293
323
|
enable_network_ui?: boolean;
|
|
@@ -321,7 +351,9 @@ export interface DailyRoomInfo {
|
|
|
321
351
|
max_api_rooms?: number;
|
|
322
352
|
webhook_meeting_end?: any;
|
|
323
353
|
max_live_streams?: number;
|
|
324
|
-
|
|
354
|
+
max_streaming_instances_per_room?: number;
|
|
355
|
+
enable_breakout_rooms?: boolean;
|
|
356
|
+
enable_emoji_reactions?: boolean;
|
|
325
357
|
enable_network_ui?: boolean;
|
|
326
358
|
enable_people_ui?: boolean;
|
|
327
359
|
enable_pip_ui?: boolean;
|
|
@@ -420,13 +452,26 @@ export interface DailyEventObjectParticipants {
|
|
|
420
452
|
}
|
|
421
453
|
|
|
422
454
|
export interface DailyEventObjectParticipant {
|
|
423
|
-
action: Extract<
|
|
424
|
-
DailyEvent,
|
|
425
|
-
'participant-joined' | 'participant-updated' | 'participant-left'
|
|
426
|
-
>;
|
|
455
|
+
action: Extract<DailyEvent, 'participant-joined' | 'participant-updated'>;
|
|
427
456
|
participant: DailyParticipant;
|
|
428
457
|
}
|
|
429
458
|
|
|
459
|
+
// only 1 reason reported for now. more to come.
|
|
460
|
+
export type DailyParticipantLeftReason = 'hidden';
|
|
461
|
+
|
|
462
|
+
export interface DailyEventObjectParticipantLeft {
|
|
463
|
+
action: Extract<DailyEvent, 'participant-left'>;
|
|
464
|
+
participant: DailyParticipant;
|
|
465
|
+
// reason undefined if participant left for any reason other than those listed
|
|
466
|
+
// in DailyParticipantLeftReason
|
|
467
|
+
reason?: DailyParticipantLeftReason;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export interface DailyEventObjectParticipantCounts {
|
|
471
|
+
action: Extract<DailyEvent, 'participant-counts-updated'>;
|
|
472
|
+
participantCounts: DailyParticipantCounts;
|
|
473
|
+
}
|
|
474
|
+
|
|
430
475
|
export interface DailyEventObjectWaitingParticipant {
|
|
431
476
|
action: Extract<
|
|
432
477
|
DailyEvent,
|
|
@@ -544,6 +589,10 @@ export type DailyEventObject<T extends DailyEvent = any> =
|
|
|
544
589
|
? DailyEventObjectParticipants
|
|
545
590
|
: T extends DailyEventObjectParticipant['action']
|
|
546
591
|
? DailyEventObjectParticipant
|
|
592
|
+
: T extends DailyEventObjectParticipantLeft['action']
|
|
593
|
+
? DailyEventObjectParticipantLeft
|
|
594
|
+
: T extends DailyEventObjectParticipantCounts['action']
|
|
595
|
+
? DailyEventObjectParticipantCounts
|
|
547
596
|
: T extends DailyEventObjectWaitingParticipant['action']
|
|
548
597
|
? DailyEventObjectWaitingParticipant
|
|
549
598
|
: T extends DailyEventObjectAccessState['action']
|
|
@@ -711,6 +760,7 @@ export interface DailyCall {
|
|
|
711
760
|
meetingState(): DailyMeetingState;
|
|
712
761
|
accessState(): DailyAccessState;
|
|
713
762
|
participants(): DailyParticipantsObject;
|
|
763
|
+
participantCounts(): DailyParticipantCounts;
|
|
714
764
|
updateParticipant(
|
|
715
765
|
sessionId: string,
|
|
716
766
|
updates: DailyParticipantUpdateOptions
|