UNPKG

@charisma-ai/react

Version:
32 lines (31 loc) 1.27 kB
import React from "react"; import { Playthrough as PlaythroughClass, ConnectionStatus } from "@charisma-ai/sdk"; export interface UsePlaythroughOptions { playthroughToken?: string; charismaUrl?: string; autoconnect?: boolean; onConnectionStatus?: (connectionStatus: ConnectionStatus) => void; onError?: (error: any) => void; onProblem?: (problem: { code: string; error: string; }) => void; } export declare const usePlaythrough: ({ playthroughToken, charismaUrl, autoconnect, onConnectionStatus, onError, onProblem, }: UsePlaythroughOptions) => { connectionStatus: ConnectionStatus; playthrough: PlaythroughClass | undefined; playthroughToken: string | undefined; playerSessionId: string | undefined; }; interface PlaythroughContextType { connectionStatus: ConnectionStatus; playthrough: PlaythroughClass | undefined; playthroughToken: string | undefined; playerSessionId: string | undefined; } export interface PlaythroughProps extends UsePlaythroughOptions { children: React.ReactNode; } export declare const Playthrough: ({ children, ...props }: PlaythroughProps) => React.JSX.Element; export declare const usePlaythroughContext: () => PlaythroughContextType | undefined; export {};