@cloudflare/realtimekit-react-native 0.1.2-staging.9 → 0.1.3-staging.1
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/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/BackgroundTimer/RNBackgroundTimer.java +3 -3
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/Constants.java +4 -4
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/CoreModule.java +1 -1
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/CorePackage.java +6 -6
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/ForegroundService.java +5 -5
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/NotificationHelper.java +2 -2
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/RNPermissionsModule.java +2 -2
- package/android/src/main/java/com/{reactnativecore/DyteHelperModule.java → cloudflare/realtimekit/RTKHelperModule.java} +12 -12
- package/android/src/main/java/com/{reactnativecore/DyteHolder.java → cloudflare/realtimekit/RTKHolder.java} +2 -2
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/incallmanager/AppRTCBluetoothManager.java +4 -4
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/incallmanager/AppRTCProximitySensor.java +4 -4
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/incallmanager/AppRTCUtils.java +1 -1
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/incallmanager/InCallManagerModule.java +4 -4
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/incallmanager/InCallProximityManager.java +3 -3
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/incallmanager/InCallWakeLockUtils.java +2 -2
- package/android/src/main/java/com/{reactnativecore → cloudflare/realtimekit}/incallmanager/ThreadUtils.java +1 -1
- package/app.plugin.js +1 -1
- package/ios/RNInCallManager.m +26 -18
- package/ios/{DyteRNBackgroundTimer.h → RTKRNBackgroundTimer.h} +1 -1
- package/ios/{DyteRNBackgroundTimer.m → RTKRNBackgroundTimer.m} +2 -2
- package/ios/{DyteRNPermissionHandlerNotifications.h → RTKRNPermissionHandlerNotifications.h} +2 -2
- package/ios/{DyteRNPermissionHandlerNotifications.m → RTKRNPermissionHandlerNotifications.m} +3 -3
- package/ios/{DyteRNPermissions.h → RTKRNPermissions.h} +2 -2
- package/ios/{DyteRNPermissions.m → RTKRNPermissions.m} +33 -33
- package/ios/{DyteScreensharePickerView.h → RTKScreensharePickerView.h} +1 -1
- package/ios/{DyteScreensharePickerView.m → RTKScreensharePickerView.m} +2 -2
- package/ios/permissions/RTKRNPermissionHandlerBluetoothPeripheral.h +4 -0
- package/ios/permissions/{DyteRNPermissionHandlerBluetoothPeripheral.m → RTKRNPermissionHandlerBluetoothPeripheral.m} +3 -3
- package/ios/permissions/RTKRNPermissionHandlerCamera.h +5 -0
- package/ios/permissions/{DyteRNPermissionHandlerCamera.m → RTKRNPermissionHandlerCamera.m} +2 -2
- package/ios/permissions/RTKRNPermissionHandlerMicrophone.h +5 -0
- package/ios/permissions/{DyteRNPermissionHandlerMicrophone.m → RTKRNPermissionHandlerMicrophone.m} +2 -2
- package/ios/permissions/{DyteRNPermissionHandlerPhotoLibrary.h → RTKRNPermissionHandlerPhotoLibrary.h} +2 -2
- package/ios/permissions/{DyteRNPermissionHandlerPhotoLibrary.m → RTKRNPermissionHandlerPhotoLibrary.m} +2 -2
- package/ios/screenshare/{DyteDarwinNotificationCenter.swift → RTKDarwinNotificationCenter.swift} +4 -4
- package/ios/screenshare/{DyteScreenshareAtomic.swift → RTKScreenshareAtomic.swift} +1 -1
- package/ios/screenshare/{DyteScreenshareHandler.swift → RTKScreenshareHandler.swift} +8 -8
- package/ios/screenshare/{DyteScreenshareUploader.swift → RTKScreenshareUploader.swift} +6 -6
- package/ios/screenshare/{DyteSocketConnection.swift → RTKSocketConnection.swift} +3 -3
- package/lib/BackgroundHandler.js +19 -9
- package/lib/LocalMediaHandler.d.ts +0 -3
- package/lib/LocalMediaHandler.js +26 -46
- package/lib/PermissionHandler.js +7 -7
- package/lib/ReactContext.d.ts +4 -4
- package/lib/ReactContext.js +5 -5
- package/lib/ReactHooks.d.ts +1 -1
- package/lib/ReactHooks.js +1 -1
- package/package.json +1 -1
- package/plugin/build/{withDyte.js → withRTK.js} +1 -1
- package/plugin/src/{withDyte.ts → withRTK.ts} +4 -1
- package/plugin/tsconfig.tsbuildinfo +1 -1
- package/LICENSE +0 -13
- package/ios/permissions/DyteRNPermissionHandlerBluetoothPeripheral.h +0 -4
- package/ios/permissions/DyteRNPermissionHandlerCamera.h +0 -5
- package/ios/permissions/DyteRNPermissionHandlerMicrophone.h +0 -5
- /package/plugin/build/{withDyte.d.ts → withRTK.d.ts} +0 -0
package/lib/PermissionHandler.js
CHANGED
|
@@ -32,18 +32,18 @@ export const RESULTS = Object.freeze({
|
|
|
32
32
|
LIMITED: 'limited',
|
|
33
33
|
PROMPTED: 'prompted',
|
|
34
34
|
});
|
|
35
|
-
const {
|
|
35
|
+
const { RTKRNPermissions } = NativeModules;
|
|
36
36
|
function request(permission) {
|
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
return
|
|
39
|
-
? yield
|
|
38
|
+
return RTKRNPermissions.available.includes(permission)
|
|
39
|
+
? yield RTKRNPermissions.request(permission)
|
|
40
40
|
: RESULTS.UNAVAILABLE;
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
function check(permission) {
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
return
|
|
46
|
-
? yield
|
|
45
|
+
return RTKRNPermissions.available.includes(permission)
|
|
46
|
+
? yield RTKRNPermissions.check(permission)
|
|
47
47
|
: RESULTS.UNAVAILABLE;
|
|
48
48
|
});
|
|
49
49
|
}
|
|
@@ -61,7 +61,7 @@ function requestMultiplePermissions(permissions) {
|
|
|
61
61
|
}
|
|
62
62
|
return output;
|
|
63
63
|
}
|
|
64
|
-
const output = yield
|
|
64
|
+
const output = yield RTKRNPermissions.requestMultiplePermissions(permissions, true);
|
|
65
65
|
return output;
|
|
66
66
|
});
|
|
67
67
|
}
|
|
@@ -76,7 +76,7 @@ function checkMultiplePermissions(permissions) {
|
|
|
76
76
|
}
|
|
77
77
|
return output;
|
|
78
78
|
}
|
|
79
|
-
const output = yield
|
|
79
|
+
const output = yield RTKRNPermissions.checkMultiplePermissions(permissions);
|
|
80
80
|
return output;
|
|
81
81
|
});
|
|
82
82
|
}
|
package/lib/ReactContext.d.ts
CHANGED
|
@@ -15,10 +15,10 @@ export declare const RealtimeKitContext: React.Context<{
|
|
|
15
15
|
updates: RealtimeKitUpdates | undefined;
|
|
16
16
|
}>;
|
|
17
17
|
/**
|
|
18
|
-
* Provider component which makes the
|
|
18
|
+
* Provider component which makes the RealtimeKitClient object
|
|
19
19
|
* available to nested components
|
|
20
20
|
* @component
|
|
21
|
-
* @param value The
|
|
21
|
+
* @param value The RealtimeKitClient instance from `useRealtimeKitClient()`
|
|
22
22
|
* @param renderBeforeLoad The provider will not render children by default
|
|
23
23
|
* until it gets a client object, renderBeforeLoad can be used to override that
|
|
24
24
|
*/
|
|
@@ -28,8 +28,8 @@ export declare function RealtimeKitProvider({ value, children, fallback, }: {
|
|
|
28
28
|
fallback?: ReactChild | ReactChild[];
|
|
29
29
|
}): JSX.Element;
|
|
30
30
|
/**
|
|
31
|
-
* Hook which returns the reference to the
|
|
32
|
-
* @returns meeting instance from `
|
|
31
|
+
* Hook which returns the reference to the RealtimeKitClient object
|
|
32
|
+
* @returns meeting instance from `useRealtimeKitClient()`
|
|
33
33
|
*/
|
|
34
34
|
export declare const useRealtimeKitMeeting: () => {
|
|
35
35
|
meeting: RealtimeKitClient;
|
package/lib/ReactContext.js
CHANGED
|
@@ -52,10 +52,10 @@ export const RealtimeKitContext = createContext({
|
|
|
52
52
|
updates: undefined,
|
|
53
53
|
});
|
|
54
54
|
/**
|
|
55
|
-
* Provider component which makes the
|
|
55
|
+
* Provider component which makes the RealtimeKitClient object
|
|
56
56
|
* available to nested components
|
|
57
57
|
* @component
|
|
58
|
-
* @param value The
|
|
58
|
+
* @param value The RealtimeKitClient instance from `useRealtimeKitClient()`
|
|
59
59
|
* @param renderBeforeLoad The provider will not render children by default
|
|
60
60
|
* until it gets a client object, renderBeforeLoad can be used to override that
|
|
61
61
|
*/
|
|
@@ -79,12 +79,12 @@ export function RealtimeKitProvider({ value, children, fallback = null, }) {
|
|
|
79
79
|
} }, value ? children : fallback));
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
* Hook which returns the reference to the
|
|
83
|
-
* @returns meeting instance from `
|
|
82
|
+
* Hook which returns the reference to the RealtimeKitClient object
|
|
83
|
+
* @returns meeting instance from `useRealtimeKitClient()`
|
|
84
84
|
*/
|
|
85
85
|
export const useRealtimeKitMeeting = () => {
|
|
86
86
|
const { meeting } = useContext(RealtimeKitContext);
|
|
87
87
|
if (!meeting)
|
|
88
|
-
throw new Error('useRealtimeKitMeeting must be used within the
|
|
88
|
+
throw new Error('useRealtimeKitMeeting must be used within the RealtimeKitProvider');
|
|
89
89
|
return { meeting };
|
|
90
90
|
};
|
package/lib/ReactHooks.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import RealtimeKitClient from '@cloudflare/realtimekit';
|
|
|
5
5
|
export declare const useRealtimeKitClient: () => [RealtimeKitClient | undefined, (options: any) => {}];
|
|
6
6
|
type StateSelector<T extends object, U> = (state: T) => U;
|
|
7
7
|
/**
|
|
8
|
-
* Hook which extracts data from the
|
|
8
|
+
* Hook which extracts data from the RealtimeKitClient object
|
|
9
9
|
*/
|
|
10
10
|
export declare const useRTKSelector: <StateSlice>(selector: StateSelector<RealtimeKitClient, StateSlice>) => StateSlice;
|
|
11
11
|
export * from './ReactContext';
|
package/lib/ReactHooks.js
CHANGED
|
@@ -37,7 +37,7 @@ const shouldUpdate = (slice, newSlice) => {
|
|
|
37
37
|
return false;
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
|
-
* Hook which extracts data from the
|
|
40
|
+
* Hook which extracts data from the RealtimeKitClient object
|
|
41
41
|
*/
|
|
42
42
|
export const useRTKSelector = (selector) => {
|
|
43
43
|
const { meeting, updates } = useContext(RealtimeKitContext);
|
package/package.json
CHANGED
|
@@ -97,4 +97,4 @@ const withVoice = (config, props = {}) => {
|
|
|
97
97
|
}
|
|
98
98
|
return config;
|
|
99
99
|
};
|
|
100
|
-
exports.default = (0, config_plugins_1.createRunOncePlugin)(withVoice, '@
|
|
100
|
+
exports.default = (0, config_plugins_1.createRunOncePlugin)(withVoice, '@cloudflare/realtimekit-react-native');
|
|
@@ -147,4 +147,7 @@ const withVoice: ConfigPlugin<Props | void> = (config, props = {}) => {
|
|
|
147
147
|
return config;
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
export default createRunOncePlugin(
|
|
150
|
+
export default createRunOncePlugin(
|
|
151
|
+
withVoice,
|
|
152
|
+
'@cloudflare/realtimekit-react-native'
|
|
153
|
+
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/
|
|
1
|
+
{"root":["./src/withRTK.ts"],"version":"5.8.3"}
|
package/LICENSE
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Copyright 2021-present DYTE INC, Inc.
|
|
2
|
-
|
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License.
|
|
5
|
-
You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
See the License for the specific language governing permissions and
|
|
13
|
-
limitations under the License.
|
|
File without changes
|