Add toolbox button to switch video and audio input

Hi,
I’m trying to add two buttons in JitsiMeet toolbox (one to change video input and one to change audio input).
I had the buttons, and i can show device list, but i could not found how to change the device.
Here are the buttons :

To set the audio device, I use setAudioInputDevice from modules/API/external/functions with transport :
this._transport = new Transport({
backend: new PostMessageTransportBackend({ })
});

What is the good way to make my buttons work ?

Thank for the help.