@daily-co/react-native-daily-js 0.22.0 → 0.25.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
|
|
18
|
-
npm i --save-exact @daily-co/react-native-webrtc@1.94.1-daily.
|
|
18
|
+
npm i --save-exact @daily-co/react-native-webrtc@1.94.1-daily.4
|
|
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/android/build.gradle
CHANGED
|
@@ -10,17 +10,16 @@
|
|
|
10
10
|
// original location:
|
|
11
11
|
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
|
|
12
12
|
|
|
13
|
-
def DEFAULT_COMPILE_SDK_VERSION =
|
|
14
|
-
def DEFAULT_BUILD_TOOLS_VERSION = '
|
|
15
|
-
def DEFAULT_MIN_SDK_VERSION =
|
|
16
|
-
def DEFAULT_TARGET_SDK_VERSION =
|
|
13
|
+
def DEFAULT_COMPILE_SDK_VERSION = 31
|
|
14
|
+
def DEFAULT_BUILD_TOOLS_VERSION = '31.0.0'
|
|
15
|
+
def DEFAULT_MIN_SDK_VERSION = 24
|
|
16
|
+
def DEFAULT_TARGET_SDK_VERSION = 31
|
|
17
17
|
|
|
18
18
|
def safeExtGet(prop, fallback) {
|
|
19
19
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
apply plugin: 'com.android.library'
|
|
23
|
-
apply plugin: 'maven'
|
|
24
23
|
|
|
25
24
|
buildscript {
|
|
26
25
|
// The Android Gradle plugin is only required when opening the android folder stand-alone.
|
|
@@ -39,7 +38,6 @@ buildscript {
|
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
apply plugin: 'com.android.library'
|
|
42
|
-
apply plugin: 'maven'
|
|
43
41
|
|
|
44
42
|
android {
|
|
45
43
|
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
|
|
@@ -113,17 +111,18 @@ afterEvaluate { project ->
|
|
|
113
111
|
task androidJavadoc(type: Javadoc) {
|
|
114
112
|
source = android.sourceSets.main.java.srcDirs
|
|
115
113
|
classpath += files(android.bootClasspath)
|
|
116
|
-
|
|
114
|
+
project.getConfigurations().getByName('implementation').setCanBeResolved(true)
|
|
115
|
+
classpath += files(project.getConfigurations().getByName('implementation').asList())
|
|
117
116
|
include '**/*.java'
|
|
118
117
|
}
|
|
119
118
|
|
|
120
119
|
task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
|
|
121
|
-
|
|
120
|
+
archiveClassifier.set("javadoc")
|
|
122
121
|
from androidJavadoc.destinationDir
|
|
123
122
|
}
|
|
124
123
|
|
|
125
124
|
task androidSourcesJar(type: Jar) {
|
|
126
|
-
|
|
125
|
+
archiveClassifier.set("sources")
|
|
127
126
|
from android.sourceSets.main.java.srcDirs
|
|
128
127
|
include '**/*.java'
|
|
129
128
|
}
|
package/android/src/main/java/com/daily/reactlibrary/DailyOngoingMeetingForegroundService.java
CHANGED
|
@@ -72,7 +72,7 @@ public class DailyOngoingMeetingForegroundService extends Service {
|
|
|
72
72
|
getPackageName());
|
|
73
73
|
|
|
74
74
|
Intent notificationIntent = new Intent(this, activityClassToOpenFromNotification);
|
|
75
|
-
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent,
|
|
75
|
+
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_IMMUTABLE);
|
|
76
76
|
|
|
77
77
|
Notification notification = new NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID)
|
|
78
78
|
.setContentTitle(title)
|
package/dist/index.js
CHANGED
|
@@ -92,7 +92,7 @@ function setupGlobals() {
|
|
|
92
92
|
return react_native_background_timer_1.default.setTimeout(fn, ms);
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
global.DailyNativeUtils = __assign(__assign({}, DailyNativeUtils), { setAudioMode: WebRTCModule.setDailyAudioMode, enableNoOpRecordingEnsuringBackgroundContinuity: WebRTCModule.enableNoOpRecordingEnsuringBackgroundContinuity, addAudioFocusChangeListener: function (listener) {
|
|
95
|
+
global.DailyNativeUtils = __assign(__assign({}, DailyNativeUtils), { setAudioMode: WebRTCModule.setDailyAudioMode, setAudioDevice: WebRTCModule.setAudioDevice, getAudioDevice: WebRTCModule.getAudioDevice, enableNoOpRecordingEnsuringBackgroundContinuity: WebRTCModule.enableNoOpRecordingEnsuringBackgroundContinuity, addAudioFocusChangeListener: function (listener) {
|
|
96
96
|
audioFocusChangeListeners.add(listener);
|
|
97
97
|
}, removeAudioFocusChangeListener: function (listener) {
|
|
98
98
|
audioFocusChangeListeners.delete(listener);
|
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.25.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,17 +26,18 @@
|
|
|
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.27.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
|
-
"@daily-co/react-native-webrtc": "1.94.1-daily.
|
|
35
|
+
"@daily-co/react-native-webrtc": "1.94.1-daily.4",
|
|
35
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
|
-
"@daily-co/react-native-webrtc": "1.94.1-daily.
|
|
40
|
+
"@daily-co/react-native-webrtc": "1.94.1-daily.4",
|
|
40
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"
|
|
@@ -53,6 +53,9 @@ export type DailyEvent =
|
|
|
53
53
|
| 'recording-stopped'
|
|
54
54
|
| 'recording-stats'
|
|
55
55
|
| 'recording-error'
|
|
56
|
+
| 'transcription-started'
|
|
57
|
+
| 'transcription-stopped'
|
|
58
|
+
| 'transcription-error'
|
|
56
59
|
| 'app-message'
|
|
57
60
|
| 'active-speaker-change'
|
|
58
61
|
| 'network-quality-change'
|
|
@@ -69,6 +72,7 @@ export type DailyEvent =
|
|
|
69
72
|
| 'waiting-participant-added'
|
|
70
73
|
| 'waiting-participant-updated'
|
|
71
74
|
| 'waiting-participant-removed'
|
|
75
|
+
| 'available-devices-updated'
|
|
72
76
|
| 'receive-settings-updated';
|
|
73
77
|
|
|
74
78
|
export type DailyMeetingState =
|
|
@@ -119,7 +123,14 @@ export interface DailyLoadOptions extends DailyCallOptions {
|
|
|
119
123
|
baseUrl?: string;
|
|
120
124
|
}
|
|
121
125
|
|
|
126
|
+
export interface CamSimulcastEncoding {
|
|
127
|
+
maxBitrate: number;
|
|
128
|
+
maxFramerate?: number;
|
|
129
|
+
scaleResolutionDownBy?: number;
|
|
130
|
+
}
|
|
131
|
+
|
|
122
132
|
export interface DailyAdvancedConfig {
|
|
133
|
+
camSimulcastEncodings?: CamSimulcastEncoding[];
|
|
123
134
|
experimentalGetUserMediaConstraintsModify?: (constraints: any) => void;
|
|
124
135
|
userMediaVideoConstraints?: boolean | MediaTrackConstraints;
|
|
125
136
|
preferH264ForCam?: boolean;
|
|
@@ -233,6 +244,12 @@ export interface DailyVideoElementInfo {
|
|
|
233
244
|
video_height: number;
|
|
234
245
|
}
|
|
235
246
|
|
|
247
|
+
export interface DailyDeviceInfos {
|
|
248
|
+
camera: {} | MediaDeviceInfo;
|
|
249
|
+
mic: {} | MediaDeviceInfo;
|
|
250
|
+
speaker: {} | MediaDeviceInfo;
|
|
251
|
+
}
|
|
252
|
+
|
|
236
253
|
export interface DailyNetworkStats {
|
|
237
254
|
quality: number;
|
|
238
255
|
stats: {
|
|
@@ -244,6 +261,8 @@ export interface DailyNetworkStats {
|
|
|
244
261
|
videoRecvPacketLoss: number;
|
|
245
262
|
videoSendBitsPerSecond: number;
|
|
246
263
|
videoSendPacketLoss: number;
|
|
264
|
+
totalSendPacketLoss: number;
|
|
265
|
+
totalRecvPacketLoss: number;
|
|
247
266
|
};
|
|
248
267
|
worstVideoRecvPacketLoss: number;
|
|
249
268
|
worstVideoSendPacketLoss: number;
|
|
@@ -462,11 +481,28 @@ export interface DailyEventObjectReceiveSettingsUpdated {
|
|
|
462
481
|
receiveSettings: DailyReceiveSettings;
|
|
463
482
|
}
|
|
464
483
|
|
|
484
|
+
export interface DailyEventObjectAvailableDevicesUpdated {
|
|
485
|
+
action: Extract<DailyEvent, 'available-devices-updated'>;
|
|
486
|
+
availableDevices: MediaDeviceInfo[];
|
|
487
|
+
}
|
|
488
|
+
|
|
465
489
|
export interface DailyEventObjectLiveStreamingStarted {
|
|
466
490
|
action: Extract<DailyEvent, 'live-streaming-started'>;
|
|
467
491
|
layout?: DailyStreamingLayoutConfig;
|
|
468
492
|
}
|
|
469
493
|
|
|
494
|
+
export interface DailyEventObjectTranscriptionStarted {
|
|
495
|
+
action: Extract<DailyEvent, 'transcription-started'>;
|
|
496
|
+
language: string;
|
|
497
|
+
model: string;
|
|
498
|
+
startedBy: string;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export interface DailyEventObjectTranscriptionStopped {
|
|
502
|
+
action: Extract<DailyEvent, 'transcription-stopped'>;
|
|
503
|
+
updatedBy: string;
|
|
504
|
+
}
|
|
505
|
+
|
|
470
506
|
export interface DailyEventObjectRemoteMediaPlayerUpdate {
|
|
471
507
|
action: Extract<
|
|
472
508
|
DailyEvent,
|
|
@@ -484,43 +520,44 @@ export interface DailyEventObjectRemoteMediaPlayerStopped {
|
|
|
484
520
|
reason: DailyRemoteMediaPlayerStopReason;
|
|
485
521
|
}
|
|
486
522
|
|
|
487
|
-
export type DailyEventObject<
|
|
488
|
-
T extends
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
523
|
+
export type DailyEventObject<T extends DailyEvent = any> =
|
|
524
|
+
T extends DailyEventObjectAppMessage['action']
|
|
525
|
+
? DailyEventObjectAppMessage
|
|
526
|
+
: T extends DailyEventObjectNoPayload['action']
|
|
527
|
+
? DailyEventObjectNoPayload
|
|
528
|
+
: T extends DailyEventObjectFatalError['action']
|
|
529
|
+
? DailyEventObjectFatalError
|
|
530
|
+
: T extends DailyEventObjectNonFatalError['action']
|
|
531
|
+
? DailyEventObjectNonFatalError
|
|
532
|
+
: T extends DailyEventObjectGenericError['action']
|
|
533
|
+
? DailyEventObjectGenericError
|
|
534
|
+
: T extends DailyEventObjectParticipants['action']
|
|
535
|
+
? DailyEventObjectParticipants
|
|
536
|
+
: T extends DailyEventObjectParticipant['action']
|
|
537
|
+
? DailyEventObjectParticipant
|
|
538
|
+
: T extends DailyEventObjectWaitingParticipant['action']
|
|
539
|
+
? DailyEventObjectWaitingParticipant
|
|
540
|
+
: T extends DailyEventObjectAccessState['action']
|
|
541
|
+
? DailyEventObjectAccessState
|
|
542
|
+
: T extends DailyEventObjectTrack['action']
|
|
543
|
+
? DailyEventObjectTrack
|
|
544
|
+
: T extends DailyEventObjectRecordingStarted['action']
|
|
545
|
+
? DailyEventObjectRecordingStarted
|
|
546
|
+
: T extends DailyEventObjectRemoteMediaPlayerUpdate['action']
|
|
547
|
+
? DailyEventObjectRemoteMediaPlayerUpdate
|
|
548
|
+
: T extends DailyEventObjectRemoteMediaPlayerStopped['action']
|
|
549
|
+
? DailyEventObjectRemoteMediaPlayerStopped
|
|
550
|
+
: T extends DailyEventObjectNetworkQualityEvent['action']
|
|
551
|
+
? DailyEventObjectNetworkQualityEvent
|
|
552
|
+
: T extends DailyEventObjectNetworkConnectionEvent['action']
|
|
553
|
+
? DailyEventObjectNetworkConnectionEvent
|
|
554
|
+
: T extends DailyEventObjectActiveSpeakerChange['action']
|
|
555
|
+
? DailyEventObjectActiveSpeakerChange
|
|
556
|
+
: T extends DailyEventObjectReceiveSettingsUpdated['action']
|
|
557
|
+
? DailyEventObjectReceiveSettingsUpdated
|
|
558
|
+
: T extends DailyEventObjectAvailableDevicesUpdated['action']
|
|
559
|
+
? DailyEventObjectAvailableDevicesUpdated
|
|
560
|
+
: any;
|
|
524
561
|
|
|
525
562
|
export type DailyNativeInCallAudioMode = 'video' | 'voice';
|
|
526
563
|
|
|
@@ -593,12 +630,18 @@ export type DailyAccessRequest = {
|
|
|
593
630
|
export interface DailyStreamingOptions {
|
|
594
631
|
width?: number;
|
|
595
632
|
height?: number;
|
|
633
|
+
fps?: number;
|
|
596
634
|
backgroundColor?: string;
|
|
597
635
|
layout?: DailyStreamingLayoutConfig;
|
|
598
636
|
}
|
|
599
637
|
|
|
638
|
+
export interface DailyStreamingEndpoint {
|
|
639
|
+
endpoint: string;
|
|
640
|
+
}
|
|
641
|
+
|
|
600
642
|
export interface DailyLiveStreamingOptions extends DailyStreamingOptions {
|
|
601
|
-
rtmpUrl
|
|
643
|
+
rtmpUrl?: string | string[];
|
|
644
|
+
endpoints?: DailyStreamingEndpoint[];
|
|
602
645
|
}
|
|
603
646
|
|
|
604
647
|
export interface RemoteMediaPlayerSimulcastEncoding {
|
|
@@ -635,6 +678,11 @@ export interface DailyRemoteMediaPlayerInfo {
|
|
|
635
678
|
remoteMediaPlayerState: DailyRemoteMediaPlayerState;
|
|
636
679
|
}
|
|
637
680
|
|
|
681
|
+
export interface DailyTranscriptionDeepgramOptions {
|
|
682
|
+
language?: string;
|
|
683
|
+
model?: string;
|
|
684
|
+
}
|
|
685
|
+
|
|
638
686
|
export interface DailyCall {
|
|
639
687
|
join(properties?: DailyCallOptions): Promise<DailyParticipantsObject | void>;
|
|
640
688
|
leave(): Promise<void>;
|
|
@@ -676,13 +724,26 @@ export interface DailyCall {
|
|
|
676
724
|
cycleCamera(): Promise<{
|
|
677
725
|
device: { facingMode: DailyCameraFacingMode } | null;
|
|
678
726
|
}>;
|
|
727
|
+
setCamera(cameraDeviceId: string | number): Promise<{
|
|
728
|
+
device: { facingMode: DailyCameraFacingMode } | null;
|
|
729
|
+
}>;
|
|
730
|
+
setAudioDevice(deviceId: string): Promise<{
|
|
731
|
+
deviceId: String;
|
|
732
|
+
}>;
|
|
679
733
|
getCameraFacingMode(): Promise<DailyCameraFacingMode | null>;
|
|
680
734
|
nativeInCallAudioMode(): DailyNativeInCallAudioMode;
|
|
681
735
|
setNativeInCallAudioMode(
|
|
682
736
|
inCallAudioMode: DailyNativeInCallAudioMode
|
|
683
737
|
): DailyCall;
|
|
738
|
+
getInputDevices(): Promise<DailyDeviceInfos>;
|
|
684
739
|
startLiveStreaming(options: DailyLiveStreamingOptions): void;
|
|
685
740
|
updateLiveStreaming(options: { layout?: DailyStreamingLayoutConfig }): void;
|
|
741
|
+
addLiveStreamingEndpoints(options: {
|
|
742
|
+
endpoints: DailyStreamingEndpoint[];
|
|
743
|
+
}): void;
|
|
744
|
+
removeLiveStreamingEndpoints(options: {
|
|
745
|
+
endpoints: DailyStreamingEndpoint[];
|
|
746
|
+
}): void;
|
|
686
747
|
stopLiveStreaming(): void;
|
|
687
748
|
startRemoteMediaPlayer(
|
|
688
749
|
options: DailyRemoteMediaPlayerStartOptions
|
|
@@ -691,6 +752,8 @@ export interface DailyCall {
|
|
|
691
752
|
updateRemoteMediaPlayer(
|
|
692
753
|
options: DailyRemoteMediaPlayerUpdateOptions
|
|
693
754
|
): Promise<DailyRemoteMediaPlayerInfo>;
|
|
755
|
+
startTranscription(options?: DailyTranscriptionDeepgramOptions): void;
|
|
756
|
+
stopTranscription(): void;
|
|
694
757
|
preAuth(properties?: DailyCallOptions): Promise<{ access: DailyAccess }>;
|
|
695
758
|
load(properties?: DailyLoadOptions): Promise<void>;
|
|
696
759
|
startRecording(options?: DailyStreamingOptions): void;
|