@stream-io/video-react-native-sdk 0.0.7 → 0.0.9
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/CHANGELOG.md +13 -0
- package/README.md +16 -14
- package/dist/src/components/Call/Lobby/Lobby.js +4 -2
- package/dist/src/components/Call/Lobby/Lobby.js.map +1 -1
- package/dist/src/translations/en.json +1 -0
- package/dist/src/translations/index.d.ts +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/expo-config-plugin/README.md +85 -0
- package/expo-config-plugin/fixtures/index.ts +15 -0
- package/expo-config-plugin/src/index.ts +18 -0
- package/package.json +8 -5
- package/src/components/Call/Lobby/Lobby.tsx +4 -2
- package/src/translations/en.json +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
### [0.0.9](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.8...@stream-io/video-react-native-sdk-0.0.9) (2023-09-11)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `@stream-io/video-client` updated to version `0.1.0`
|
|
10
|
+
* `@stream-io/video-react-bindings` updated to version `0.2.16`
|
|
11
|
+
### [0.0.8](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.7...@stream-io/video-react-native-sdk-0.0.8) (2023-09-07)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **react-native:** add expo video sample app ([#974](https://github.com/GetStream/stream-video-js/issues/974)) ([3c61756](https://github.com/GetStream/stream-video-js/commit/3c617566bea8160c765682c256d84d72e4243082))
|
|
17
|
+
|
|
5
18
|
### [0.0.7](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.6...@stream-io/video-react-native-sdk-0.0.7) (2023-09-06)
|
|
6
19
|
|
|
7
20
|
|
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ The Stream Video React Native SDK supports apps created with the React Native CL
|
|
|
85
85
|
## Roadmap
|
|
86
86
|
Stream's video roadmap and changelog are available [here](https://github.com/GetStream/protocol/discussions/127).
|
|
87
87
|
|
|
88
|
-
### 0.1 milestone
|
|
88
|
+
### 0.1, 0.2 and 0.3 milestone
|
|
89
89
|
- [x] Push notification- Android
|
|
90
90
|
- [x] Chat integration guide
|
|
91
91
|
- [x] Simulcasting- Android
|
|
@@ -113,21 +113,23 @@ Stream's video roadmap and changelog are available [here](https://github.com/Get
|
|
|
113
113
|
- [x] Video Layout (refactor)
|
|
114
114
|
- [x] ParticipantView customizations
|
|
115
115
|
|
|
116
|
-
### 0.
|
|
116
|
+
### 0.4 Milestones
|
|
117
|
+
- [x] Expo Support
|
|
118
|
+
- [ ] Leaner Chat Integration Guide
|
|
117
119
|
- [ ] Regular Push Notification
|
|
118
|
-
- [ ] Deeplink support for video call demo (Dogfooding already implemented)
|
|
119
120
|
- [ ] Speaking while muted
|
|
120
|
-
- [ ] Landscape
|
|
121
|
+
- [ ] Landscape Support
|
|
122
|
+
- [ ] PiP
|
|
123
|
+
- [ ] Livestream components
|
|
124
|
+
- [ ] Speaker management (needs docs)
|
|
121
125
|
|
|
122
|
-
### 0.
|
|
123
|
-
- [ ] Test with a large call with many participants
|
|
124
|
-
- [ ] Test coverage
|
|
125
|
-
- [ ] CPU usage improvements
|
|
126
|
-
- [ ] Picture-in-Picture
|
|
126
|
+
### 0.5 Milestones
|
|
127
127
|
|
|
128
|
-
### 0.4 milestone
|
|
129
128
|
- [ ] Audio & Video filters
|
|
130
|
-
- [ ]
|
|
131
|
-
- [ ]
|
|
132
|
-
- [ ]
|
|
133
|
-
- [ ]
|
|
129
|
+
- [ ] Screensharing
|
|
130
|
+
- [ ] CPU usage improvement
|
|
131
|
+
- [ ] Analytics Integration
|
|
132
|
+
- [ ] Demo app on playstore and app store
|
|
133
|
+
- [ ] Long press to focus
|
|
134
|
+
- [ ] Dynascale 2.0
|
|
135
|
+
- [ ] Test coverage
|
|
@@ -16,7 +16,7 @@ export const Lobby = ({ onJoinCallHandler, LobbyControls = DefaultLobbyControls,
|
|
|
16
16
|
const { theme: { colors, lobby, typefaces }, } = useTheme();
|
|
17
17
|
const connectedUser = useConnectedUser();
|
|
18
18
|
const { useCameraState, useCallSession } = useCallStateHooks();
|
|
19
|
-
const {
|
|
19
|
+
const { status: cameraStatus } = useCameraState();
|
|
20
20
|
const call = useCall();
|
|
21
21
|
const session = useCallSession();
|
|
22
22
|
const { t } = useI18n();
|
|
@@ -50,7 +50,8 @@ export const Lobby = ({ onJoinCallHandler, LobbyControls = DefaultLobbyControls,
|
|
|
50
50
|
{ backgroundColor: colors.disabled },
|
|
51
51
|
lobby.videoContainer,
|
|
52
52
|
] },
|
|
53
|
-
|
|
53
|
+
React.createElement(View, { style: styles.topView }),
|
|
54
|
+
cameraStatus === 'enabled' ? (React.createElement(RTCView, { mirror: true, streamURL: localVideoStream?.toURL(), objectFit: "cover", style: StyleSheet.absoluteFillObject })) : (React.createElement(View, { style: [styles.avatarContainer, lobby.avatarContainer] },
|
|
54
55
|
React.createElement(Avatar, { participant: connectedUserAsParticipant }))),
|
|
55
56
|
React.createElement(ParticipantStatus, null)),
|
|
56
57
|
LobbyControls && React.createElement(LobbyControls, null))),
|
|
@@ -122,6 +123,7 @@ const styles = StyleSheet.create({
|
|
|
122
123
|
overflow: 'hidden',
|
|
123
124
|
padding: 8,
|
|
124
125
|
},
|
|
126
|
+
topView: {},
|
|
125
127
|
infoContainer: {
|
|
126
128
|
padding: 12,
|
|
127
129
|
borderRadius: 10,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Lobby.js","sourceRoot":"","sources":["../../../../../src/components/Call/Lobby/Lobby.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OA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KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,CAAC;QACV,YAAY,EAAE,CAAC;KAChB;IACD,eAAe,EAAE;QACf,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;KACzB;IACD,aAAa,EAAE;QACb,UAAU,EAAE,CAAC;KACd;IACD,uBAAuB,EAAE;QACvB,UAAU,EAAE,CAAC;KACd;CACF,CAAC,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"Join": "Join",
|
|
7
7
|
"You": "You",
|
|
8
8
|
"Reconnecting...": "Reconnecting...",
|
|
9
|
+
"You are first to Join the call.": "You are first to Join the call.",
|
|
9
10
|
"Participants ({{ numberOfParticipants }})": "Participants ({{ numberOfParticipants }})",
|
|
10
11
|
"{{ userName }} is sharing their screen": "{{ userName }} is sharing their screen",
|
|
11
12
|
"{{ numberOfParticipants }} participant(s) are in the call.": "{{ numberOfParticipants }} participant(s) are in the call.",
|
|
@@ -7,6 +7,7 @@ export declare const translations: {
|
|
|
7
7
|
Join: string;
|
|
8
8
|
You: string;
|
|
9
9
|
"Reconnecting...": string;
|
|
10
|
+
"You are first to Join the call.": string;
|
|
10
11
|
"Participants ({{ numberOfParticipants }})": string;
|
|
11
12
|
"{{ userName }} is sharing their screen": string;
|
|
12
13
|
"{{ numberOfParticipants }} participant(s) are in the call.": string;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.9";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '0.0.
|
|
1
|
+
export const version = '0.0.9';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
This config plugin is built to auto configure the `@stream-io/video-react-native-sdk` with the native changes.
|
|
2
|
+
|
|
3
|
+
After installing the `@stream-io/video-react-native-sdk` you can simply add the plugin in the `app.json` or `app.config.js` of your project as:
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"expo": {
|
|
8
|
+
"plugins": ["@stream-io/video-react-native-sdk"]
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Next you can run the code using `yarn run android` and `yarn run ios`.
|
|
14
|
+
|
|
15
|
+
## Changes
|
|
16
|
+
|
|
17
|
+
The plugin adds the following native changes to the code.
|
|
18
|
+
|
|
19
|
+
### Android
|
|
20
|
+
|
|
21
|
+
#### `MainApplication.java`
|
|
22
|
+
|
|
23
|
+
Adds the import and setup for StreamVideoReactNative in your `MainApplication.java` file:
|
|
24
|
+
|
|
25
|
+
Read more about it [here](https://getstream.io/video/docs/reactnative/setup/installation/react-native/#add-stream-video-sdks-setup-method).
|
|
26
|
+
|
|
27
|
+
```java
|
|
28
|
+
// Adds this
|
|
29
|
+
import com.streamvideo.reactnative.StreamVideoReactNative;
|
|
30
|
+
|
|
31
|
+
public class MainApplication extends Application implements ReactApplication {
|
|
32
|
+
|
|
33
|
+
@Override
|
|
34
|
+
public void onCreate() {
|
|
35
|
+
super.onCreate();
|
|
36
|
+
// Adds this
|
|
37
|
+
StreamVideoReactNative.setup();
|
|
38
|
+
// the rest..
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
#### `AndroidManifest.xml`
|
|
44
|
+
|
|
45
|
+
Add service named `app.notifee.core.ForegroundService`.
|
|
46
|
+
|
|
47
|
+
```xml
|
|
48
|
+
<service android:name="app.notifee.core.ForegroundService" android:stopWithTask="true" android:foregroundServiceType="microphone"/>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The `@stream-io/video-react-native-sdk` also adds the appropriate android permissions such as `POST_NOTIFICATIONS`, `FOREGROUND_SERVICE`, `FOREGROUND_SERVICE_MICROPHONE`, `BLUETOOTH`, `BLUETOOTH_ADMIN` and `BLUETOOTH_CONNECT` to the `AndroidManifest.xml`.
|
|
52
|
+
|
|
53
|
+
### iOS
|
|
54
|
+
|
|
55
|
+
#### `AppDelegate.mm`
|
|
56
|
+
|
|
57
|
+
Adds the import and setup for StreamVideoReactNative in your `AppDelegate.mm` file:
|
|
58
|
+
|
|
59
|
+
Read more about it [here](https://getstream.io/video/docs/reactnative/setup/installation/react-native/#add-stream-video-sdks-setup-method).
|
|
60
|
+
|
|
61
|
+
```c
|
|
62
|
+
// Adds this
|
|
63
|
+
#import "StreamVideoReactNative.h"
|
|
64
|
+
|
|
65
|
+
@implementation AppDelegate
|
|
66
|
+
|
|
67
|
+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
68
|
+
{
|
|
69
|
+
// Adds this
|
|
70
|
+
[StreamVideoReactNative setup];
|
|
71
|
+
|
|
72
|
+
// the rest..
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### `Info.plist`
|
|
77
|
+
|
|
78
|
+
Adds `audio` to the `UIBackgroundModes` in Info.plist as:
|
|
79
|
+
|
|
80
|
+
```xml
|
|
81
|
+
<key>UIBackgroundModes</key>
|
|
82
|
+
<array>
|
|
83
|
+
<string>audio</string>
|
|
84
|
+
</array>
|
|
85
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
|
|
4
|
+
export function getFixture(
|
|
5
|
+
name: 'AppDelegate.mm' | 'MainApplication.java' | 'AndroidManifest.xml',
|
|
6
|
+
): string {
|
|
7
|
+
const filepath = path.join(__dirname, name);
|
|
8
|
+
return fs.readFileSync(filepath, 'utf8');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function getFixturePath(
|
|
12
|
+
name: 'AppDelegate.mm' | 'MainApplication.java' | 'AndroidManifest.xml',
|
|
13
|
+
): string {
|
|
14
|
+
return path.join(__dirname, name);
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ConfigPlugin, withPlugins } from '@expo/config-plugins';
|
|
2
|
+
import withStreamVideoReactNativeSDKAppDelegate from './withAppDelegate';
|
|
3
|
+
import withStreamVideoReactNativeSDKMainApplication from './withMainApplication';
|
|
4
|
+
import withStreamVideoReactNativeSDKAndroidPermissions from './withAndroidPermissions';
|
|
5
|
+
import withStreamVideoReactNativeSDKManifest from './withAndroidManifest';
|
|
6
|
+
import withStreamVideoReactNativeSDKiOSInfoPList from './withiOSInfoPlist';
|
|
7
|
+
|
|
8
|
+
const withStreamVideoReactNativeSDK: ConfigPlugin = (config) => {
|
|
9
|
+
return withPlugins(config, [
|
|
10
|
+
withStreamVideoReactNativeSDKAppDelegate,
|
|
11
|
+
withStreamVideoReactNativeSDKMainApplication,
|
|
12
|
+
withStreamVideoReactNativeSDKAndroidPermissions,
|
|
13
|
+
withStreamVideoReactNativeSDKManifest,
|
|
14
|
+
withStreamVideoReactNativeSDKiOSInfoPList,
|
|
15
|
+
]);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default withStreamVideoReactNativeSDK;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-native-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"packageManager": "yarn@3.2.4",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
"postinstall": "yarn copy-version",
|
|
13
13
|
"clean": "rimraf dist",
|
|
14
14
|
"start": "yarn copy-version && tsc --project tsconfig.json --watch",
|
|
15
|
-
"build": "
|
|
16
|
-
"
|
|
15
|
+
"build:expo-plugin": "rimraf plugin/build && tsc --build expo-config-plugin",
|
|
16
|
+
"build": "yarn clean && yarn copy-version && tsc --project tsconfig.json && yarn build:expo-plugin",
|
|
17
|
+
"test:expo-plugin": "jest expo-config-plugin --coverage",
|
|
18
|
+
"test": "jest --coverage && yarn test:expo-plugin",
|
|
17
19
|
"copy-version": "echo \"export const version = '$npm_package_version';\" > ./version.ts"
|
|
18
20
|
},
|
|
19
21
|
"files": [
|
|
@@ -41,8 +43,8 @@
|
|
|
41
43
|
],
|
|
42
44
|
"dependencies": {
|
|
43
45
|
"@stream-io/i18n": "^0.1.1",
|
|
44
|
-
"@stream-io/video-client": "^0.3.
|
|
45
|
-
"@stream-io/video-react-bindings": "^0.2.
|
|
46
|
+
"@stream-io/video-client": "^0.3.15",
|
|
47
|
+
"@stream-io/video-react-bindings": "^0.2.16",
|
|
46
48
|
"intl-pluralrules": "2.0.1",
|
|
47
49
|
"lodash.merge": "^4.6.2",
|
|
48
50
|
"react-native-url-polyfill": "1.3.0",
|
|
@@ -85,6 +87,7 @@
|
|
|
85
87
|
},
|
|
86
88
|
"devDependencies": {
|
|
87
89
|
"@babel/preset-typescript": "^7.21.5",
|
|
90
|
+
"@expo/config-plugins": "^7.2.5",
|
|
88
91
|
"@notifee/react-native": "7.8.0",
|
|
89
92
|
"@react-native-community/eslint-config": "^3.2.0",
|
|
90
93
|
"@react-native-community/netinfo": "9.3.9",
|
|
@@ -50,7 +50,7 @@ export const Lobby = ({
|
|
|
50
50
|
} = useTheme();
|
|
51
51
|
const connectedUser = useConnectedUser();
|
|
52
52
|
const { useCameraState, useCallSession } = useCallStateHooks();
|
|
53
|
-
const {
|
|
53
|
+
const { status: cameraStatus } = useCameraState();
|
|
54
54
|
const call = useCall();
|
|
55
55
|
const session = useCallSession();
|
|
56
56
|
const { t } = useI18n();
|
|
@@ -101,9 +101,10 @@ export const Lobby = ({
|
|
|
101
101
|
lobby.videoContainer,
|
|
102
102
|
]}
|
|
103
103
|
>
|
|
104
|
+
<View style={styles.topView} />
|
|
104
105
|
{cameraStatus === 'enabled' ? (
|
|
105
106
|
<RTCView
|
|
106
|
-
mirror={
|
|
107
|
+
mirror={true}
|
|
107
108
|
streamURL={localVideoStream?.toURL()}
|
|
108
109
|
objectFit="cover"
|
|
109
110
|
style={StyleSheet.absoluteFillObject}
|
|
@@ -224,6 +225,7 @@ const styles = StyleSheet.create({
|
|
|
224
225
|
overflow: 'hidden',
|
|
225
226
|
padding: 8,
|
|
226
227
|
},
|
|
228
|
+
topView: {},
|
|
227
229
|
infoContainer: {
|
|
228
230
|
padding: 12,
|
|
229
231
|
borderRadius: 10,
|
package/src/translations/en.json
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"Join": "Join",
|
|
7
7
|
"You": "You",
|
|
8
8
|
"Reconnecting...": "Reconnecting...",
|
|
9
|
+
"You are first to Join the call.": "You are first to Join the call.",
|
|
9
10
|
"Participants ({{ numberOfParticipants }})": "Participants ({{ numberOfParticipants }})",
|
|
10
11
|
"{{ userName }} is sharing their screen": "{{ userName }} is sharing their screen",
|
|
11
12
|
"{{ numberOfParticipants }} participant(s) are in the call.": "{{ numberOfParticipants }} participant(s) are in the call.",
|