# Avaturn Live Integration Example

This example demonstrates how to integrate and use the `AvaturnHead` from the `@avaturn-live/web-sdk` package to display an avatar's video stream on a web page.

## Prerequisites

Before running the code, make sure you have a valid session token for Avaturn:

## Installation

```bash
npm install @avaturn-live/web-sdk
```

## Usage

1. Import the `AvaturnHead` class from the `@avaturn-live/web-sdk` package.

   ```typescript
   import { AvaturnHead } from "@avaturn-live/web-sdk";
   ```

2. Initialize the `AvaturnHead` instance with your session token.

   ```typescript
   const domElement = document.querySelector("#root");

   const avatar = new AvaturnHead(domElement, {
     sessionToken: "<YOUR_SESSION_TOKEN>",
   });
   ```

## HTML Structure

Ensure you have an HTML structure with a video element that has an `id` of `video`:

```html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Avaturn Head Example</title>
  </head>
  <body>
    <div id="root"></div>

    <!-- Include your bundled JavaScript here -->
  </body>
</html>
```
