@daily-co/react-native-daily-js 0.23.0 → 0.26.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,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daily-co/react-native-daily-js",
|
|
3
|
-
"
|
|
3
|
+
"//": "^ COMMENT OUT 'private: true' BEFORE RUNNING NPM PUBLISH",
|
|
4
|
+
"version": "0.26.0",
|
|
4
5
|
"description": "React Native library for making video calls using Daily",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
@@ -26,18 +27,18 @@
|
|
|
26
27
|
"baseUrl": "https://github.com/daily-co/react-native-daily-js"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@daily-co/daily-js": "^0.
|
|
30
|
+
"@daily-co/daily-js": "^0.28.0",
|
|
30
31
|
"@types/react-native-background-timer": "^2.0.0",
|
|
31
32
|
"react-native-url-polyfill": "^1.1.2"
|
|
32
33
|
},
|
|
33
34
|
"//": "WHEN ONE OF THESE CHANGE, PLEASE UPDATE README.md INSTALL SNIPPET ACCORDINGLY",
|
|
34
35
|
"peerDependencies": {
|
|
35
|
-
"@daily-co/react-native-webrtc": "1.94.1-daily.
|
|
36
|
+
"@daily-co/react-native-webrtc": "1.94.1-daily.4",
|
|
36
37
|
"@react-native-async-storage/async-storage": "^1.15.7",
|
|
37
38
|
"react-native-background-timer": "^2.3.1"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@daily-co/react-native-webrtc": "1.94.1-daily.
|
|
41
|
+
"@daily-co/react-native-webrtc": "1.94.1-daily.4",
|
|
41
42
|
"@react-native-async-storage/async-storage": "^1.15.7",
|
|
42
43
|
"react-native-background-timer": "^2.3.1",
|
|
43
44
|
"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,8 +123,17 @@ 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;
|
|
135
|
+
micAudioMode?: 'music' | 'speech';
|
|
136
|
+
userMediaAudioConstraints?: boolean | MediaTrackConstraints;
|
|
124
137
|
userMediaVideoConstraints?: boolean | MediaTrackConstraints;
|
|
125
138
|
preferH264ForCam?: boolean;
|
|
126
139
|
h264Profile?: string;
|
|
@@ -233,6 +246,12 @@ export interface DailyVideoElementInfo {
|
|
|
233
246
|
video_height: number;
|
|
234
247
|
}
|
|
235
248
|
|
|
249
|
+
export interface DailyDeviceInfos {
|
|
250
|
+
camera: {} | MediaDeviceInfo;
|
|
251
|
+
mic: {} | MediaDeviceInfo;
|
|
252
|
+
speaker: {} | MediaDeviceInfo;
|
|
253
|
+
}
|
|
254
|
+
|
|
236
255
|
export interface DailyNetworkStats {
|
|
237
256
|
quality: number;
|
|
238
257
|
stats: {
|
|
@@ -464,11 +483,28 @@ export interface DailyEventObjectReceiveSettingsUpdated {
|
|
|
464
483
|
receiveSettings: DailyReceiveSettings;
|
|
465
484
|
}
|
|
466
485
|
|
|
486
|
+
export interface DailyEventObjectAvailableDevicesUpdated {
|
|
487
|
+
action: Extract<DailyEvent, 'available-devices-updated'>;
|
|
488
|
+
availableDevices: MediaDeviceInfo[];
|
|
489
|
+
}
|
|
490
|
+
|
|
467
491
|
export interface DailyEventObjectLiveStreamingStarted {
|
|
468
492
|
action: Extract<DailyEvent, 'live-streaming-started'>;
|
|
469
493
|
layout?: DailyStreamingLayoutConfig;
|
|
470
494
|
}
|
|
471
495
|
|
|
496
|
+
export interface DailyEventObjectTranscriptionStarted {
|
|
497
|
+
action: Extract<DailyEvent, 'transcription-started'>;
|
|
498
|
+
language: string;
|
|
499
|
+
model: string;
|
|
500
|
+
startedBy: string;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export interface DailyEventObjectTranscriptionStopped {
|
|
504
|
+
action: Extract<DailyEvent, 'transcription-stopped'>;
|
|
505
|
+
updatedBy: string;
|
|
506
|
+
}
|
|
507
|
+
|
|
472
508
|
export interface DailyEventObjectRemoteMediaPlayerUpdate {
|
|
473
509
|
action: Extract<
|
|
474
510
|
DailyEvent,
|
|
@@ -486,43 +522,44 @@ export interface DailyEventObjectRemoteMediaPlayerStopped {
|
|
|
486
522
|
reason: DailyRemoteMediaPlayerStopReason;
|
|
487
523
|
}
|
|
488
524
|
|
|
489
|
-
export type DailyEventObject<
|
|
490
|
-
T extends
|
|
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
|
-
|
|
524
|
-
|
|
525
|
-
|
|
525
|
+
export type DailyEventObject<T extends DailyEvent = any> =
|
|
526
|
+
T extends DailyEventObjectAppMessage['action']
|
|
527
|
+
? DailyEventObjectAppMessage
|
|
528
|
+
: T extends DailyEventObjectNoPayload['action']
|
|
529
|
+
? DailyEventObjectNoPayload
|
|
530
|
+
: T extends DailyEventObjectFatalError['action']
|
|
531
|
+
? DailyEventObjectFatalError
|
|
532
|
+
: T extends DailyEventObjectNonFatalError['action']
|
|
533
|
+
? DailyEventObjectNonFatalError
|
|
534
|
+
: T extends DailyEventObjectGenericError['action']
|
|
535
|
+
? DailyEventObjectGenericError
|
|
536
|
+
: T extends DailyEventObjectParticipants['action']
|
|
537
|
+
? DailyEventObjectParticipants
|
|
538
|
+
: T extends DailyEventObjectParticipant['action']
|
|
539
|
+
? DailyEventObjectParticipant
|
|
540
|
+
: T extends DailyEventObjectWaitingParticipant['action']
|
|
541
|
+
? DailyEventObjectWaitingParticipant
|
|
542
|
+
: T extends DailyEventObjectAccessState['action']
|
|
543
|
+
? DailyEventObjectAccessState
|
|
544
|
+
: T extends DailyEventObjectTrack['action']
|
|
545
|
+
? DailyEventObjectTrack
|
|
546
|
+
: T extends DailyEventObjectRecordingStarted['action']
|
|
547
|
+
? DailyEventObjectRecordingStarted
|
|
548
|
+
: T extends DailyEventObjectRemoteMediaPlayerUpdate['action']
|
|
549
|
+
? DailyEventObjectRemoteMediaPlayerUpdate
|
|
550
|
+
: T extends DailyEventObjectRemoteMediaPlayerStopped['action']
|
|
551
|
+
? DailyEventObjectRemoteMediaPlayerStopped
|
|
552
|
+
: T extends DailyEventObjectNetworkQualityEvent['action']
|
|
553
|
+
? DailyEventObjectNetworkQualityEvent
|
|
554
|
+
: T extends DailyEventObjectNetworkConnectionEvent['action']
|
|
555
|
+
? DailyEventObjectNetworkConnectionEvent
|
|
556
|
+
: T extends DailyEventObjectActiveSpeakerChange['action']
|
|
557
|
+
? DailyEventObjectActiveSpeakerChange
|
|
558
|
+
: T extends DailyEventObjectReceiveSettingsUpdated['action']
|
|
559
|
+
? DailyEventObjectReceiveSettingsUpdated
|
|
560
|
+
: T extends DailyEventObjectAvailableDevicesUpdated['action']
|
|
561
|
+
? DailyEventObjectAvailableDevicesUpdated
|
|
562
|
+
: any;
|
|
526
563
|
|
|
527
564
|
export type DailyNativeInCallAudioMode = 'video' | 'voice';
|
|
528
565
|
|
|
@@ -595,12 +632,18 @@ export type DailyAccessRequest = {
|
|
|
595
632
|
export interface DailyStreamingOptions {
|
|
596
633
|
width?: number;
|
|
597
634
|
height?: number;
|
|
635
|
+
fps?: number;
|
|
598
636
|
backgroundColor?: string;
|
|
599
637
|
layout?: DailyStreamingLayoutConfig;
|
|
600
638
|
}
|
|
601
639
|
|
|
640
|
+
export interface DailyStreamingEndpoint {
|
|
641
|
+
endpoint: string;
|
|
642
|
+
}
|
|
643
|
+
|
|
602
644
|
export interface DailyLiveStreamingOptions extends DailyStreamingOptions {
|
|
603
|
-
rtmpUrl
|
|
645
|
+
rtmpUrl?: string | string[];
|
|
646
|
+
endpoints?: DailyStreamingEndpoint[];
|
|
604
647
|
}
|
|
605
648
|
|
|
606
649
|
export interface RemoteMediaPlayerSimulcastEncoding {
|
|
@@ -637,6 +680,11 @@ export interface DailyRemoteMediaPlayerInfo {
|
|
|
637
680
|
remoteMediaPlayerState: DailyRemoteMediaPlayerState;
|
|
638
681
|
}
|
|
639
682
|
|
|
683
|
+
export interface DailyTranscriptionDeepgramOptions {
|
|
684
|
+
language?: string;
|
|
685
|
+
model?: string;
|
|
686
|
+
}
|
|
687
|
+
|
|
640
688
|
export interface DailyCall {
|
|
641
689
|
join(properties?: DailyCallOptions): Promise<DailyParticipantsObject | void>;
|
|
642
690
|
leave(): Promise<void>;
|
|
@@ -678,13 +726,26 @@ export interface DailyCall {
|
|
|
678
726
|
cycleCamera(): Promise<{
|
|
679
727
|
device: { facingMode: DailyCameraFacingMode } | null;
|
|
680
728
|
}>;
|
|
729
|
+
setCamera(cameraDeviceId: string | number): Promise<{
|
|
730
|
+
device: { facingMode: DailyCameraFacingMode } | null;
|
|
731
|
+
}>;
|
|
732
|
+
setAudioDevice(deviceId: string): Promise<{
|
|
733
|
+
deviceId: String;
|
|
734
|
+
}>;
|
|
681
735
|
getCameraFacingMode(): Promise<DailyCameraFacingMode | null>;
|
|
682
736
|
nativeInCallAudioMode(): DailyNativeInCallAudioMode;
|
|
683
737
|
setNativeInCallAudioMode(
|
|
684
738
|
inCallAudioMode: DailyNativeInCallAudioMode
|
|
685
739
|
): DailyCall;
|
|
740
|
+
getInputDevices(): Promise<DailyDeviceInfos>;
|
|
686
741
|
startLiveStreaming(options: DailyLiveStreamingOptions): void;
|
|
687
742
|
updateLiveStreaming(options: { layout?: DailyStreamingLayoutConfig }): void;
|
|
743
|
+
addLiveStreamingEndpoints(options: {
|
|
744
|
+
endpoints: DailyStreamingEndpoint[];
|
|
745
|
+
}): void;
|
|
746
|
+
removeLiveStreamingEndpoints(options: {
|
|
747
|
+
endpoints: DailyStreamingEndpoint[];
|
|
748
|
+
}): void;
|
|
688
749
|
stopLiveStreaming(): void;
|
|
689
750
|
startRemoteMediaPlayer(
|
|
690
751
|
options: DailyRemoteMediaPlayerStartOptions
|
|
@@ -693,6 +754,8 @@ export interface DailyCall {
|
|
|
693
754
|
updateRemoteMediaPlayer(
|
|
694
755
|
options: DailyRemoteMediaPlayerUpdateOptions
|
|
695
756
|
): Promise<DailyRemoteMediaPlayerInfo>;
|
|
757
|
+
startTranscription(options?: DailyTranscriptionDeepgramOptions): void;
|
|
758
|
+
stopTranscription(): void;
|
|
696
759
|
preAuth(properties?: DailyCallOptions): Promise<{ access: DailyAccess }>;
|
|
697
760
|
load(properties?: DailyLoadOptions): Promise<void>;
|
|
698
761
|
startRecording(options?: DailyStreamingOptions): void;
|