Skip to main content
View as Markdown

Installation - Agentic Avatars SDK

Installation​

Install the Kaltura Avatar Client SDK to display avatars in your web application.

NPM Installation​

npm install @unisphere/models-sdk-js

Or using yarn:

yarn add @unisphere/models-sdk-js

Package Information​

Import​

ES6/TypeScript​

import { KalturaAvatarSession } from '@unisphere/models-sdk-js';

CommonJS​

const { KalturaAvatarSession } = require('@unisphere/models-sdk-js');

Requirements​

  • Node.js: 20.0 or above (for development)
  • Browser: Chrome 80+, Firefox 75+, Safari 14+, Edge 80+
  • WebRTC: Browser must support WebRTC

Verify Installation​

Create a simple test file:

import { KalturaAvatarSession } from '@unisphere/models-sdk-js';

console.log('SDK loaded successfully!');
console.log('KalturaAvatarSession:', typeof KalturaAvatarSession); // 'function'

TypeScript Configuration​

If using TypeScript, no additional type packages are needed. Types are included in the main package.

tsconfig.json​

{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"lib": ["ES2020", "DOM"],
"moduleResolution": "node",
"esModuleInterop": true
}
}

Browser Support Details​

BrowserVersionNotes
Chrome80+Full support
Edge80+Full support
Firefox75+Full support
Safari14+Requires getUserMedia prompts
Safari iOS14.3+Limited on older iOS versions
Chrome Android80+Full support

Next Steps​

Now that you have the SDK installed:

Troubleshooting​

Module not found error​

If you see Cannot find module '@unisphere/models-sdk-js':

  1. Verify installation: npm list @unisphere/models-sdk-js
  2. Clear cache: rm -rf node_modules package-lock.json && npm install
  3. Check your import path is correct

TypeScript errors​

If TypeScript can't find types:

  1. Verify node_modules/@unisphere/models-sdk-js exists
  2. Check your tsconfig.json includes "moduleResolution": "node"
  3. Try restarting your IDE/TypeScript server

Build errors​

If you get build errors:

  1. Ensure your bundler supports ES modules
  2. Check your target browser compatibility
  3. Update your bundler to the latest version

For more help, see the Troubleshooting Guide.