@healthcloudai/hc-patient-telehealth
v0.0.3
Published
Healthcheck Healthservice SDK with TypeScript
Downloads
27
Maintainers
Readme
Healthcloud AI Patient Telehealth UI
React Native + Web UI component for patient telehealth video sessions.
Installation
npm install @healthcloudai/hc-patient-telehealth \
@healthcloudai/hc-telehealth-connector \
@healthcloudai/hc-login-connector \
@healthcloudai/hc-http \
react-native-agora \
agora-rtc-sdk-ngUsage
import { HCPatientTelehealth } from "@healthcloudai/hc-patient-telehealth";
import { HCTelehealthTokenClient } from "@healthcloudai/hc-telehealth-connector";
import { HCLoginClient } from "@healthcloudai/hc-login-connector";
import { HttpClient } from "@healthcloudai/hc-http";
const httpClient = new HttpClient();
const authClient = new HCLoginClient(/* auth configuration */);
const tokenClient = new HCTelehealthTokenClient(httpClient, authClient);
export default function Screen() {
return (
<HCPatientTelehealth
tokenClient={tokenClient}
autoJoin={true}
onError={(err) => console.error(err)}
/>
);
}Exports
HCPatientTelehealth(default container)VideoElement(lower-level control)VideoElementProps
Token Client
This package expects a tokenClient with:
type TelehealthTokenResponse = {
token: string;
appId: string;
channelName: string;
uid: number;
};
type TelehealthTokenClient = {
connectToTokenServer: () => Promise<TelehealthTokenResponse>;
};The @healthcloudai/hc-telehealth-connector client already matches this shape.
