0.3.0 • Published 5 months ago

@avaturn-live/web-sdk v0.3.0

Weekly downloads
-
License
-
Repository
github
Last release
5 months ago

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

npm install @avaturn-live/web-sdk

Usage

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

    import { AvaturnHead } from "@avaturn-live/web-sdk";
  2. Initialize the AvaturnHead instance with your session token.

    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:

<!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>
0.1.0

10 months ago

0.3.0

5 months ago

0.2.1

5 months ago

0.1.2

10 months ago

0.2.0

5 months ago

0.1.1

10 months ago

0.1.8

9 months ago

0.1.7

9 months ago

0.1.9

6 months ago

0.1.4

10 months ago

0.1.3

10 months ago

0.1.6

9 months ago

0.1.5

10 months ago

0.0.20

1 year ago

0.0.21

1 year ago

0.0.22

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago