# Depth Aicontext

TypeScript source: `components/DepthAIContext.tsx`

## Types

### DepthAIEntrypointProps

Source: `components/DepthAIContext.tsx:12`

```ts
{ activeServices?: DAIService[]; children?: React.ReactNode; messageHandlerVersion?: MessageHandlerVersion; tokenRefresh?: TokenRefreshHandler; visualizerRuntimeConfig?: Readonly<RuntimeConfig>; withDebugLogs?: boolean } & DataProviderProps
```

Props for the top-level DepthAI context provider.

#### Members

| Name | Type | Description |
| --- | --- | --- |
| `activeServices?` | `DAIService[]` | DepthAI service names that should be polled while the connection is alive. |
| `children?` | `React.ReactNode` | React tree that consumes the connection, data, and visualizer runtime contexts. |
| `messageHandlerVersion?` | `MessageHandlerVersion` | Selects the backend message handling protocol expected by the visualizer
connection. |
| `tokenRefresh?` | `TokenRefreshHandler` | Controls how refreshed WebRTC tokens are propagated back to the host application. |
| `visualizerRuntimeConfig?` | `Readonly<RuntimeConfig>` | Initial runtime configuration used by visualizer panels and stream
decoding. |
| `withDebugLogs?` | `boolean` | Enables debug logging for the shared DepthAI connection stack. |

## Functions

### DepthAIContext

Source: `components/DepthAIContext.tsx:42`

```ts
(props: Readonly<DepthAIEntrypointProps>) => Element
```

Composes the common DepthAI data, connection, and visualizer runtime providers.

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `props` | `Readonly<DepthAIEntrypointProps>` |  |
