@healthcloudai/hc-patient-telehealth 0.0.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/README.md +62 -0
- package/dist/index.cjs +850 -0
- package/dist/index.d.cts +57 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +840 -0
- package/package.json +87 -0
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Healthcloud AI Patient Telehealth UI
|
|
2
|
+
|
|
3
|
+
React Native + Web UI component for patient telehealth video sessions.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @healthcloudai/hc-patient-telehealth \
|
|
9
|
+
@healthcloudai/hc-telehealth-connector \
|
|
10
|
+
@healthcloudai/hc-login-connector \
|
|
11
|
+
@healthcloudai/hc-http \
|
|
12
|
+
react-native-agora \
|
|
13
|
+
agora-rtc-sdk-ng
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { HCPatientTelehealth } from "@healthcloudai/hc-patient-telehealth";
|
|
20
|
+
import { HCTelehealthTokenClient } from "@healthcloudai/hc-telehealth-connector";
|
|
21
|
+
import { HCLoginClient } from "@healthcloudai/hc-login-connector";
|
|
22
|
+
import { HttpClient } from "@healthcloudai/hc-http";
|
|
23
|
+
|
|
24
|
+
const httpClient = new HttpClient();
|
|
25
|
+
const authClient = new HCLoginClient(/* auth configuration */);
|
|
26
|
+
const tokenClient = new HCTelehealthTokenClient(httpClient, authClient);
|
|
27
|
+
|
|
28
|
+
export default function Screen() {
|
|
29
|
+
return (
|
|
30
|
+
<HCPatientTelehealth
|
|
31
|
+
tokenClient={tokenClient}
|
|
32
|
+
autoJoin={true}
|
|
33
|
+
onError={(err) => console.error(err)}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Exports
|
|
40
|
+
|
|
41
|
+
- `HCPatientTelehealth` (default container)
|
|
42
|
+
- `VideoElement` (lower-level control)
|
|
43
|
+
- `VideoElementProps`
|
|
44
|
+
|
|
45
|
+
## Token Client
|
|
46
|
+
|
|
47
|
+
This package expects a `tokenClient` with:
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
type TelehealthTokenResponse = {
|
|
51
|
+
token: string;
|
|
52
|
+
appId: string;
|
|
53
|
+
channelName: string;
|
|
54
|
+
uid: number;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
type TelehealthTokenClient = {
|
|
58
|
+
connectToTokenServer: () => Promise<TelehealthTokenResponse>;
|
|
59
|
+
};
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The `@healthcloudai/hc-telehealth-connector` client already matches this shape.
|