@daily-co/react-native-daily-js 0.67.0 → 0.69.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.67.0",
3
+ "version": "0.69.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.69.0",
31
+ "@daily-co/daily-js": "^0.71.2",
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"
@@ -69,6 +69,7 @@ export type DailyEvent =
69
69
  | 'active-speaker-change'
70
70
  | 'network-quality-change'
71
71
  | 'network-connection'
72
+ | 'test-completed'
72
73
  | 'cpu-load-change'
73
74
  | 'error'
74
75
  | 'nonfatal-error'
@@ -337,6 +338,7 @@ export interface DailyParticipant {
337
338
  userData?: unknown;
338
339
  session_id: string;
339
340
  joined_at?: Date;
341
+ networkThreshold?: 'good' | 'low' | 'very-low';
340
342
  will_eject_at: Date;
341
343
  local: boolean;
342
344
  owner: boolean;
@@ -422,6 +424,56 @@ export interface DailyStartScreenShare {
422
424
  | DailyScreenVideoSendSettingsPreset;
423
425
  }
424
426
 
427
+ export type DailyQualityTestResult =
428
+ | 'good'
429
+ | 'bad'
430
+ | 'warning'
431
+ | 'aborted'
432
+ | 'failed';
433
+
434
+ export type DailyP2PCallQualityTestResults =
435
+ | DailyP2PCallQualityTestStats
436
+ | DailyCallQualityTestAborted
437
+ | DailyCallQualityTestFailure;
438
+
439
+ export interface DailyP2PCallQualityTestStats {
440
+ result: Extract<DailyQualityTestResult, 'good' | 'warning' | 'bad'>;
441
+ data: DailyP2PCallQualityTestData;
442
+ secondsElapsed: number;
443
+ }
444
+
445
+ export interface DailyP2PCallQualityTestData {
446
+ maxRoundTripTime: number | null;
447
+ avgRoundTripTime: number | null;
448
+ avgRecvPacketLoss: number | null;
449
+ avgAvailableOutgoingBitrate: number | null;
450
+ avgSendBitsPerSecond: number | null;
451
+ avgRecvBitsPerSecond: number | null;
452
+ }
453
+
454
+ export interface DailyCallQualityTestAborted {
455
+ result: Extract<DailyQualityTestResult, 'aborted'>;
456
+ secondsElapsed: number;
457
+ }
458
+
459
+ export interface DailyCallQualityTestFailure {
460
+ result: Extract<DailyQualityTestResult, 'failed'>;
461
+ errorMsg: string;
462
+ error?: DailyFatalErrorObject<DailyFatalErrorType>;
463
+ secondsElapsed: number;
464
+ }
465
+
466
+ export interface DailyWebsocketConnectivityTestResults {
467
+ result: 'passed' | 'failed' | 'warning' | 'aborted';
468
+ abortedRegions: string[];
469
+ failedRegions: string[];
470
+ passedRegions: string[];
471
+ }
472
+
473
+ export interface DailyNetworkConnectivityTestStats {
474
+ result: 'passed' | 'failed' | 'aborted';
475
+ }
476
+
425
477
  export interface DailyNetworkStats {
426
478
  quality: number;
427
479
  stats: {
@@ -538,6 +590,7 @@ export interface DailyRoomInfo {
538
590
  enable_breakout_rooms?: boolean;
539
591
  enable_emoji_reactions?: boolean;
540
592
  enable_chat?: boolean;
593
+ enable_shared_chat_history?: boolean;
541
594
  enable_knocking?: boolean;
542
595
  enable_network_ui?: boolean;
543
596
  enable_noise_cancellation_ui?: boolean;
@@ -892,6 +945,15 @@ export interface DailyEventObjectNetworkConnectionEvent
892
945
  sfu_id?: string;
893
946
  }
894
947
 
948
+ export interface DailyEventObjectTestCompleted extends DailyEventObjectBase {
949
+ action: Extract<DailyEvent, 'test-completed'>;
950
+ test: 'p2p-call-quality' | 'network-connectivity' | 'websocket-connectivity';
951
+ results:
952
+ | DailyP2PCallQualityTestResults
953
+ | DailyNetworkConnectivityTestStats
954
+ | DailyWebsocketConnectivityTestResults;
955
+ }
956
+
895
957
  export interface DailyEventObjectActiveSpeakerChange
896
958
  extends DailyEventObjectBase {
897
959
  action: Extract<DailyEvent, 'active-speaker-change'>;
@@ -1034,6 +1096,7 @@ export interface DailyEventObjectDialinWarning extends DailyEventObjectBase {
1034
1096
  export interface DailyEventObjectDialOutConnected extends DailyEventObjectBase {
1035
1097
  action: Extract<DailyEvent, 'dialout-connected'>;
1036
1098
  sessionId?: string;
1099
+ userId?: string;
1037
1100
  actionTraceId?: string;
1038
1101
  }
1039
1102
 
@@ -1041,12 +1104,14 @@ export interface DailyEventObjectDialOutError extends DailyEventObjectBase {
1041
1104
  action: Extract<DailyEvent, 'dialout-error'>;
1042
1105
  errorMsg: string;
1043
1106
  sessionId?: string;
1107
+ userId?: string;
1044
1108
  actionTraceId?: string;
1045
1109
  }
1046
1110
 
1047
1111
  export interface DailyEventObjectDialOutStopped extends DailyEventObjectBase {
1048
1112
  action: Extract<DailyEvent, 'dialout-stopped'>;
1049
1113
  sessionId?: string;
1114
+ userId?: string;
1050
1115
  actionTraceId?: string;
1051
1116
  }
1052
1117
 
@@ -1054,6 +1119,7 @@ export interface DailyEventObjectDialOutWarning extends DailyEventObjectBase {
1054
1119
  action: Extract<DailyEvent, 'dialout-warning'>;
1055
1120
  errorMsg: string;
1056
1121
  sessionId?: string;
1122
+ userId?: string;
1057
1123
  actionTraceId?: string;
1058
1124
  }
1059
1125
 
@@ -1118,6 +1184,8 @@ export type DailyEventObject<T extends DailyEvent = any> =
1118
1184
  ? DailyEventObjectCpuLoadEvent
1119
1185
  : T extends DailyEventObjectNetworkConnectionEvent['action']
1120
1186
  ? DailyEventObjectNetworkConnectionEvent
1187
+ : T extends DailyEventObjectTestCompleted['action']
1188
+ ? DailyEventObjectTestCompleted
1121
1189
  : T extends DailyEventObjectActiveSpeakerChange['action']
1122
1190
  ? DailyEventObjectActiveSpeakerChange
1123
1191
  : T extends DailyEventObjectReceiveSettingsUpdated['action']
@@ -1369,6 +1437,7 @@ export interface DailyDialOutSession {
1369
1437
  export interface DailyStartDialoutSipOptions {
1370
1438
  sipUri?: string;
1371
1439
  displayName?: string;
1440
+ userId?: string;
1372
1441
  video?: boolean;
1373
1442
  codecs?: DailyDialOutCodecs;
1374
1443
  }
@@ -1376,7 +1445,9 @@ export interface DailyStartDialoutSipOptions {
1376
1445
  export interface DailyStartDialoutPhoneOptions {
1377
1446
  phoneNumber?: string;
1378
1447
  displayName?: string;
1448
+ userId?: string;
1379
1449
  codecs?: DailyDialOutCodecs;
1450
+ callerId?: string;
1380
1451
  }
1381
1452
 
1382
1453
  export type DailyStartDialoutOptions =
@@ -1483,6 +1554,17 @@ export interface DailyCall {
1483
1554
  load(properties?: DailyLoadOptions): Promise<void>;
1484
1555
  startScreenShare(properties?: DailyStartScreenShare): void;
1485
1556
  stopScreenShare(): void;
1557
+ testPeerToPeerCallQuality(options: {
1558
+ videoTrack: MediaStreamTrack;
1559
+ duration?: number;
1560
+ }): Promise<DailyP2PCallQualityTestResults>;
1561
+ stopTestPeerToPeerCallQuality(): void;
1562
+ testWebsocketConnectivity(): Promise<DailyWebsocketConnectivityTestResults>;
1563
+ abortTestWebsocketConnectivity(): void;
1564
+ testNetworkConnectivity(
1565
+ videoTrack: MediaStreamTrack
1566
+ ): Promise<DailyNetworkConnectivityTestStats>;
1567
+ abortTestNetworkConnectivity(): void;
1486
1568
  getNetworkStats(): Promise<DailyNetworkStats>;
1487
1569
  getCpuLoadStats(): Promise<DailyCpuLoadStats>;
1488
1570
  updateSendSettings(settings: DailySendSettings): Promise<DailySendSettings>;