@daily-co/react-native-daily-js 0.13.0 → 0.17.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
|
@@ -7,14 +7,15 @@ The Daily JavaScript library for React Native.
|
|
|
7
7
|
This package introduces some constraints on what OS/SDK versions your project can support:
|
|
8
8
|
|
|
9
9
|
- **iOS**: Deployment target >= 11.0
|
|
10
|
-
- **Android**: `minSdkVersion` >=
|
|
10
|
+
- **Android**: `minSdkVersion` >= 24
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
Install `react-native-daily-js` along with its peer dependencies:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm i @daily-co/react-native-daily-js @
|
|
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
|
|
18
|
+
npm i --save-exact @daily-co/react-native-webrtc@1.89.2-daily.3
|
|
18
19
|
```
|
|
19
20
|
|
|
20
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).**
|
|
@@ -66,9 +67,9 @@ If you view the raw file contents of `Info.plist`, it should look like this:
|
|
|
66
67
|
<dict>
|
|
67
68
|
...
|
|
68
69
|
<key>NSCameraUsageDescription</key>
|
|
69
|
-
<string>
|
|
70
|
+
<string>Daily Playground needs camera access to work</string>
|
|
70
71
|
<key>NSMicrophoneUsageDescription</key>
|
|
71
|
-
<string>
|
|
72
|
+
<string>Daily Playground needs microphone access to work</string>
|
|
72
73
|
<key>UIBackgroundModes</key>
|
|
73
74
|
<array>
|
|
74
75
|
<string>voip</string>
|
|
@@ -102,7 +103,7 @@ Add the following to `AndroidManifest.xml`:
|
|
|
102
103
|
Update your `minSdkVersion` in your top-level `build.gradle` file:
|
|
103
104
|
|
|
104
105
|
```groovy
|
|
105
|
-
minSdkVersion =
|
|
106
|
+
minSdkVersion = 24
|
|
106
107
|
```
|
|
107
108
|
|
|
108
109
|
(If you run into any issues, refer to [Github issues](https://github.com/react-native-webrtc/react-native-webrtc/issues/720) like [these](https://github.com/jitsi/jitsi-meet/issues/4778), or the `react-native-webrtc` [installation docs](https://github.com/react-native-webrtc/react-native-webrtc/blob/master/Documentation/AndroidInstallation.md), which walk you through a more complicated process. The simpler process laid out above seems to work in a vanilla modern React Native CLI-based setup).
|
|
@@ -39,7 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
40
|
};
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
var async_storage_1 = __importDefault(require("@react-native-
|
|
42
|
+
var async_storage_1 = __importDefault(require("@react-native-async-storage/async-storage"));
|
|
43
43
|
var FIELD_CACHE_EXPIRY = 'expiry';
|
|
44
44
|
var FIELD_BUNDLE_CODE = 'code';
|
|
45
45
|
var FIELD_BUNDLE_LAST_MODIFIED = 'last-modified';
|
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.17.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,18 +26,19 @@
|
|
|
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.20.0",
|
|
30
30
|
"@types/react-native-background-timer": "^2.0.0",
|
|
31
31
|
"react-native-url-polyfill": "^1.1.2"
|
|
32
32
|
},
|
|
33
|
+
"//": "WHEN ONE OF THESE CHANGE, PLEASE UPDATE README.md INSTALL SNIPPET ACCORDINGLY",
|
|
33
34
|
"peerDependencies": {
|
|
34
35
|
"@daily-co/react-native-webrtc": "1.89.2-daily.3",
|
|
35
|
-
"@react-native-
|
|
36
|
+
"@react-native-async-storage/async-storage": "^1.15.7",
|
|
36
37
|
"react-native-background-timer": "^2.3.1"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@daily-co/react-native-webrtc": "1.89.2-daily.3",
|
|
40
|
-
"@react-native-
|
|
41
|
+
"@react-native-async-storage/async-storage": "^1.15.7",
|
|
41
42
|
"react-native-background-timer": "^2.3.1",
|
|
42
43
|
"typescript": "^3.8.3"
|
|
43
44
|
}
|
|
@@ -21,6 +21,7 @@ export type DailyLanguage =
|
|
|
21
21
|
| 'no'
|
|
22
22
|
| 'pt'
|
|
23
23
|
| 'pl'
|
|
24
|
+
| 'ru'
|
|
24
25
|
| 'sv'
|
|
25
26
|
| 'es'
|
|
26
27
|
| 'tr'
|
|
@@ -55,7 +56,8 @@ export type DailyEvent =
|
|
|
55
56
|
| 'access-state-updated'
|
|
56
57
|
| 'waiting-participant-added'
|
|
57
58
|
| 'waiting-participant-updated'
|
|
58
|
-
| 'waiting-participant-removed'
|
|
59
|
+
| 'waiting-participant-removed'
|
|
60
|
+
| 'receive-settings-updated';
|
|
59
61
|
|
|
60
62
|
export type DailyMeetingState =
|
|
61
63
|
| 'new'
|
|
@@ -85,6 +87,7 @@ export interface DailyBrowserInfo {
|
|
|
85
87
|
version: string;
|
|
86
88
|
supportsScreenShare: boolean;
|
|
87
89
|
supportsSfu: boolean;
|
|
90
|
+
supportsVideoProcessing: boolean;
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
export interface DailyCallOptions {
|
|
@@ -95,6 +98,7 @@ export interface DailyCallOptions {
|
|
|
95
98
|
reactNativeConfig?: DailyReactNativeConfig;
|
|
96
99
|
videoSource?: string | MediaStreamTrack;
|
|
97
100
|
audioSource?: string | MediaStreamTrack;
|
|
101
|
+
receiveSettings?: DailyReceiveSettings;
|
|
98
102
|
}
|
|
99
103
|
|
|
100
104
|
export interface DailyLoadOptions extends DailyCallOptions {
|
|
@@ -121,7 +125,7 @@ export interface DailyReactNativeConfig {
|
|
|
121
125
|
}
|
|
122
126
|
|
|
123
127
|
export interface DailyTrackState {
|
|
124
|
-
subscribed:
|
|
128
|
+
subscribed: DailyTrackSubscriptionState;
|
|
125
129
|
state:
|
|
126
130
|
| 'blocked'
|
|
127
131
|
| 'off'
|
|
@@ -182,13 +186,15 @@ export interface DailyWaitingParticipant {
|
|
|
182
186
|
awaitingAccess: SpecifiedDailyAccess;
|
|
183
187
|
}
|
|
184
188
|
|
|
189
|
+
export type DailyTrackSubscriptionState = 'staged' | boolean;
|
|
190
|
+
|
|
185
191
|
export type DailyTrackSubscriptionOptions =
|
|
186
|
-
|
|
|
192
|
+
| DailyTrackSubscriptionState
|
|
187
193
|
| {
|
|
188
|
-
audio?:
|
|
189
|
-
video?:
|
|
190
|
-
screenVideo?:
|
|
191
|
-
screenAudio?:
|
|
194
|
+
audio?: DailyTrackSubscriptionState;
|
|
195
|
+
video?: DailyTrackSubscriptionState;
|
|
196
|
+
screenVideo?: DailyTrackSubscriptionState;
|
|
197
|
+
screenAudio?: DailyTrackSubscriptionState;
|
|
192
198
|
};
|
|
193
199
|
|
|
194
200
|
export interface DailyParticipantUpdateOptions {
|
|
@@ -245,6 +251,7 @@ export interface DailyRoomInfo {
|
|
|
245
251
|
enable_knocking?: boolean;
|
|
246
252
|
enable_network_ui?: boolean;
|
|
247
253
|
enable_prejoin_ui?: boolean;
|
|
254
|
+
enable_video_processing_ui?: boolean;
|
|
248
255
|
start_video_off?: boolean;
|
|
249
256
|
start_audio_off?: boolean;
|
|
250
257
|
owner_only_broadcast?: boolean;
|
|
@@ -272,6 +279,7 @@ export interface DailyRoomInfo {
|
|
|
272
279
|
max_live_streams?: number;
|
|
273
280
|
enable_network_ui?: boolean;
|
|
274
281
|
enable_prejoin_ui?: boolean;
|
|
282
|
+
enable_video_processing_ui?: boolean;
|
|
275
283
|
};
|
|
276
284
|
tokenConfig: {
|
|
277
285
|
eject_at_token_exp?: boolean;
|
|
@@ -293,6 +301,33 @@ export interface DailyRoomInfo {
|
|
|
293
301
|
dialInPIN?: string;
|
|
294
302
|
}
|
|
295
303
|
|
|
304
|
+
export interface DailyVideoReceiveSettings {
|
|
305
|
+
layer?: number;
|
|
306
|
+
}
|
|
307
|
+
export interface DailySingleParticipantReceiveSettings {
|
|
308
|
+
video?: DailyVideoReceiveSettings;
|
|
309
|
+
screenVideo?: DailyVideoReceiveSettings;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export interface DailyReceiveSettings {
|
|
313
|
+
[participantIdOrBase: string]: DailySingleParticipantReceiveSettings;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export interface DailyVideoReceiveSettingsUpdates {
|
|
317
|
+
layer?: number | 'inherit';
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export interface DailySingleParticipantReceiveSettingsUpdates {
|
|
321
|
+
video?: DailyVideoReceiveSettingsUpdates | 'inherit';
|
|
322
|
+
screenVideo?: DailyVideoReceiveSettingsUpdates | 'inherit';
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export interface DailyReceiveSettingsUpdates {
|
|
326
|
+
[participantIdOrBaseOrStar: string]:
|
|
327
|
+
| DailySingleParticipantReceiveSettingsUpdates
|
|
328
|
+
| 'inherit';
|
|
329
|
+
}
|
|
330
|
+
|
|
296
331
|
export interface DailyEventObjectNoPayload {
|
|
297
332
|
action: Extract<
|
|
298
333
|
DailyEvent,
|
|
@@ -384,6 +419,11 @@ export interface DailyEventObjectAppMessage {
|
|
|
384
419
|
fromId: string;
|
|
385
420
|
}
|
|
386
421
|
|
|
422
|
+
export interface DailyEventObjectReceiveSettingsUpdated {
|
|
423
|
+
action: Extract<DailyEvent, 'receive-settings-updated'>;
|
|
424
|
+
receiveSettings: DailyReceiveSettings;
|
|
425
|
+
}
|
|
426
|
+
|
|
387
427
|
export type DailyEventObject<
|
|
388
428
|
T extends DailyEvent = any
|
|
389
429
|
> = T extends DailyEventObjectAppMessage['action']
|
|
@@ -410,6 +450,8 @@ export type DailyEventObject<
|
|
|
410
450
|
? DailyEventObjectNetworkConnectionEvent
|
|
411
451
|
: T extends DailyEventObjectActiveSpeakerChange['action']
|
|
412
452
|
? DailyEventObjectActiveSpeakerChange
|
|
453
|
+
: T extends DailyEventObjectReceiveSettingsUpdated['action']
|
|
454
|
+
? DailyEventObjectReceiveSettingsUpdated
|
|
413
455
|
: any;
|
|
414
456
|
|
|
415
457
|
export type DailyNativeInCallAudioMode = 'video' | 'voice';
|
|
@@ -438,10 +480,19 @@ export interface DailyStreamingActiveParticipantLayoutConfig {
|
|
|
438
480
|
preset: 'active-participant';
|
|
439
481
|
}
|
|
440
482
|
|
|
483
|
+
export type DailyStreamingPortraitLayoutVariant = 'vertical' | 'inset';
|
|
484
|
+
|
|
485
|
+
export interface DailyStreamingPortraitLayoutConfig {
|
|
486
|
+
preset: 'portrait';
|
|
487
|
+
variant?: DailyStreamingPortraitLayoutVariant;
|
|
488
|
+
max_cam_streams?: number;
|
|
489
|
+
}
|
|
490
|
+
|
|
441
491
|
export type DailyStreamingLayoutConfig =
|
|
442
492
|
| DailyStreamingDefaultLayoutConfig
|
|
443
493
|
| DailyStreamingSingleParticipantLayoutConfig
|
|
444
|
-
| DailyStreamingActiveParticipantLayoutConfig
|
|
494
|
+
| DailyStreamingActiveParticipantLayoutConfig
|
|
495
|
+
| DailyStreamingPortraitLayoutConfig;
|
|
445
496
|
|
|
446
497
|
export type DailyAccess = 'unknown' | SpecifiedDailyAccess;
|
|
447
498
|
|
|
@@ -486,6 +537,14 @@ export interface DailyCall {
|
|
|
486
537
|
localVideo(): boolean;
|
|
487
538
|
setLocalAudio(enabled: boolean): DailyCall;
|
|
488
539
|
setLocalVideo(enabled: boolean): DailyCall;
|
|
540
|
+
getReceiveSettings(
|
|
541
|
+
id: string,
|
|
542
|
+
options?: { showInheritedValues: boolean }
|
|
543
|
+
): Promise<DailySingleParticipantReceiveSettings>;
|
|
544
|
+
getReceiveSettings(): Promise<DailyReceiveSettings>;
|
|
545
|
+
updateReceiveSettings(
|
|
546
|
+
receiveSettings: DailyReceiveSettingsUpdates
|
|
547
|
+
): Promise<DailyReceiveSettings>;
|
|
489
548
|
startCamera(properties?: DailyCallOptions): Promise<void>;
|
|
490
549
|
cycleCamera(): Promise<{
|
|
491
550
|
device: { facingMode: DailyCameraFacingMode } | null;
|