updateCustomTrayButtons()

updateCustomTrayButtons({ customButtonOne, customButtonTwo, ... })

Sets custom tray buttons in a Daily Prebuilt call according to the provided dictionary of custom buttons, analogous to how you would set customTrayButtons via DailyIframe properties. Along with adding new buttons, this allows you to change, replace, or remove existing buttons.

IMPORTANT: When calling this function the provided dictionary completely replaces the previous set of buttons. So if you only want to add a new button to an already existing set of buttons, you need to include any existing buttons as well.

ParameterTypeDescription
customButtonObjectHolds the config parameters for this particular custom button, including iconPath, iconPathDarkMode, label and tooltip. You can provide multiple custom button objects.

Here's an example of using updateCustomTrayButtons() to set two custom buttons at once. If customButtonOne already existed before, it will be updated with the new configuration. If customButtonTwo doesn't exist yet, it will be added. If any other buttons already existed before, not including those in the parameter again will implicitly remove them.