removeUICallback(event: string, callback: function)

Removes an already registered UI callback function.

In the below example the leave session callback is removed at some point later:

const leaveSessionCallback = () => {
   console.log('Custom leave session logic called');
   if (confirm('Are you sure you want to leave the session?')) {

sambaFrame.addUICallback('leaveSession', leaveSessionCallback);

//At some point later:
sambaFrame.removeUICallback('leaveSession', leaveSessionCallback);

This method is often used in conjunction with the addUICallback method.

Last updated