Methods
Sample quick-start code:
const initOptions = {team: 'myTeamNameHere', room: 'myRoomNameHere'};
const sambaFrame = DigitalSambaEmbedded.createControl(initOptions);
sambaFrame.on('userJoined', (event) => {
const data = event.data;
if (data.type === 'local') {
console.log('You have joined the room');
//You can freely call methods from now on, since user is inside the room
//For example you can hide the toolbar if you want
sambaFrame.hideToolbar();
} else {
console.log(data.user.name, 'has joined the room');
}
});
//Load the room when you need according to your application logic
sambaFrame.load();Last updated