@daily-co/react-native-daily-js 0.72.1 → 0.74.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.72.1",
3
+ "version": "0.74.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.75.2",
31
+ "@daily-co/daily-js": "^0.77.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
 
@@ -624,6 +673,7 @@ export interface DailyRoomInfo {
624
673
  audio_only?: boolean;
625
674
  enable_recording?: string;
626
675
  enable_dialin?: boolean;
676
+ enable_dialout?: boolean;
627
677
  /**
628
678
  * @deprecated This property will be removed.
629
679
  * All calls are treated as autojoin.
@@ -959,10 +1009,9 @@ export interface DailyEventObjectRecordingError extends DailyEventObjectBase {
959
1009
  }
960
1010
 
961
1011
  export interface DailyEventObjectNetworkQualityEvent
962
- extends DailyEventObjectBase {
1012
+ extends DailyEventObjectBase,
1013
+ DailyNetworkStats {
963
1014
  action: Extract<DailyEvent, 'network-quality-change'>;
964
- threshold: string;
965
- quality: number;
966
1015
  }
967
1016
 
968
1017
  export interface DailyEventObjectCpuLoadEvent extends DailyEventObjectBase {
@@ -1514,6 +1563,7 @@ export type DailyStartDialoutOptions =
1514
1563
  export interface DailySipCallTransferOptions {
1515
1564
  sessionId: string;
1516
1565
  toEndPoint: string;
1566
+ callerId?: string;
1517
1567
  }
1518
1568
 
1519
1569
  export interface DailySipReferOptions {