Jak automaticky ztlumit mikrofon na BRB Scene v Obs Studio
Tento příklad skriptu poslouchá, když měníte scény v OBS Studiu a u konkrétních názvů scén ztlumí nebo zruší ztlumení mikrofonu.
Příklad skriptu
import com.squiso.*;
import com.squiso.exception.*;
import com.squiso.scripting.*;
import com.squiso.scripting.data.*;
import com.squiso.keyboard.*;
import com.squiso.twitch.*;
import com.squiso.datatypes.*;
import com.squiso.utils.*;
import com.squiso.sysinfo.*;
// Important - Please do not change the row below - otherwise you will get a compilation error!
public class Script_Example extends SquisoScript {
    
    // The name of the microphone we should mute and unmute
    SquisoString inputName = new SquisoString("Mic/Aux");
    @Override
    public void onOBSSceneChanged(OnOBSSceneChangedData data, API api) throws SquisoException {
        // If the new scene is "BRB"
        if (data.getSceneName().equals("BRB")) {
            // Mute the microphone
            api.setOBSInputMuted(inputName, true);
        }
        // If the new scene is "Gaming"
        if (data.getSceneName().equals("Gaming")) {
            // Unmute the microphone
            api.setOBSInputMuted(inputName, false);
        }
    }
}