@avaturn-live/web-sdk 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,16 +23,10 @@ npm install @avaturn-live/web-sdk
23
23
  2. Initialize the `AvaturnHead` instance with your session token.
24
24
 
25
25
  ```typescript
26
- const avatar = new AvaturnHead({ sessionToken: "<YOUR_SESSION_TOKEN>" });
27
- ```
28
-
29
- 3. Once the avatar is initialized, get a reference to the HTML video element where you want to display the avatar's video stream.
26
+ const domElement = document.querySelector("#root");
30
27
 
31
- ```typescript
32
- avatar.init().then(() => {
33
- const videoRef: HTMLVideoElement = document.querySelector("#video")!;
34
- videoRef.srcObject = avatar.mediaStream;
35
- videoRef.play();
28
+ const avatar = new AvaturnHead(domElement, {
29
+ sessionToken: "<YOUR_SESSION_TOKEN>",
36
30
  });
37
31
  ```
38
32
 
@@ -49,7 +43,7 @@ Ensure you have an HTML structure with a video element that has an `id` of `vide
49
43
  <title>Avaturn Head Example</title>
50
44
  </head>
51
45
  <body>
52
- <video id="video" autoplay></video>
46
+ <div id="root"></div>
53
47
 
54
48
  <!-- Include your bundled JavaScript here -->
55
49
  </body>
@@ -1,10 +1,4 @@
1
1
  {
2
- "src/extra.ts": {
3
- "file": "extra.cjs",
4
- "name": "extra",
5
- "src": "src/extra.ts",
6
- "isEntry": true
7
- },
8
2
  "src/main.ts": {
9
3
  "file": "main.cjs",
10
4
  "name": "main",