SDK

The Digital Samba Embedded SDK is distributed as a publicly available npm module.

For quick prototyping you can load it with a <script> tag from the unpkg public CDN:

<script crossorigin src="https://unpkg.com/@digitalsamba/embedded-sdk"></script>
const sambaFrame = DigitalSambaEmbedded.createControl({ url: YOUR_ROOM_URL });
sambaFrame.load();
npm install @digitalsamba/embedded-sdk

Usage with NPM

Add our SDK to the dependency list using your preferred package manager:

npm install @digitalsamba/embedded-sdk

or

yarn install @digitalsamba/embedded-sdk

After installation, use it in your application code by doing the following:

import DigitalSambaEmbedded from '@digitalsamba/embedded-sdk';
const sambaFrame = DigitalSambaEmbedded.createControl({ url: YOUR_ROOM_URL });
sambaFrame.load();

For detailed documentation on the initialization process, read about the DigitalSambaEmbedded class and the initialization code examples.

Make sure to browse through the available Methods and Events of the SDK.

The SDK is written in TypeScript, so type definitions are also available:

import { SendMessageType, ReceiveMessageType /* ...etc */ } from '@digitalsamba/embedded-sdk';

Last updated