once()
once(event: string, callback: function)
Subscribes to an event using a one-time callback function. The crucial difference to on() is that once the callback is invoked , then it won't be invoked anymore.
Sample subscription code
sambaFrame.once('audioEnabled', (event) => {
console.log('This will be printed only once even if user enables audio 5 times');
});
Last updated