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>
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();
For production integrations it is recommended to use npm and a bundler like webpack.
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();
The SDK is written in TypeScript, so type definitions are also available:
import { SendMessageType, ReceiveMessageType /* ...etc */ } from '@digitalsamba/embedded-sdk';
Last updated