addTileAction()

addTileAction(name: string, properties: TileActionProperties, listener: function)

Adds a custom action to the 3-dots menu of the tiles. When the user clicks that custom menu item, then the callback listener function will be invoked.

circle-info

The first parameter "name" is just an internal identifier so you can remove the custom action later with the removeTileAction() method if it is needed.

circle-info

Valid tile scopes are 'remote', 'local', 'custom', 'screenshare-local' and 'screenshare-remote'. Remote means tiles of other (remote) users, while local means tile of local user. Custom is for custom tiles - see addCustomTile() method.

In the below example a send email action is added to all remote tiles.

const onSendEmailClicked = () => {
   console.log('Send Email callback called');
};

sambaFrame.addTileAction(
  'sendEmail', 
   {"label": 'Send Email', scope: 'remote'}, 
   onSendEmailClicked 
);
circle-info

This method is often used in conjunction with the removeTileAction() method.

Last updated