@daily-co/react-native-daily-js 0.76.0 → 0.78.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/android/build.gradle +10 -2
- package/android/gradle.properties +2 -0
- package/android/src/main/AndroidManifest.xml +1 -3
- package/android/src/main/java/com/daily/reactlibrary/DailyNativeUtils.java +21 -2
- package/dist/DailyMediaView.d.ts +2 -2
- package/dist/DailyMediaView.js +18 -8
- package/dist/iOSCallObjectBundleCache.d.ts +0 -1
- package/dist/iOSCallObjectBundleCache.js +5 -5
- package/dist/index.js +33 -19
- package/ios/DailyNativeUtils.m +9 -0
- package/package.json +16 -11
- package/type-overrides/@daily-co/daily-js/index.d.ts +9 -0
package/android/build.gradle
CHANGED
|
@@ -20,14 +20,16 @@ buildscript {
|
|
|
20
20
|
mavenCentral()
|
|
21
21
|
}
|
|
22
22
|
dependencies {
|
|
23
|
-
classpath
|
|
23
|
+
classpath "com.android.tools.build:gradle:8.6.0"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
android {
|
|
29
|
-
|
|
29
|
+
namespace 'com.daily.reactlibrary'
|
|
30
|
+
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
|
|
30
31
|
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
|
|
32
|
+
|
|
31
33
|
defaultConfig {
|
|
32
34
|
minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION)
|
|
33
35
|
targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)
|
|
@@ -41,6 +43,9 @@ android {
|
|
|
41
43
|
sourceCompatibility = 1.8
|
|
42
44
|
targetCompatibility = 1.8
|
|
43
45
|
}
|
|
46
|
+
buildFeatures {
|
|
47
|
+
buildConfig true
|
|
48
|
+
}
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
repositories {
|
|
@@ -61,4 +66,7 @@ repositories {
|
|
|
61
66
|
dependencies {
|
|
62
67
|
//noinspection GradleDynamicVersion
|
|
63
68
|
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
69
|
+
|
|
70
|
+
//For dev only
|
|
71
|
+
//implementation 'com.facebook.react:react-android:0.76.9' // From node_modules
|
|
64
72
|
}
|
|
@@ -8,6 +8,7 @@ import android.content.pm.PackageInfo;
|
|
|
8
8
|
import android.content.pm.PackageManager;
|
|
9
9
|
import android.os.Build;
|
|
10
10
|
import android.os.Process;
|
|
11
|
+
import android.util.Log;
|
|
11
12
|
import android.view.Window;
|
|
12
13
|
import android.view.WindowManager;
|
|
13
14
|
|
|
@@ -18,10 +19,10 @@ import androidx.fragment.app.FragmentActivity;
|
|
|
18
19
|
import com.facebook.react.bridge.Arguments;
|
|
19
20
|
import com.facebook.react.bridge.BaseActivityEventListener;
|
|
20
21
|
import com.facebook.react.bridge.LifecycleEventListener;
|
|
22
|
+
import com.facebook.react.bridge.Promise;
|
|
21
23
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
22
24
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
23
25
|
import com.facebook.react.bridge.ReactMethod;
|
|
24
|
-
import com.facebook.react.bridge.WritableMap;
|
|
25
26
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
26
27
|
import com.facebook.react.modules.core.PermissionAwareActivity;
|
|
27
28
|
import com.facebook.react.modules.core.PermissionListener;
|
|
@@ -61,7 +62,9 @@ public class DailyNativeUtils extends ReactContextBaseJavaModule implements Perm
|
|
|
61
62
|
|
|
62
63
|
@Override
|
|
63
64
|
public void onHostDestroy() {
|
|
64
|
-
eventEmitter
|
|
65
|
+
if (eventEmitter != null) {
|
|
66
|
+
eventEmitter.emit("EventOnHostDestroy", Arguments.createMap());
|
|
67
|
+
}
|
|
65
68
|
DailyOngoingMeetingForegroundService.stop(reactContext);
|
|
66
69
|
}
|
|
67
70
|
});
|
|
@@ -198,4 +201,20 @@ public class DailyNativeUtils extends ReactContextBaseJavaModule implements Perm
|
|
|
198
201
|
DailyOngoingMeetingForegroundService.stop(reactContext);
|
|
199
202
|
}
|
|
200
203
|
}
|
|
204
|
+
|
|
205
|
+
@ReactMethod
|
|
206
|
+
public void presentSystemScreenCapturePrompt() {
|
|
207
|
+
Log.d(TAG, "presentSystemScreenCapturePrompt is not available on Android");
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@ReactMethod
|
|
211
|
+
public void requestStopSystemScreenCapture() {
|
|
212
|
+
Log.d(TAG, "requestStopSystemScreenCapture is not available on Android");
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@ReactMethod
|
|
216
|
+
public void isScreenBeingCaptured(Promise promise) {
|
|
217
|
+
Log.d(TAG, "isScreenBeingCaptured is not available on Android");
|
|
218
|
+
promise.resolve(false);
|
|
219
|
+
}
|
|
201
220
|
}
|
package/dist/DailyMediaView.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
3
|
import { MediaStreamTrack, RTCViewProps } from '@daily-co/react-native-webrtc';
|
|
4
4
|
type Props = {
|
|
@@ -9,5 +9,5 @@ type Props = {
|
|
|
9
9
|
objectFit?: RTCViewProps['objectFit'];
|
|
10
10
|
style?: ViewStyle;
|
|
11
11
|
};
|
|
12
|
-
export default function DailyMediaView(props: Props): JSX.Element;
|
|
12
|
+
export default function DailyMediaView(props: Props): React.JSX.Element;
|
|
13
13
|
export {};
|
package/dist/DailyMediaView.js
CHANGED
|
@@ -15,14 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.default = DailyMediaView;
|
|
26
37
|
var React = __importStar(require("react"));
|
|
27
38
|
var react_1 = require("react");
|
|
28
39
|
var react_native_1 = require("react-native");
|
|
@@ -51,4 +62,3 @@ function DailyMediaView(props) {
|
|
|
51
62
|
{placeholderView}
|
|
52
63
|
</>);
|
|
53
64
|
}
|
|
54
|
-
exports.default = DailyMediaView;
|
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g =
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -56,10 +56,10 @@ function cacheKeyForUrl(url) {
|
|
|
56
56
|
var iOSCallObjectBundleCache = /** @class */ (function () {
|
|
57
57
|
function iOSCallObjectBundleCache() {
|
|
58
58
|
}
|
|
59
|
-
iOSCallObjectBundleCache.get = function (
|
|
60
|
-
|
|
61
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
59
|
+
iOSCallObjectBundleCache.get = function (url_1) {
|
|
60
|
+
return __awaiter(this, arguments, void 0, function (url, ignoreExpiry) {
|
|
62
61
|
var now, cacheItemString, cacheItem, _i, REQUIRED_FIELDS_1, field, headers, e_1;
|
|
62
|
+
if (ignoreExpiry === void 0) { ignoreExpiry = false; }
|
|
63
63
|
return __generator(this, function (_a) {
|
|
64
64
|
switch (_a.label) {
|
|
65
65
|
case 0:
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -127,21 +116,46 @@ function setupGlobals() {
|
|
|
127
116
|
return react_native_background_timer_1.default.setTimeout(fn, ms);
|
|
128
117
|
};
|
|
129
118
|
}
|
|
130
|
-
global.DailyNativeUtils =
|
|
119
|
+
global.DailyNativeUtils = {
|
|
120
|
+
//With React Native new architecture the Native modules are lazily initialized
|
|
121
|
+
//As a result ...DailyNativeUtils won't work as expected because the actual properties aren't there yet.
|
|
122
|
+
//New architecture known limitations: https://github.com/reactwg/react-native-new-architecture/discussions/237
|
|
123
|
+
//With this approach mentioning each function, everything works fine with the compatibility layer.
|
|
124
|
+
//More details about the compatibility layer here: https://reactnative.dev/blog/2024/10/23/the-new-architecture-is-here#gradual-migration
|
|
125
|
+
setKeepDeviceAwake: DailyNativeUtils.setKeepDeviceAwake,
|
|
126
|
+
setShowOngoingMeetingNotification: DailyNativeUtils.setShowOngoingMeetingNotification,
|
|
127
|
+
presentSystemScreenCapturePrompt: DailyNativeUtils.presentSystemScreenCapturePrompt,
|
|
128
|
+
requestStopSystemScreenCapture: DailyNativeUtils.requestStopSystemScreenCapture,
|
|
129
|
+
isScreenBeingCaptured: DailyNativeUtils.isScreenBeingCaptured,
|
|
130
|
+
isIOS: react_native_1.Platform.OS === 'ios',
|
|
131
|
+
isAndroid: react_native_1.Platform.OS === 'android',
|
|
132
|
+
setAudioMode: WebRTCModule.setDailyAudioMode,
|
|
133
|
+
setAudioDevice: WebRTCModule.setAudioDevice,
|
|
134
|
+
getAudioDevice: WebRTCModule.getAudioDevice,
|
|
135
|
+
enableNoOpRecordingEnsuringBackgroundContinuity: WebRTCModule.enableNoOpRecordingEnsuringBackgroundContinuity,
|
|
136
|
+
addAudioFocusChangeListener: function (listener) {
|
|
131
137
|
audioFocusChangeListeners.add(listener);
|
|
132
|
-
},
|
|
138
|
+
},
|
|
139
|
+
removeAudioFocusChangeListener: function (listener) {
|
|
133
140
|
audioFocusChangeListeners.delete(listener);
|
|
134
|
-
},
|
|
141
|
+
},
|
|
142
|
+
addAppStateChangeListener: function (listener) {
|
|
135
143
|
appStateChangeListeners.add(listener);
|
|
136
|
-
},
|
|
144
|
+
},
|
|
145
|
+
removeAppStateChangeListener: function (listener) {
|
|
137
146
|
appStateChangeListeners.delete(listener);
|
|
138
|
-
},
|
|
147
|
+
},
|
|
148
|
+
addSystemScreenCaptureStopListener: function (listener) {
|
|
139
149
|
systemScreenCaptureStopListeners.add(listener);
|
|
140
|
-
},
|
|
150
|
+
},
|
|
151
|
+
removeSystemScreenCaptureStopListener: function (listener) {
|
|
141
152
|
systemScreenCaptureStopListeners.delete(listener);
|
|
142
|
-
},
|
|
153
|
+
},
|
|
154
|
+
setSystemScreenCaptureStartCallback: function (listener) {
|
|
143
155
|
systemScreenCaptureStartCallback = listener;
|
|
144
|
-
},
|
|
156
|
+
},
|
|
157
|
+
platform: react_native_1.Platform,
|
|
158
|
+
};
|
|
145
159
|
}
|
|
146
160
|
setupEventListeners();
|
|
147
161
|
setupGlobals();
|
package/ios/DailyNativeUtils.m
CHANGED
|
@@ -167,6 +167,15 @@ RCT_REMAP_METHOD(isScreenBeingCaptured,
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
RCT_EXPORT_METHOD(setShowOngoingMeetingNotification:(BOOL)show
|
|
171
|
+
title:(NSString *)title
|
|
172
|
+
subtitle:(NSString *)subtitle
|
|
173
|
+
iconName:(NSString *)iconName
|
|
174
|
+
requesterId:(NSString *)requesterId)
|
|
175
|
+
{
|
|
176
|
+
RCTLogInfo(@"setShowOngoingMeetingNotification is not available on iOS");
|
|
177
|
+
}
|
|
178
|
+
|
|
170
179
|
#pragma mark Private
|
|
171
180
|
|
|
172
181
|
+ (void)dispatchSyncOnMain:(void (^)(void))block
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daily-co/react-native-daily-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.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",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
9
|
"type-overrides",
|
|
10
|
-
"android",
|
|
10
|
+
"android/src",
|
|
11
|
+
"android/build.gradle",
|
|
12
|
+
"android/gradle.properties",
|
|
11
13
|
"ios",
|
|
12
14
|
"react-native-daily-js.podspec",
|
|
13
15
|
"react-native.config.js",
|
|
@@ -28,23 +30,26 @@
|
|
|
28
30
|
"baseUrl": "https://github.com/daily-co/react-native-daily-js"
|
|
29
31
|
},
|
|
30
32
|
"dependencies": {
|
|
31
|
-
"@daily-co/daily-js": "^0.
|
|
33
|
+
"@daily-co/daily-js": "^0.81.0",
|
|
32
34
|
"@types/react-native-background-timer": "^2.0.0",
|
|
33
35
|
"base-64": "^1.0.0",
|
|
34
36
|
"react-native-url-polyfill": "^1.1.2"
|
|
35
37
|
},
|
|
36
38
|
"///": "WHEN ONE OF THESE CHANGE, PLEASE UPDATE README.md INSTALL SNIPPET ACCORDINGLY",
|
|
37
39
|
"peerDependencies": {
|
|
38
|
-
"@daily-co/react-native-webrtc": "^118.0.3-daily.
|
|
39
|
-
"@react-native-async-storage/async-storage": "^1.
|
|
40
|
-
"react-native
|
|
41
|
-
"react-native-
|
|
40
|
+
"@daily-co/react-native-webrtc": "^118.0.3-daily.3",
|
|
41
|
+
"@react-native-async-storage/async-storage": "^1.24.0",
|
|
42
|
+
"react-native": ">=0.68.0",
|
|
43
|
+
"react-native-background-timer": "^2.4.1",
|
|
44
|
+
"react-native-get-random-values": "^1.11.0"
|
|
42
45
|
},
|
|
43
46
|
"devDependencies": {
|
|
44
|
-
"@daily-co/react-native-webrtc": "
|
|
45
|
-
"@react-native-async-storage/async-storage": "^1.
|
|
47
|
+
"@daily-co/react-native-webrtc": "118.0.3-daily.3",
|
|
48
|
+
"@react-native-async-storage/async-storage": "^1.24.0",
|
|
46
49
|
"@types/base-64": "^1.0.0",
|
|
47
|
-
"react
|
|
48
|
-
"
|
|
50
|
+
"@types/react": "18.3.21",
|
|
51
|
+
"react-native": "0.76.9",
|
|
52
|
+
"react-native-background-timer": "^2.4.1",
|
|
53
|
+
"typescript": "^5.8.3"
|
|
49
54
|
}
|
|
50
55
|
}
|
|
@@ -1178,6 +1178,9 @@ export interface DailyEventObjectDialinConnected extends DailyEventObjectBase {
|
|
|
1178
1178
|
export interface DailyEventObjectDialinError extends DailyEventObjectBase {
|
|
1179
1179
|
action: Extract<DailyEvent, 'dialin-error'>;
|
|
1180
1180
|
errorMsg: string;
|
|
1181
|
+
sessionId: string;
|
|
1182
|
+
type?: 'start-failed' | null;
|
|
1183
|
+
details?: { sipEndpoint?: string };
|
|
1181
1184
|
actionTraceId?: string;
|
|
1182
1185
|
}
|
|
1183
1186
|
|
|
@@ -1548,12 +1551,17 @@ export interface DailyDialOutSession {
|
|
|
1548
1551
|
sessionId: string;
|
|
1549
1552
|
}
|
|
1550
1553
|
|
|
1554
|
+
export interface DailySipPstnParticipantPermissions {
|
|
1555
|
+
canReceive: Partial<DailyParticipantCanReceivePermission>;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1551
1558
|
export interface DailyStartDialoutSipOptions {
|
|
1552
1559
|
sipUri?: string;
|
|
1553
1560
|
displayName?: string;
|
|
1554
1561
|
userId?: string;
|
|
1555
1562
|
video?: boolean;
|
|
1556
1563
|
codecs?: DailyDialOutCodecs;
|
|
1564
|
+
permissions?: DailySipPstnParticipantPermissions;
|
|
1557
1565
|
}
|
|
1558
1566
|
|
|
1559
1567
|
export interface DailyStartDialoutPhoneOptions {
|
|
@@ -1562,6 +1570,7 @@ export interface DailyStartDialoutPhoneOptions {
|
|
|
1562
1570
|
userId?: string;
|
|
1563
1571
|
codecs?: DailyDialOutCodecs;
|
|
1564
1572
|
callerId?: string;
|
|
1573
|
+
permissions?: DailySipPstnParticipantPermissions;
|
|
1565
1574
|
}
|
|
1566
1575
|
|
|
1567
1576
|
export type DailyStartDialoutOptions =
|