@daily-co/react-native-daily-js 0.53.1 → 0.55.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/LICENSE ADDED
@@ -0,0 +1,25 @@
1
+ BSD 2-Clause License
2
+
3
+ Copyright (c) 2019, daily-co
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daily-co/react-native-daily-js",
3
- "version": "0.53.1",
3
+ "version": "0.55.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",
@@ -10,7 +10,9 @@
10
10
  "android",
11
11
  "ios",
12
12
  "react-native-daily-js.podspec",
13
- "react-native.config.js"
13
+ "react-native.config.js",
14
+ "README.md",
15
+ "LICENSE"
14
16
  ],
15
17
  "scripts": {
16
18
  "build": "tsc",
@@ -19,14 +21,14 @@
19
21
  "tag": "scripts/tag",
20
22
  "prepublishOnly": "npm run tag"
21
23
  },
22
- "license": "ISC",
24
+ "license": "BSD-2-Clause",
23
25
  "repository": {
24
26
  "type": "git",
25
27
  "url": "git+https://github.com/daily-co/react-native-daily-js.git",
26
28
  "baseUrl": "https://github.com/daily-co/react-native-daily-js"
27
29
  },
28
30
  "dependencies": {
29
- "@daily-co/daily-js": "^0.55.1",
31
+ "@daily-co/daily-js": "^0.57.0",
30
32
  "@types/react-native-background-timer": "^2.0.0",
31
33
  "base-64": "^1.0.0",
32
34
  "react-native-url-polyfill": "^1.1.2"
@@ -62,8 +62,10 @@ export type DailyEvent =
62
62
  | 'transcription-stopped'
63
63
  | 'transcription-error'
64
64
  | 'app-message'
65
+ | 'transcription-message'
65
66
  | 'local-screen-share-started'
66
67
  | 'local-screen-share-stopped'
68
+ | 'local-screen-share-canceled'
67
69
  | 'active-speaker-change'
68
70
  | 'network-quality-change'
69
71
  | 'network-connection'
@@ -416,6 +418,7 @@ export interface DailyNetworkStats {
416
418
  timestamp: number;
417
419
  recvBitsPerSecond: number | null;
418
420
  sendBitsPerSecond: number | null;
421
+ availableOutgoingBitrate: number | null;
419
422
  networkRoundTripTime: number | null;
420
423
  videoRecvBitsPerSecond: number | null;
421
424
  videoSendBitsPerSecond: number | null;
@@ -533,11 +536,19 @@ export interface DailyRoomInfo {
533
536
  audio_only?: boolean;
534
537
  enable_recording?: string;
535
538
  enable_dialin?: boolean;
539
+ /**
540
+ * @deprecated This property will be removed.
541
+ * All calls are treated as autojoin.
542
+ */
536
543
  autojoin?: boolean;
537
544
  eject_at_room_exp?: boolean;
538
545
  eject_after_elapsed?: number;
539
546
  lang?: '' | DailyLanguageSetting;
540
547
  sfu_switchover?: number;
548
+ /**
549
+ * @deprecated This property will be removed.
550
+ * All calls use websocket signaling ('ws').
551
+ */
541
552
  signaling_impl?: string;
542
553
  geo?: string;
543
554
  };
@@ -700,8 +711,14 @@ export type DailyFatalError = {
700
711
  export interface DailyFatalConnectionError extends DailyFatalError {
701
712
  type: Extract<DailyFatalErrorType, 'connection-error'>;
702
713
  details: {
703
- on: 'load' | 'join' | 'reconnect' | 'move';
704
- sourceError: Error;
714
+ on:
715
+ | 'load'
716
+ | 'join'
717
+ | 'reconnect'
718
+ | 'move'
719
+ | 'rtc-connection'
720
+ | 'room-lookup';
721
+ sourceError: Record<string, any>;
705
722
  uri?: string;
706
723
  workerGroup?: string;
707
724
  geoGroup?: string;
@@ -858,6 +875,13 @@ export interface DailyEventObjectAppMessage {
858
875
  fromId: string;
859
876
  }
860
877
 
878
+ export interface DailyEventObjectTranscriptionMessage {
879
+ action: Extract<DailyEvent, 'transcription-message'>;
880
+ participantId: string;
881
+ text: string;
882
+ timestamp: Date;
883
+ }
884
+
861
885
  export interface DailyEventObjectReceiveSettingsUpdated {
862
886
  action: Extract<DailyEvent, 'receive-settings-updated'>;
863
887
  receiveSettings: DailyReceiveSettings;
@@ -896,9 +920,11 @@ export interface DailyEventObjectTranscriptionStarted {
896
920
  language: string;
897
921
  model: string;
898
922
  tier?: string;
899
- detect_language?: boolean;
900
923
  profanity_filter?: boolean;
901
924
  redact?: Array<string> | Array<boolean> | boolean;
925
+ endpointing?: number | boolean;
926
+ punctuate?: boolean;
927
+ extra?: Record<string, any>;
902
928
  startedBy: string;
903
929
  }
904
930
 
@@ -927,6 +953,8 @@ export interface DailyEventObjectRemoteMediaPlayerStopped {
927
953
  export type DailyEventObject<T extends DailyEvent = any> =
928
954
  T extends DailyEventObjectAppMessage['action']
929
955
  ? DailyEventObjectAppMessage
956
+ : T extends DailyEventObjectTranscriptionMessage['action']
957
+ ? DailyEventObjectTranscriptionMessage
930
958
  : T extends DailyEventObjectNoPayload['action']
931
959
  ? DailyEventObjectNoPayload
932
960
  : T extends DailyEventObjectCameraError['action']
@@ -1008,10 +1036,10 @@ export interface DailyStreamingParticipantsConfig {
1008
1036
  sort?: DailyStreamingParticipantsSortMethod;
1009
1037
  }
1010
1038
 
1011
- export interface DailyStreamingDefaultLayoutConfig
1012
- extends DailyStreamingParticipantsConfig {
1039
+ export interface DailyStreamingDefaultLayoutConfig {
1013
1040
  preset: 'default';
1014
1041
  max_cam_streams?: number;
1042
+ participants?: DailyStreamingParticipantsConfig;
1015
1043
  }
1016
1044
 
1017
1045
  export interface DailyStreamingSingleParticipantLayoutConfig {
@@ -1019,35 +1047,35 @@ export interface DailyStreamingSingleParticipantLayoutConfig {
1019
1047
  session_id: string;
1020
1048
  }
1021
1049
 
1022
- export interface DailyStreamingActiveParticipantLayoutConfig
1023
- extends DailyStreamingParticipantsConfig {
1050
+ export interface DailyStreamingActiveParticipantLayoutConfig {
1024
1051
  preset: 'active-participant';
1052
+ participants?: DailyStreamingParticipantsConfig;
1025
1053
  }
1026
1054
 
1027
1055
  export interface DailyStreamingAudioOnlyLayoutConfig {
1028
1056
  preset: 'audio-only';
1057
+ participants?: DailyStreamingParticipantsConfig;
1029
1058
  }
1030
1059
 
1031
1060
  export type DailyStreamingPortraitLayoutVariant = 'vertical' | 'inset';
1032
1061
 
1033
- export interface DailyStreamingPortraitLayoutConfig
1034
- extends DailyStreamingParticipantsConfig {
1062
+ export interface DailyStreamingPortraitLayoutConfig {
1035
1063
  preset: 'portrait';
1036
1064
  variant?: DailyStreamingPortraitLayoutVariant;
1037
1065
  max_cam_streams?: number;
1066
+ participants?: DailyStreamingParticipantsConfig;
1038
1067
  }
1039
1068
 
1040
- export interface DailyUpdateStreamingCustomLayoutConfig
1041
- extends DailyStreamingParticipantsConfig {
1069
+ export interface DailyUpdateStreamingCustomLayoutConfig {
1042
1070
  preset: 'custom';
1071
+ participants?: DailyStreamingParticipantsConfig;
1043
1072
  composition_params?: {
1044
1073
  [key: string]: boolean | number | string;
1045
1074
  };
1046
1075
  }
1047
1076
 
1048
1077
  export interface DailyStartStreamingCustomLayoutConfig
1049
- extends DailyUpdateStreamingCustomLayoutConfig,
1050
- DailyStreamingParticipantsConfig {
1078
+ extends DailyUpdateStreamingCustomLayoutConfig {
1051
1079
  composition_id?: string;
1052
1080
  session_assets?: {
1053
1081
  [key: string]: string;
@@ -1175,6 +1203,9 @@ export interface DailyTranscriptionDeepgramOptions {
1175
1203
  tier?: string;
1176
1204
  profanity_filter?: boolean;
1177
1205
  redact?: Array<string> | Array<boolean> | boolean;
1206
+ endpointing?: number | boolean;
1207
+ punctuate?: boolean;
1208
+ extra?: Record<string, any>;
1178
1209
  }
1179
1210
 
1180
1211
  export interface DailyCall {