@daily-co/react-native-daily-js 0.73.0 → 0.75.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 react-native-get-random-values@^1.9.0
18
- npm i --save-exact @daily-co/react-native-webrtc@118.0.3-daily.1
18
+ npm i --save-exact @daily-co/react-native-webrtc@118.0.3-daily.2
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@daily-co/react-native-daily-js",
3
- "version": "0.73.0",
3
+ "version": "0.75.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",
@@ -28,7 +28,7 @@
28
28
  "baseUrl": "https://github.com/daily-co/react-native-daily-js"
29
29
  },
30
30
  "dependencies": {
31
- "@daily-co/daily-js": "^0.76.0",
31
+ "@daily-co/daily-js": "^0.78.0",
32
32
  "@types/react-native-background-timer": "^2.0.0",
33
33
  "base-64": "^1.0.0",
34
34
  "react-native-url-polyfill": "^1.1.2"
@@ -284,9 +284,38 @@ export type DailyParticipantTypeValues =
284
284
  | 'pstn-dial-out'
285
285
  | 'unknown';
286
286
 
287
+ export interface DailyParticipantCanReceiveMediaPermissionFull {
288
+ video: boolean;
289
+ audio: boolean;
290
+ screenVideo: boolean;
291
+ screenAudio: boolean;
292
+ customVideo: { '*': boolean; [key: string]: boolean };
293
+ customAudio: { '*': boolean; [key: string]: boolean };
294
+ }
295
+
296
+ export interface DailyParticipantCanReceiveMediaPermissionPartial {
297
+ video?: boolean;
298
+ audio?: boolean;
299
+ screenVideo?: boolean;
300
+ screenAudio?: boolean;
301
+ customVideo?: { [key: string]: boolean };
302
+ customAudio?: { [key: string]: boolean };
303
+ }
304
+
305
+ export interface DailyParticipantCanReceivePermission {
306
+ base: DailyParticipantCanReceiveMediaPermissionFull | boolean;
307
+ byUserId?: {
308
+ [key: string]: DailyParticipantCanReceiveMediaPermissionPartial | boolean;
309
+ };
310
+ byParticipantId?: {
311
+ [key: string]: DailyParticipantCanReceiveMediaPermissionPartial | boolean;
312
+ };
313
+ }
314
+
287
315
  export interface DailyParticipantPermissions {
288
316
  hasPresence: boolean;
289
317
  canSend: Set<DailyParticipantPermissionsCanSendValues> | boolean;
318
+ canReceive: DailyParticipantCanReceivePermission;
290
319
  canAdmin: Set<DailyParticipantPermissionsCanAdminValues> | boolean;
291
320
  }
292
321
 
@@ -296,6 +325,7 @@ export type DailyParticipantPermissionsUpdate = {
296
325
  | Array<DailyParticipantPermissionsCanSendValues>
297
326
  | Set<DailyParticipantPermissionsCanSendValues>
298
327
  | boolean;
328
+ canReceive?: Partial<DailyParticipantCanReceivePermission>;
299
329
  canAdmin?:
300
330
  | Array<DailyParticipantPermissionsCanAdminValues>
301
331
  | Set<DailyParticipantPermissionsCanAdminValues>
@@ -350,6 +380,10 @@ export interface DailyParticipant {
350
380
  userData?: unknown;
351
381
  session_id: string;
352
382
  joined_at?: Date;
383
+ networkQualityState?: 'good' | 'warning' | 'bad' | 'unknown';
384
+ /**
385
+ * @deprecated This property is being replaced by networkState.
386
+ */
353
387
  networkThreshold?: 'good' | 'low' | 'very-low';
354
388
  will_eject_at: Date;
355
389
  local: boolean;
@@ -493,40 +527,55 @@ export interface DailyNetworkConnectivityTestStats {
493
527
  result: 'passed' | 'failed' | 'aborted';
494
528
  }
495
529
 
530
+ export type networkStateReasons =
531
+ | 'sendPacketLoss'
532
+ | 'recvPacketLoss'
533
+ | 'roundTripTime'
534
+ | 'availableOutgoingBitrate';
535
+
536
+ export interface DailyNetworkStatsData {
537
+ latest: {
538
+ timestamp: number;
539
+ recvBitsPerSecond: number | null;
540
+ sendBitsPerSecond: number | null;
541
+ availableOutgoingBitrate: number | null;
542
+ networkRoundTripTime: number | null;
543
+ videoRecvBitsPerSecond: number | null;
544
+ videoSendBitsPerSecond: number | null;
545
+ audioRecvBitsPerSecond: number | null;
546
+ audioSendBitsPerSecond: number | null;
547
+ videoRecvPacketLoss: number | null;
548
+ videoSendPacketLoss: number | null;
549
+ audioRecvPacketLoss: number | null;
550
+ audioSendPacketLoss: number | null;
551
+ totalSendPacketLoss: number | null;
552
+ totalRecvPacketLoss: number | null;
553
+ videoRecvJitter: number | null;
554
+ videoSendJitter: number | null;
555
+ audioRecvJitter: number | null;
556
+ audioSendJitter: number | null;
557
+ };
558
+ worstVideoRecvPacketLoss: number;
559
+ worstVideoSendPacketLoss: number;
560
+ worstAudioRecvPacketLoss: number;
561
+ worstAudioSendPacketLoss: number;
562
+ worstVideoRecvJitter: number;
563
+ worstVideoSendJitter: number;
564
+ worstAudioRecvJitter: number;
565
+ worstAudioSendJitter: number;
566
+ averageNetworkRoundTripTime: number | null;
567
+ }
496
568
  export interface DailyNetworkStats {
569
+ networkState: 'good' | 'warning' | 'bad' | 'unknown';
570
+ networkStateReasons: networkStateReasons[];
571
+ stats: Record<string, never> | DailyNetworkStatsData;
572
+ /**
573
+ * @deprecated This property is being replaced by networkState.
574
+ */
497
575
  quality: number;
498
- stats: {
499
- latest: {
500
- timestamp: number;
501
- recvBitsPerSecond: number | null;
502
- sendBitsPerSecond: number | null;
503
- availableOutgoingBitrate: number | null;
504
- networkRoundTripTime: number | null;
505
- videoRecvBitsPerSecond: number | null;
506
- videoSendBitsPerSecond: number | null;
507
- audioRecvBitsPerSecond: number | null;
508
- audioSendBitsPerSecond: number | null;
509
- videoRecvPacketLoss: number | null;
510
- videoSendPacketLoss: number | null;
511
- audioRecvPacketLoss: number | null;
512
- audioSendPacketLoss: number | null;
513
- totalSendPacketLoss: number | null;
514
- totalRecvPacketLoss: number | null;
515
- videoRecvJitter: number | null;
516
- videoSendJitter: number | null;
517
- audioRecvJitter: number | null;
518
- audioSendJitter: number | null;
519
- };
520
- worstVideoRecvPacketLoss: number;
521
- worstVideoSendPacketLoss: number;
522
- worstAudioRecvPacketLoss: number;
523
- worstAudioSendPacketLoss: number;
524
- worstVideoRecvJitter: number;
525
- worstVideoSendJitter: number;
526
- worstAudioRecvJitter: number;
527
- worstAudioSendJitter: number;
528
- averageNetworkRoundTripTime: number | null;
529
- };
576
+ /**
577
+ * @deprecated This property is being replaced by networkState.
578
+ */
530
579
  threshold: 'good' | 'low' | 'very-low';
531
580
  }
532
581
 
@@ -960,10 +1009,9 @@ export interface DailyEventObjectRecordingError extends DailyEventObjectBase {
960
1009
  }
961
1010
 
962
1011
  export interface DailyEventObjectNetworkQualityEvent
963
- extends DailyEventObjectBase {
1012
+ extends DailyEventObjectBase,
1013
+ DailyNetworkStats {
964
1014
  action: Extract<DailyEvent, 'network-quality-change'>;
965
- threshold: string;
966
- quality: number;
967
1015
  }
968
1016
 
969
1017
  export interface DailyEventObjectCpuLoadEvent extends DailyEventObjectBase {
@@ -1515,6 +1563,7 @@ export type DailyStartDialoutOptions =
1515
1563
  export interface DailySipCallTransferOptions {
1516
1564
  sessionId: string;
1517
1565
  toEndPoint: string;
1566
+ callerId?: string;
1518
1567
  }
1519
1568
 
1520
1569
  export interface DailySipReferOptions {