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
- Package: @unisphere/models-sdk-js
- License: AGPL-3.0
- TypeScript: Full type definitions included
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
| Browser | Version | Notes |
|---|---|---|
| Chrome | 80+ | Full support |
| Edge | 80+ | Full support |
| Firefox | 75+ | Full support |
| Safari | 14+ | Requires getUserMedia prompts |
| Safari iOS | 14.3+ | Limited on older iOS versions |
| Chrome Android | 80+ | Full support |
Next Steps
Now that you have the SDK installed:
- Basic Usage - Learn how to use the SDK
- API Reference - Complete method documentation
- Quick Start Guide - Get running in 5 minutes
Troubleshooting
Module not found error
If you see Cannot find module '@unisphere/models-sdk-js':
- Verify installation:
npm list @unisphere/models-sdk-js - Clear cache:
rm -rf node_modules package-lock.json && npm install - Check your import path is correct
TypeScript errors
If TypeScript can't find types:
- Verify
node_modules/@unisphere/models-sdk-jsexists - Check your
tsconfig.jsonincludes"moduleResolution": "node" - Try restarting your IDE/TypeScript server
Build errors
If you get build errors:
- Ensure your bundler supports ES modules
- Check your target browser compatibility
- Update your bundler to the latest version
For more help, see the Troubleshooting Guide.