load()

load(props?: InstanceProperties)

Loads the room inside the iframe. Typically you need to invoke this method only once. The props param is optional.

The load() method is the delayed form of initialization - you first call createControl of the SDK and then you can load the room later based on your application needs.

circle-info

Read more about SDK initialization process in the DigitalSambaEmbedded class section

InstanceProperties signature

  • frameAttributes - list of attributes to be applied to the target iframe

  • reportErrors - boolean, false by default. Whether to report misconfiguration or runtime errors to console

Sample code -> it will put a 5px red border around the iframe (using the html style attribute):

const initOptions = {team: 'myTeamNameHere', room: 'myRoomNameHere'};
const sambaFrame = DigitalSambaEmbedded.createControl(initOptions);
//..................................................................

//Some time later load the room
sambaFrame.load({
  frameAttributes: {style: "border: 5px solid red"},
  reportErrors: false
});

Last updated