@lynkoria/react-native 0.1.0 → 0.1.2
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 +20 -0
- package/README.md +55 -3
- package/package.json +3 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# @lynkoria/react-native
|
|
2
|
+
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c1c6ff1: README: the client needs no API URL (pass your backend's whole `messagingToken()` result), and calls-only apps can use `createLynkoria()` with no options.
|
|
8
|
+
- Updated dependencies [e96fe9d]
|
|
9
|
+
- Updated dependencies [0ee4045]
|
|
10
|
+
- @lynkoria/contracts@0.2.0
|
|
11
|
+
- @lynkoria/client@0.2.0
|
|
12
|
+
|
|
13
|
+
## 0.1.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 349320f: READMEs now cover install, requirements and a quick start, list the main API, and link to the documentation at lynkoria.com/docs.
|
|
18
|
+
- Updated dependencies [349320f]
|
|
19
|
+
- @lynkoria/contracts@0.1.1
|
|
20
|
+
- @lynkoria/client@0.1.1
|
package/README.md
CHANGED
|
@@ -1,10 +1,62 @@
|
|
|
1
1
|
# @lynkoria/react-native
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@lynkoria/react-native)
|
|
4
|
+
[](./LICENSE)
|
|
5
|
+
|
|
6
|
+
Native React Native SDK for Lynkoria: calls and livestreams through a TurboModule and a Fabric video view,
|
|
7
|
+
backed by the native Android and iOS SDKs (LiveKit native, no WebView), plus messaging and push through
|
|
8
|
+
[`@lynkoria/client`](https://www.npmjs.com/package/@lynkoria/client).
|
|
9
|
+
|
|
10
|
+
**[Documentation](https://lynkoria.com/docs/)** · [React Native guide](https://lynkoria.com/docs/react-native-sdk/) ·
|
|
11
|
+
[Native media](https://lynkoria.com/docs/native-media/) · [Push and incoming calls](https://lynkoria.com/docs/push-notifications/)
|
|
12
|
+
|
|
13
|
+
> **Status: preview.** The TypeScript layer is tested against a mocked native module; the native code has not
|
|
14
|
+
> yet been compiled in an app or tested on devices. The Android side depends on `com.lynkoria:lynkoria-android`
|
|
15
|
+
> and the iOS side on the `Lynkoria` Swift package, which are not released yet. See
|
|
16
|
+
> [platform status](https://lynkoria.com/docs/platform-status/).
|
|
17
|
+
|
|
18
|
+
## Requirements
|
|
19
|
+
|
|
20
|
+
- React Native 0.82 or later, **New Architecture only**.
|
|
21
|
+
- Android minSdk 24. iOS 15.1+ with CocoaPods.
|
|
22
|
+
- Expo: a [development build](https://docs.expo.dev/develop/development-builds/introduction/) with the config
|
|
23
|
+
plugin. Expo Go cannot load native modules.
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install @lynkoria/react-native
|
|
29
|
+
cd ios && pod install
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Expo:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{ "expo": { "plugins": [["@lynkoria/react-native", { "voip": true }]] } }
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Quick start
|
|
4
39
|
|
|
5
40
|
```tsx
|
|
6
41
|
import { createLynkoria, joinCall, LynkoriaVideoView } from '@lynkoria/react-native';
|
|
7
|
-
|
|
42
|
+
|
|
43
|
+
const client = createLynkoria({
|
|
44
|
+
// Return your backend's whole messagingToken() result; it carries the API URL.
|
|
45
|
+
getMessagingToken: () => myBackend.messagingToken(),
|
|
46
|
+
});
|
|
47
|
+
client.connect();
|
|
48
|
+
|
|
49
|
+
const call = await joinCall({ getJoinToken: () => myBackend.joinCall(callId), video: true });
|
|
50
|
+
call.onStateChange((state) => setState(state));
|
|
51
|
+
const people = await call.participants();
|
|
52
|
+
// <LynkoriaVideoView participantIdentity={people[0].identity} style={{ flex: 1 }} />
|
|
53
|
+
await call.leave();
|
|
8
54
|
```
|
|
9
55
|
|
|
10
|
-
|
|
56
|
+
`joinCall` asks for microphone (and camera) permission natively and fails without contacting your backend
|
|
57
|
+
if the user denies it. Incoming calls and push are covered in the
|
|
58
|
+
[React Native guide](https://lynkoria.com/docs/react-native-sdk/).
|
|
59
|
+
|
|
60
|
+
## License
|
|
61
|
+
|
|
62
|
+
[Apache-2.0](./LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynkoria/react-native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Native React Native SDK for Lynkoria: LiveKit calls and livestreams through native Android/iOS modules, plus messaging and push",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@lynkoria/client": "^0.
|
|
49
|
-
"@lynkoria/contracts": "^0.
|
|
48
|
+
"@lynkoria/client": "^0.2.0",
|
|
49
|
+
"@lynkoria/contracts": "^0.2.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@lynkoria/config": "0.0.0",
|