@daily-co/react-native-daily-js 0.27.0 → 0.29.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daily-co/react-native-daily-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "React Native library for making video calls using Daily",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"baseUrl": "https://github.com/daily-co/react-native-daily-js"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@daily-co/daily-js": "^0.
|
|
29
|
+
"@daily-co/daily-js": "^0.31.0",
|
|
30
30
|
"@types/react-native-background-timer": "^2.0.0",
|
|
31
31
|
"react-native-url-polyfill": "^1.1.2"
|
|
32
32
|
},
|
|
33
|
-
"
|
|
33
|
+
"///": "WHEN ONE OF THESE CHANGE, PLEASE UPDATE README.md INSTALL SNIPPET ACCORDINGLY",
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@daily-co/react-native-webrtc": "1.94.1-daily.4",
|
|
36
36
|
"@react-native-async-storage/async-storage": "^1.15.7",
|
|
@@ -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'
|
|
@@ -117,6 +118,8 @@ export interface DailyCallOptions {
|
|
|
117
118
|
videoSource?: string | MediaStreamTrack;
|
|
118
119
|
audioSource?: string | MediaStreamTrack;
|
|
119
120
|
receiveSettings?: DailyReceiveSettings;
|
|
121
|
+
userName?: string;
|
|
122
|
+
userData?: unknown;
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
export interface DailyLoadOptions extends DailyCallOptions {
|
|
@@ -170,10 +173,29 @@ export interface DailyTrackState {
|
|
|
170
173
|
byUser?: boolean;
|
|
171
174
|
byRemoteRequest?: boolean;
|
|
172
175
|
byBandwidth?: boolean;
|
|
176
|
+
byCanSendPermission?: boolean;
|
|
173
177
|
};
|
|
174
178
|
track?: MediaStreamTrack;
|
|
175
179
|
}
|
|
176
180
|
|
|
181
|
+
export interface DailyParticipantPermissions {
|
|
182
|
+
hasPresence: boolean;
|
|
183
|
+
canSend:
|
|
184
|
+
| Set<
|
|
185
|
+
| 'video'
|
|
186
|
+
| 'audio'
|
|
187
|
+
| 'screenVideo'
|
|
188
|
+
| 'screenAudio'
|
|
189
|
+
| 'customVideo'
|
|
190
|
+
| 'customAudio'
|
|
191
|
+
>
|
|
192
|
+
| boolean;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type DailyParticipantPermissionsUpdate = {
|
|
196
|
+
[Property in keyof DailyParticipantPermissions]+?: DailyParticipantPermissions[Property];
|
|
197
|
+
};
|
|
198
|
+
|
|
177
199
|
export interface DailyParticipant {
|
|
178
200
|
// tracks
|
|
179
201
|
audioTrack?: MediaStreamTrack;
|
|
@@ -197,11 +219,13 @@ export interface DailyParticipant {
|
|
|
197
219
|
// user/session info
|
|
198
220
|
user_id: string;
|
|
199
221
|
user_name: string;
|
|
222
|
+
userData?: unknown;
|
|
200
223
|
session_id: string;
|
|
201
|
-
joined_at
|
|
224
|
+
joined_at?: Date;
|
|
202
225
|
will_eject_at: Date;
|
|
203
226
|
local: boolean;
|
|
204
227
|
owner: boolean;
|
|
228
|
+
permissions: DailyParticipantPermissions;
|
|
205
229
|
record: boolean;
|
|
206
230
|
|
|
207
231
|
// video element info (iframe-based calls using standard UI only)
|
|
@@ -209,6 +233,11 @@ export interface DailyParticipant {
|
|
|
209
233
|
screen_info: {} | DailyVideoElementInfo;
|
|
210
234
|
}
|
|
211
235
|
|
|
236
|
+
export interface DailyParticipantCounts {
|
|
237
|
+
present: number;
|
|
238
|
+
hidden: number;
|
|
239
|
+
}
|
|
240
|
+
|
|
212
241
|
export interface DailyWaitingParticipant {
|
|
213
242
|
id: string;
|
|
214
243
|
name: string;
|
|
@@ -231,6 +260,7 @@ export interface DailyParticipantUpdateOptions {
|
|
|
231
260
|
setVideo?: boolean;
|
|
232
261
|
setSubscribedTracks?: DailyTrackSubscriptionOptions;
|
|
233
262
|
eject?: true;
|
|
263
|
+
updatePermissions?: DailyParticipantPermissionsUpdate;
|
|
234
264
|
}
|
|
235
265
|
|
|
236
266
|
export interface DailyWaitingParticipantUpdateOptions {
|
|
@@ -284,11 +314,13 @@ export interface DailyRoomInfo {
|
|
|
284
314
|
exp?: number;
|
|
285
315
|
max_participants?: number;
|
|
286
316
|
enable_screenshare?: boolean;
|
|
317
|
+
enable_audience_reactions?: boolean;
|
|
287
318
|
enable_chat?: boolean;
|
|
288
319
|
enable_knocking?: boolean;
|
|
289
320
|
enable_network_ui?: boolean;
|
|
290
321
|
enable_people_ui?: boolean;
|
|
291
322
|
enable_pip_ui?: boolean;
|
|
323
|
+
enable_hand_raising?: boolean;
|
|
292
324
|
enable_prejoin_ui?: boolean;
|
|
293
325
|
enable_video_processing_ui?: boolean;
|
|
294
326
|
start_video_off?: boolean;
|
|
@@ -316,9 +348,11 @@ export interface DailyRoomInfo {
|
|
|
316
348
|
max_api_rooms?: number;
|
|
317
349
|
webhook_meeting_end?: any;
|
|
318
350
|
max_live_streams?: number;
|
|
351
|
+
enable_audience_reactions?: boolean;
|
|
319
352
|
enable_network_ui?: boolean;
|
|
320
353
|
enable_people_ui?: boolean;
|
|
321
354
|
enable_pip_ui?: boolean;
|
|
355
|
+
enable_hand_raising?: boolean;
|
|
322
356
|
enable_prejoin_ui?: boolean;
|
|
323
357
|
enable_video_processing_ui?: boolean;
|
|
324
358
|
};
|
|
@@ -413,13 +447,26 @@ export interface DailyEventObjectParticipants {
|
|
|
413
447
|
}
|
|
414
448
|
|
|
415
449
|
export interface DailyEventObjectParticipant {
|
|
416
|
-
action: Extract<
|
|
417
|
-
DailyEvent,
|
|
418
|
-
'participant-joined' | 'participant-updated' | 'participant-left'
|
|
419
|
-
>;
|
|
450
|
+
action: Extract<DailyEvent, 'participant-joined' | 'participant-updated'>;
|
|
420
451
|
participant: DailyParticipant;
|
|
421
452
|
}
|
|
422
453
|
|
|
454
|
+
// only 1 reason reported for now. more to come.
|
|
455
|
+
export type DailyParticipantLeftReason = 'hidden';
|
|
456
|
+
|
|
457
|
+
export interface DailyEventObjectParticipantLeft {
|
|
458
|
+
action: Extract<DailyEvent, 'participant-left'>;
|
|
459
|
+
participant: DailyParticipant;
|
|
460
|
+
// reason undefined if participant left for any reason other than those listed
|
|
461
|
+
// in DailyParticipantLeftReason
|
|
462
|
+
reason?: DailyParticipantLeftReason;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
export interface DailyEventObjectParticipantCounts {
|
|
466
|
+
action: Extract<DailyEvent, 'participant-counts-updated'>;
|
|
467
|
+
participantCounts: DailyParticipantCounts;
|
|
468
|
+
}
|
|
469
|
+
|
|
423
470
|
export interface DailyEventObjectWaitingParticipant {
|
|
424
471
|
action: Extract<
|
|
425
472
|
DailyEvent,
|
|
@@ -537,6 +584,10 @@ export type DailyEventObject<T extends DailyEvent = any> =
|
|
|
537
584
|
? DailyEventObjectParticipants
|
|
538
585
|
: T extends DailyEventObjectParticipant['action']
|
|
539
586
|
? DailyEventObjectParticipant
|
|
587
|
+
: T extends DailyEventObjectParticipantLeft['action']
|
|
588
|
+
? DailyEventObjectParticipantLeft
|
|
589
|
+
: T extends DailyEventObjectParticipantCounts['action']
|
|
590
|
+
? DailyEventObjectParticipantCounts
|
|
540
591
|
: T extends DailyEventObjectWaitingParticipant['action']
|
|
541
592
|
? DailyEventObjectWaitingParticipant
|
|
542
593
|
: T extends DailyEventObjectAccessState['action']
|
|
@@ -704,6 +755,7 @@ export interface DailyCall {
|
|
|
704
755
|
meetingState(): DailyMeetingState;
|
|
705
756
|
accessState(): DailyAccessState;
|
|
706
757
|
participants(): DailyParticipantsObject;
|
|
758
|
+
participantCounts(): DailyParticipantCounts;
|
|
707
759
|
updateParticipant(
|
|
708
760
|
sessionId: string,
|
|
709
761
|
updates: DailyParticipantUpdateOptions
|
|
@@ -742,7 +794,7 @@ export interface DailyCall {
|
|
|
742
794
|
device: { facingMode: DailyCameraFacingMode } | null;
|
|
743
795
|
}>;
|
|
744
796
|
setAudioDevice(deviceId: string): Promise<{
|
|
745
|
-
deviceId:
|
|
797
|
+
deviceId: string;
|
|
746
798
|
}>;
|
|
747
799
|
getCameraFacingMode(): Promise<DailyCameraFacingMode | null>;
|
|
748
800
|
nativeInCallAudioMode(): DailyNativeInCallAudioMode;
|
|
@@ -779,6 +831,7 @@ export interface DailyCall {
|
|
|
779
831
|
enumerateDevices(): Promise<{ devices: MediaDeviceInfo[] }>;
|
|
780
832
|
sendAppMessage(data: any, to?: string): DailyCall;
|
|
781
833
|
setUserName(name: string): Promise<{ userName: string }>;
|
|
834
|
+
setUserData(data: unknown): Promise<{ userData: unknown }>;
|
|
782
835
|
room(options?: {
|
|
783
836
|
includeRoomConfigDefaults: boolean;
|
|
784
837
|
}): Promise<DailyPendingRoomInfo | DailyRoomInfo | null>;
|