essential-actions
Clone or download
Modified Files
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/target/classes" />
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.stream_pi:util:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:util:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:actionapi:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:action-api:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
</component>
</component>
</module>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.stream-pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_setcurrentprofileaction</artifactId>
<artifactId>obssuite_setcurrentprofileaction</artifactId>
<version>1.0.0</version>
<version>1.0.0</version>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.0</version>
<executions>
<executions>
<execution>
<execution>
<id>test-jar</id>
<id>test-jar</id>
<phase>package</phase>
<phase>package</phase>
<goals>
<goals>
<goal>test-jar</goal>
<goal>test-jar</goal>
</goals>
</goals>
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.8.1</version>
<configuration>
<configuration>
<release>11</release>
<release>11</release>
</configuration>
</configuration>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
<properties>
<properties>
<ActionAPIVersion>1.0.0</ActionAPIVersion>
<ActionAPIVersion>1.0.0-SNAPSHOT</ActionAPIVersion>
<UtilVersion>1.0.0</UtilVersion>
<UtilVersion>1.0.0-SNAPSHOT</UtilVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>util</artifactId>
<artifactId>util</artifactId>
<version>${UtilVersion}</version>
<version>${UtilVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>actionapi</artifactId>
<artifactId>action-api</artifactId>
<version>${ActionAPIVersion}</version>
<version>${ActionAPIVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_motheraction</artifactId>
<artifactId>obssuite_motheraction</artifactId>
<version>${OBSSuiteMotherVersion}</version>
<version>${OBSSuiteMotherVersion}</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
module com.stream_pi.obssuite.setcurrentprofileaction
module com.stream_pi.obssuite.setcurrentprofileaction
{
{
requires com.stream_pi.actionapi;
requires com.stream_pi.action_api;
requires com.stream_pi.util;
requires com.stream_pi.util;
requires com.stream_pi.obssuite.motheraction;
requires com.stream_pi.obssuite.motheraction;
provides com.stream_pi.actionapi.normalaction.NormalAction with setcurrentprofile.SetCurrentProfile;
provides com.stream_pi.action_api.normalaction.NormalAction with setcurrentprofile.SetCurrentProfile;
}
}
package setcurrentprofile;
package setcurrentprofile;
import com.stream_pi.actionapi.actionproperty.property.Property;
import com.stream_pi.action_api.actionproperty.property.Property;
import com.stream_pi.actionapi.actionproperty.property.Type;
import com.stream_pi.action_api.actionproperty.property.Type;
import com.stream_pi.actionapi.normalaction.NormalAction;
import com.stream_pi.action_api.normalaction.NormalAction;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.version.Version;
import com.stream_pi.util.version.Version;
import mother.motherconnection.MotherConnection;
import mother.motherconnection.MotherConnection;
import net.twasi.obsremotejava.OBSRemoteController;
import net.twasi.obsremotejava.OBSRemoteController;
public class SetCurrentProfile extends NormalAction
public class SetCurrentProfile extends NormalAction
{
{
public SetCurrentProfile() {
public SetCurrentProfile() {
setName("Set Current Profile");
setName("Set Current Profile");
setCategory("OBS");
setCategory("OBS");
setVisibilityInServerSettingsPane(false);
setVisibilityInServerSettingsPane(false);
setAuthor("rnayabed");
setAuthor("rnayabed");
setVersion(new Version(1, 0, 0));
setVersion(new Version(1, 0, 0));
}
}
@Override
@Override
public void initProperties() throws Exception {
public void initProperties() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
Property currentProfileProperty = new Property("current_profile", Type.STRING);
Property currentProfileProperty = new Property("current_profile", Type.STRING);
currentProfileProperty.setDisplayName("Profile Name");
currentProfileProperty.setDisplayName("Profile Name");
addClientProperties(currentProfileProperty);
addClientProperties(currentProfileProperty);
}
}
@Override
@Override
public void initAction() throws Exception {
public void initAction() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
@Override
@Override
public void onActionClicked() throws Exception {
public void onActionClicked() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
OBSRemoteController controller = MotherConnection.getRemoteController();
OBSRemoteController controller = MotherConnection.getRemoteController();
if (controller == null) {
if (controller == null) {
new StreamPiAlert("Is OBS Connected?",
new StreamPiAlert("Is OBS Connected?",
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
.show();
.show();
} else {
} else {
controller.setCurrentProfile(getClientProperties().getSingleProperty("current_profile").getStringValue(), MotherConnection.getDefaultCallBack(
controller.setCurrentProfile(getClientProperties().getSingleProperty("current_profile").getStringValue(), MotherConnection.getDefaultCallBack(
"Unable to Set Current Profile","Failed to set current profile"
"Unable to Set Current Profile","Failed to set current profile"
));
));
}
}
}
}
@Override
@Override
public void onShutDown() throws Exception {
public void onShutDown() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/target/classes" />
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.stream_pi:util:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:util:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:actionapi:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:action-api:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:15" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:15" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
</component>
</component>
</module>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_setcurrentsceneaction</artifactId>
<artifactId>obssuite_setcurrentsceneaction</artifactId>
<version>1.0.0</version>
<version>1.0.0</version>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.0</version>
<executions>
<executions>
<execution>
<execution>
<id>test-jar</id>
<id>test-jar</id>
<phase>package</phase>
<phase>package</phase>
<goals>
<goals>
<goal>test-jar</goal>
<goal>test-jar</goal>
</goals>
</goals>
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.8.1</version>
<configuration>
<configuration>
<release>11</release>
<release>11</release>
</configuration>
</configuration>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
<properties>
<properties>
<ActionAPIVersion>1.0.0</ActionAPIVersion>
<ActionAPIVersion>1.0.0-SNAPSHOT</ActionAPIVersion>
<UtilVersion>1.0.0</UtilVersion>
<UtilVersion>1.0.0-SNAPSHOT</UtilVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>util</artifactId>
<artifactId>util</artifactId>
<version>${UtilVersion}</version>
<version>${UtilVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>actionapi</artifactId>
<artifactId>action-api</artifactId>
<version>${ActionAPIVersion}</version>
<version>${ActionAPIVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_motheraction</artifactId>
<artifactId>obssuite_motheraction</artifactId>
<version>${OBSSuiteMotherVersion}</version>
<version>${OBSSuiteMotherVersion}</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
module com.stream_pi.obssuite.setcurrentsceneaction
module com.stream_pi.obssuite.setcurrentsceneaction
{
{
requires com.stream_pi.actionapi;
requires com.stream_pi.action_api;
requires com.stream_pi.util;
requires com.stream_pi.util;
requires obs.websocket.java;
requires obs.websocket.java;
requires com.stream_pi.obssuite.motheraction;
requires com.stream_pi.obssuite.motheraction;
provides com.stream_pi.actionapi.normalaction.NormalAction with setcurrentscene.SetCurrentScene;
provides com.stream_pi.action_api.normalaction.NormalAction with setcurrentscene.SetCurrentScene;
}
}
package setcurrentscene;
package setcurrentscene;
import com.stream_pi.actionapi.actionproperty.property.Property;
import com.stream_pi.action_api.actionproperty.property.Property;
import com.stream_pi.actionapi.actionproperty.property.Type;
import com.stream_pi.action_api.actionproperty.property.Type;
import com.stream_pi.actionapi.normalaction.NormalAction;
import com.stream_pi.action_api.normalaction.NormalAction;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.version.Version;
import com.stream_pi.util.version.Version;
import mother.motherconnection.MotherConnection;
import mother.motherconnection.MotherConnection;
import net.twasi.obsremotejava.OBSRemoteController;
import net.twasi.obsremotejava.OBSRemoteController;
public class SetCurrentScene extends NormalAction {
public class SetCurrentScene extends NormalAction {
public SetCurrentScene() {
public SetCurrentScene() {
setName("Set Current Scene");
setName("Set Current Scene");
setCategory("OBS");
setCategory("OBS");
setVisibilityInServerSettingsPane(false);
setVisibilityInServerSettingsPane(false);
setAuthor("rnayabed");
setAuthor("rnayabed");
setVersion(new Version(1, 0, 0));
setVersion(new Version(1, 0, 0));
}
}
@Override
@Override
public void initProperties() throws Exception {
public void initProperties() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
Property currentSceneProperty = new Property("current_scene", Type.STRING);
Property currentSceneProperty = new Property("current_scene", Type.STRING);
currentSceneProperty.setDisplayName("Scene Name");
currentSceneProperty.setDisplayName("Scene Name");
addClientProperties(currentSceneProperty);
addClientProperties(currentSceneProperty);
}
}
@Override
@Override
public void initAction() throws Exception {
public void initAction() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
@Override
@Override
public void onActionClicked() throws Exception {
public void onActionClicked() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
OBSRemoteController controller = MotherConnection.getRemoteController();
OBSRemoteController controller = MotherConnection.getRemoteController();
if (controller == null) {
if (controller == null) {
new StreamPiAlert("Is OBS Connected?",
new StreamPiAlert("Is OBS Connected?",
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
.show();
.show();
} else {
} else {
controller.setCurrentScene(getClientProperties().getSingleProperty("current_scene").getStringValue(), MotherConnection.getDefaultCallBack(
controller.setCurrentScene(getClientProperties().getSingleProperty("current_scene").getStringValue(), MotherConnection.getDefaultCallBack(
"Unable to Set Current Scene","Failed to set current Scene"
"Unable to Set Current Scene","Failed to set current Scene"
));
));
}
}
}
}
@Override
@Override
public void onShutDown() throws Exception {
public void onShutDown() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_setcurrenttransitionaction</artifactId>
<artifactId>obssuite_setcurrenttransitionaction</artifactId>
<version>1.0.0</version>
<version>1.0.0</version>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.0</version>
<executions>
<executions>
<execution>
<execution>
<id>test-jar</id>
<id>test-jar</id>
<phase>package</phase>
<phase>package</phase>
<goals>
<goals>
<goal>test-jar</goal>
<goal>test-jar</goal>
</goals>
</goals>
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.8.1</version>
<configuration>
<configuration>
<release>11</release>
<release>11</release>
</configuration>
</configuration>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
<properties>
<properties>
<ActionAPIVersion>1.0.0</ActionAPIVersion>
<ActionAPIVersion>1.0.0-SNAPSHOT</ActionAPIVersion>
<UtilVersion>1.0.0</UtilVersion>
<UtilVersion>1.0.0-SNAPSHOT</UtilVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>util</artifactId>
<artifactId>util</artifactId>
<version>${UtilVersion}</version>
<version>${UtilVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>actionapi</artifactId>
<artifactId>action-api</artifactId>
<version>${ActionAPIVersion}</version>
<version>${ActionAPIVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_motheraction</artifactId>
<artifactId>obssuite_motheraction</artifactId>
<version>${OBSSuiteMotherVersion}</version>
<version>${OBSSuiteMotherVersion}</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
module com.stream_pi.obssuite.setcurrenttransition
module com.stream_pi.obssuite.setcurrenttransition
{
{
requires com.stream_pi.actionapi;
requires com.stream_pi.action_api;
requires com.stream_pi.util;
requires com.stream_pi.util;
requires obs.websocket.java;
requires obs.websocket.java;
requires com.stream_pi.obssuite.motheraction;
requires com.stream_pi.obssuite.motheraction;
provides com.stream_pi.actionapi.normalaction.NormalAction with setcurrenttransition.SetCurrentTransition;
provides com.stream_pi.action_api.normalaction.NormalAction with setcurrenttransition.SetCurrentTransition;
}
}
package setcurrenttransition;
package setcurrenttransition;
import com.stream_pi.actionapi.actionproperty.property.Property;
import com.stream_pi.action_api.actionproperty.property.Property;
import com.stream_pi.actionapi.actionproperty.property.Type;
import com.stream_pi.action_api.actionproperty.property.Type;
import com.stream_pi.actionapi.normalaction.NormalAction;
import com.stream_pi.action_api.normalaction.NormalAction;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.version.Version;
import com.stream_pi.util.version.Version;
import mother.motherconnection.MotherConnection;
import mother.motherconnection.MotherConnection;
import net.twasi.obsremotejava.OBSRemoteController;
import net.twasi.obsremotejava.OBSRemoteController;
public class SetCurrentTransition extends NormalAction {
public class SetCurrentTransition extends NormalAction {
public SetCurrentTransition() {
public SetCurrentTransition() {
setName("Set Current Transition");
setName("Set Current Transition");
setCategory("OBS");
setCategory("OBS");
setVisibilityInServerSettingsPane(false);
setVisibilityInServerSettingsPane(false);
setAuthor("rnayabed");
setAuthor("rnayabed");
setVersion(new Version(1, 0, 0));
setVersion(new Version(1, 0, 0));
}
}
@Override
@Override
public void initProperties() throws Exception {
public void initProperties() throws Exception {
Property currentTransitionProperty = new Property("current_transition", Type.STRING);
Property currentTransitionProperty = new Property("current_transition", Type.STRING);
currentTransitionProperty.setDisplayName("Transition Name");
currentTransitionProperty.setDisplayName("Transition Name");
addClientProperties(currentTransitionProperty);
addClientProperties(currentTransitionProperty);
}
}
@Override
@Override
public void initAction() throws Exception {
public void initAction() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
@Override
@Override
public void onActionClicked() throws Exception {
public void onActionClicked() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
OBSRemoteController controller = MotherConnection.getRemoteController();
OBSRemoteController controller = MotherConnection.getRemoteController();
if (controller == null) {
if (controller == null) {
new StreamPiAlert("Is OBS Connected?",
new StreamPiAlert("Is OBS Connected?",
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
.show();
.show();
} else {
} else {
controller.setCurrentTransition(getClientProperties().getSingleProperty("current_transition").getStringValue(), MotherConnection.getDefaultCallBack(
controller.setCurrentTransition(getClientProperties().getSingleProperty("current_transition").getStringValue(), MotherConnection.getDefaultCallBack(
"Unable to Set Current Transition","Failed to set current Transition"
"Unable to Set Current Transition","Failed to set current Transition"
));
));
}
}
}
}
@Override
@Override
public void onShutDown() throws Exception {
public void onShutDown() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/target/classes" />
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.stream_pi:util:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:util:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:actionapi:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:action-api:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:15" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:15" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
</component>
</component>
</module>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_setmuteaction</artifactId>
<artifactId>obssuite_setmuteaction</artifactId>
<version>1.0.0</version>
<version>1.0.0</version>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.0</version>
<executions>
<executions>
<execution>
<execution>
<id>test-jar</id>
<id>test-jar</id>
<phase>package</phase>
<phase>package</phase>
<goals>
<goals>
<goal>test-jar</goal>
<goal>test-jar</goal>
</goals>
</goals>
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.8.1</version>
<configuration>
<configuration>
<release>11</release>
<release>11</release>
</configuration>
</configuration>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
<properties>
<properties>
<ActionAPIVersion>1.0.0</ActionAPIVersion>
<ActionAPIVersion>1.0.0-SNAPSHOT</ActionAPIVersion>
<UtilVersion>1.0.0</UtilVersion>
<UtilVersion>1.0.0-SNAPSHOT</UtilVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>util</artifactId>
<artifactId>util</artifactId>
<version>${UtilVersion}</version>
<version>${UtilVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>actionapi</artifactId>
<artifactId>action-api</artifactId>
<version>${ActionAPIVersion}</version>
<version>${ActionAPIVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_motheraction</artifactId>
<artifactId>obssuite_motheraction</artifactId>
<version>${OBSSuiteMotherVersion}</version>
<version>${OBSSuiteMotherVersion}</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
module com.stream_pi.obssuite.setmuteaction
module com.stream_pi.obssuite.setmuteaction
{
{
requires com.stream_pi.actionapi;
requires com.stream_pi.action_api;
requires com.stream_pi.util;
requires com.stream_pi.util;
requires obs.websocket.java;
requires obs.websocket.java;
requires com.stream_pi.obssuite.motheraction;
requires com.stream_pi.obssuite.motheraction;
provides com.stream_pi.actionapi.normalaction.NormalAction with setmute.SetMute;
provides com.stream_pi.action_api.normalaction.NormalAction with setmute.SetMute;
}
}
package setmute;
package setmute;
import com.stream_pi.actionapi.actionproperty.property.Property;
import com.stream_pi.action_api.actionproperty.property.Property;
import com.stream_pi.actionapi.actionproperty.property.Type;
import com.stream_pi.action_api.actionproperty.property.Type;
import com.stream_pi.actionapi.normalaction.NormalAction;
import com.stream_pi.action_api.normalaction.NormalAction;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.version.Version;
import com.stream_pi.util.version.Version;
import mother.motherconnection.MotherConnection;
import mother.motherconnection.MotherConnection;
import net.twasi.obsremotejava.OBSRemoteController;
import net.twasi.obsremotejava.OBSRemoteController;
public class SetMute extends NormalAction {
public class SetMute extends NormalAction {
public SetMute() {
public SetMute() {
setName("Set Mute");
setName("Set Mute");
setCategory("OBS");
setCategory("OBS");
setVisibilityInServerSettingsPane(false);
setVisibilityInServerSettingsPane(false);
setAuthor("rnayabed");
setAuthor("rnayabed");
setVersion(new Version(1, 0, 0));
setVersion(new Version(1, 0, 0));
}
}
@Override
@Override
public void initProperties() throws Exception {
public void initProperties() throws Exception {
Property sourceProperty = new Property("source", Type.STRING);
Property sourceProperty = new Property("source", Type.STRING);
sourceProperty.setDisplayName("Source");
sourceProperty.setDisplayName("Source");
Property isMuteProperty = new Property("mute", Type.BOOLEAN);
Property isMuteProperty = new Property("mute", Type.BOOLEAN);
isMuteProperty.setDisplayName("Mute");
isMuteProperty.setDisplayName("Mute");
addClientProperties(sourceProperty,isMuteProperty);
addClientProperties(sourceProperty,isMuteProperty);
}
}
@Override
@Override
public void initAction() throws Exception {
public void initAction() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
@Override
@Override
public void onActionClicked() throws Exception {
public void onActionClicked() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
OBSRemoteController controller = MotherConnection.getRemoteController();
OBSRemoteController controller = MotherConnection.getRemoteController();
if (controller == null) {
if (controller == null) {
new StreamPiAlert("Is OBS Connected?",
new StreamPiAlert("Is OBS Connected?",
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
.show();
.show();
} else {
} else {
controller.setMute(getClientProperties().getSingleProperty("source").getStringValue(), getClientProperties().getSingleProperty("mute").getBoolValue(), MotherConnection.getDefaultCallBack(
controller.setMute(getClientProperties().getSingleProperty("source").getStringValue(), getClientProperties().getSingleProperty("mute").getBoolValue(), MotherConnection.getDefaultCallBack(
"Failed to mute source","Failed to do that"
"Failed to mute source","Failed to do that"
));
));
}
}
}
}
@Override
@Override
public void onShutDown() throws Exception {
public void onShutDown() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/target/classes" />
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.stream_pi:util:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:util:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:actionapi:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:action-api:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:15" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:15" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
</component>
</component>
</module>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_setpreviewsceneaction</artifactId>
<artifactId>obssuite_setpreviewsceneaction</artifactId>
<version>1.0.0</version>
<version>1.0.0</version>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.0</version>
<executions>
<executions>
<execution>
<execution>
<id>test-jar</id>
<id>test-jar</id>
<phase>package</phase>
<phase>package</phase>
<goals>
<goals>
<goal>test-jar</goal>
<goal>test-jar</goal>
</goals>
</goals>
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.8.1</version>
<configuration>
<configuration>
<release>11</release>
<release>11</release>
</configuration>
</configuration>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
<properties>
<properties>
<ActionAPIVersion>1.0.0</ActionAPIVersion>
<ActionAPIVersion>1.0.0-SNAPSHOT</ActionAPIVersion>
<UtilVersion>1.0.0</UtilVersion>
<UtilVersion>1.0.0-SNAPSHOT</UtilVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>util</artifactId>
<artifactId>util</artifactId>
<version>${UtilVersion}</version>
<version>${UtilVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>actionapi</artifactId>
<artifactId>action-api</artifactId>
<version>${ActionAPIVersion}</version>
<version>${ActionAPIVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_motheraction</artifactId>
<artifactId>obssuite_motheraction</artifactId>
<version>${OBSSuiteMotherVersion}</version>
<version>${OBSSuiteMotherVersion}</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
module com.stream_pi.obssuite.setpreviewsceneaction
module com.stream_pi.obssuite.setpreviewsceneaction
{
{
requires com.stream_pi.actionapi;
requires com.stream_pi.action_api;
requires com.stream_pi.util;
requires com.stream_pi.util;
requires obs.websocket.java;
requires obs.websocket.java;
requires com.stream_pi.obssuite.motheraction;
requires com.stream_pi.obssuite.motheraction;
provides com.stream_pi.actionapi.normalaction.NormalAction with setpreviewscene.SetPreviewScene;
provides com.stream_pi.action_api.normalaction.NormalAction with setpreviewscene.SetPreviewScene;
}
}
package setpreviewscene;
package setpreviewscene;
import com.stream_pi.actionapi.actionproperty.property.Property;
import com.stream_pi.action_api.actionproperty.property.Property;
import com.stream_pi.actionapi.actionproperty.property.Type;
import com.stream_pi.action_api.actionproperty.property.Type;
import com.stream_pi.actionapi.normalaction.NormalAction;
import com.stream_pi.action_api.normalaction.NormalAction;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.version.Version;
import com.stream_pi.util.version.Version;
import mother.motherconnection.MotherConnection;
import mother.motherconnection.MotherConnection;
import net.twasi.obsremotejava.OBSRemoteController;
import net.twasi.obsremotejava.OBSRemoteController;
public class SetPreviewScene extends NormalAction {
public class SetPreviewScene extends NormalAction {
public SetPreviewScene() {
public SetPreviewScene() {
setName("Set Preview Scene");
setName("Set Preview Scene");
setCategory("OBS");
setCategory("OBS");
setVisibilityInServerSettingsPane(false);
setVisibilityInServerSettingsPane(false);
setAuthor("rnayabed");
setAuthor("rnayabed");
setVersion(new Version(1, 0, 0));
setVersion(new Version(1, 0, 0));
}
}
@Override
@Override
public void initProperties() throws Exception {
public void initProperties() throws Exception {
Property previewSceneProperty = new Property("preview_scene", Type.STRING);
Property previewSceneProperty = new Property("preview_scene", Type.STRING);
previewSceneProperty.setDisplayName("Preview Scene");
previewSceneProperty.setDisplayName("Preview Scene");
addClientProperties(previewSceneProperty);
addClientProperties(previewSceneProperty);
}
}
@Override
@Override
public void initAction() throws Exception {
public void initAction() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
@Override
@Override
public void onActionClicked() throws Exception {
public void onActionClicked() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
OBSRemoteController controller = MotherConnection.getRemoteController();
OBSRemoteController controller = MotherConnection.getRemoteController();
if (controller == null) {
if (controller == null) {
new StreamPiAlert("Is OBS Connected?",
new StreamPiAlert("Is OBS Connected?",
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
.show();
.show();
} else {
} else {
controller.setPreviewScene(getClientProperties().getSingleProperty("preview_scene").getStringValue(), MotherConnection.getDefaultCallBack(
controller.setPreviewScene(getClientProperties().getSingleProperty("preview_scene").getStringValue(), MotherConnection.getDefaultCallBack(
"Failed to set preview scene","Failed to do that"
"Failed to set preview scene","Failed to do that"
));
));
}
}
}
}
@Override
@Override
public void onShutDown() throws Exception {
public void onShutDown() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/target/classes" />
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.stream_pi:util:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:util:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:actionapi:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:action-api:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:15" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:15" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
</component>
</component>
</module>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_setrecordingaction</artifactId>
<artifactId>obssuite_setrecordingaction</artifactId>
<version>1.0.0</version>
<version>1.0.0</version>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.0</version>
<executions>
<executions>
<execution>
<execution>
<id>test-jar</id>
<id>test-jar</id>
<phase>package</phase>
<phase>package</phase>
<goals>
<goals>
<goal>test-jar</goal>
<goal>test-jar</goal>
</goals>
</goals>
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.8.1</version>
<configuration>
<configuration>
<release>11</release>
<release>11</release>
</configuration>
</configuration>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
<properties>
<properties>
<ActionAPIVersion>1.0.0</ActionAPIVersion>
<ActionAPIVersion>1.0.0-SNAPSHOT</ActionAPIVersion>
<UtilVersion>1.0.0</UtilVersion>
<UtilVersion>1.0.0-SNAPSHOT</UtilVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>util</artifactId>
<artifactId>util</artifactId>
<version>${UtilVersion}</version>
<version>${UtilVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>actionapi</artifactId>
<artifactId>action-api</artifactId>
<version>${ActionAPIVersion}</version>
<version>${ActionAPIVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_motheraction</artifactId>
<artifactId>obssuite_motheraction</artifactId>
<version>${OBSSuiteMotherVersion}</version>
<version>${OBSSuiteMotherVersion}</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
module com.stream_pi.obssuite.setrecordingaction
module com.stream_pi.obssuite.setrecordingaction
{
{
requires com.stream_pi.actionapi;
requires com.stream_pi.action_api;
requires com.stream_pi.util;
requires com.stream_pi.util;
requires obs.websocket.java;
requires obs.websocket.java;
requires com.stream_pi.obssuite.motheraction;
requires com.stream_pi.obssuite.motheraction;
provides com.stream_pi.actionapi.normalaction.NormalAction with setrecording.SetRecording;
provides com.stream_pi.action_api.normalaction.NormalAction with setrecording.SetRecording;
}
}
package setrecording;
package setrecording;
import java.util.ArrayList;
import java.util.ArrayList;
import com.stream_pi.actionapi.actionproperty.property.Property;
import com.stream_pi.action_api.actionproperty.property.Property;
import com.stream_pi.actionapi.actionproperty.property.Type;
import com.stream_pi.action_api.actionproperty.property.Type;
import com.stream_pi.actionapi.normalaction.NormalAction;
import com.stream_pi.action_api.normalaction.NormalAction;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.version.Version;
import com.stream_pi.util.version.Version;
import mother.motherconnection.MotherConnection;
import mother.motherconnection.MotherConnection;
import net.twasi.obsremotejava.OBSRemoteController;
import net.twasi.obsremotejava.OBSRemoteController;
public class SetRecording extends NormalAction {
public class SetRecording extends NormalAction {
public SetRecording() {
public SetRecording() {
setName("Set Recording");
setName("Set Recording");
setCategory("OBS");
setCategory("OBS");
setVisibilityInServerSettingsPane(false);
setVisibilityInServerSettingsPane(false);
setAuthor("rnayabed");
setAuthor("rnayabed");
setVersion(new Version(1, 0, 0));
setVersion(new Version(1, 0, 0));
states = new ArrayList<>();
states = new ArrayList<>();
states.add("Start");
states.add("Start");
states.add("Stop");
states.add("Stop");
}
}
private ArrayList<String> states;
private ArrayList<String> states;
@Override
@Override
public void initProperties() throws Exception {
public void initProperties() throws Exception {
Property recordingStatusProperty = new Property("recording_status", Type.LIST);
Property recordingStatusProperty = new Property("recording_status", Type.LIST);
recordingStatusProperty.setListValue(states);
recordingStatusProperty.setListValue(states);
recordingStatusProperty.setDisplayName("Recording State");
recordingStatusProperty.setDisplayName("Recording State");
addClientProperties(recordingStatusProperty);
addClientProperties(recordingStatusProperty);
}
}
@Override
@Override
public void initAction() throws Exception {
public void initAction() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
@Override
@Override
public void onActionClicked() throws Exception {
public void onActionClicked() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
OBSRemoteController controller = MotherConnection.getRemoteController();
OBSRemoteController controller = MotherConnection.getRemoteController();
if (controller == null) {
if (controller == null) {
new StreamPiAlert("Is OBS Connected?",
new StreamPiAlert("Is OBS Connected?",
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
.show();
.show();
} else {
} else {
String state = states.get(getClientProperties().getSingleProperty("recording_status").getSelectedIndex());
String state = states.get(getClientProperties().getSingleProperty("recording_status").getSelectedIndex());
if(state.equals("Start"))
if(state.equals("Start"))
{
{
controller.startRecording(MotherConnection.getDefaultCallBack("Failed to Start Recording","Failed to do that"));
controller.startRecording(MotherConnection.getDefaultCallBack("Failed to Start Recording","Failed to do that"));
}
}
else if(state.equals("Stop"))
else if(state.equals("Stop"))
{
{
controller.stopRecording(MotherConnection.getDefaultCallBack("Failed to Stop Recording","Failed to do that"));
controller.stopRecording(MotherConnection.getDefaultCallBack("Failed to Stop Recording","Failed to do that"));
}
}
}
}
}
}
@Override
@Override
public void onShutDown() throws Exception {
public void onShutDown() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/target/classes" />
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.stream_pi:util:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:util:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:actionapi:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:action-api:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:15" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:15" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
</component>
</component>
</module>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_setreplaybufferaction</artifactId>
<artifactId>obssuite_setreplaybufferaction</artifactId>
<version>1.0.0</version>
<version>1.0.0</version>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.0</version>
<executions>
<executions>
<execution>
<execution>
<id>test-jar</id>
<id>test-jar</id>
<phase>package</phase>
<phase>package</phase>
<goals>
<goals>
<goal>test-jar</goal>
<goal>test-jar</goal>
</goals>
</goals>
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.8.1</version>
<configuration>
<configuration>
<release>11</release>
<release>11</release>
</configuration>
</configuration>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
<properties>
<properties>
<ActionAPIVersion>1.0.0</ActionAPIVersion>
<ActionAPIVersion>1.0.0-SNAPSHOT</ActionAPIVersion>
<UtilVersion>1.0.0</UtilVersion>
<UtilVersion>1.0.0-SNAPSHOT</UtilVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>util</artifactId>
<artifactId>util</artifactId>
<version>${UtilVersion}</version>
<version>${UtilVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>actionapi</artifactId>
<artifactId>action-api</artifactId>
<version>${ActionAPIVersion}</version>
<version>${ActionAPIVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_motheraction</artifactId>
<artifactId>obssuite_motheraction</artifactId>
<version>${OBSSuiteMotherVersion}</version>
<version>${OBSSuiteMotherVersion}</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
module com.stream_pi.obssuite.setreplaybufferaction
module com.stream_pi.obssuite.setreplaybufferaction
{
{
requires com.stream_pi.actionapi;
requires com.stream_pi.action_api;
requires com.stream_pi.util;
requires com.stream_pi.util;
requires obs.websocket.java;
requires obs.websocket.java;
requires com.stream_pi.obssuite.motheraction;
requires com.stream_pi.obssuite.motheraction;
provides com.stream_pi.actionapi.normalaction.NormalAction with setreplaybuffer.SetReplayBuffer;
provides com.stream_pi.action_api.normalaction.NormalAction with setreplaybuffer.SetReplayBuffer;
}
}
package setreplaybuffer;
package setreplaybuffer;
import java.util.ArrayList;
import java.util.ArrayList;
import com.stream_pi.actionapi.actionproperty.property.Property;
import com.stream_pi.action_api.actionproperty.property.Property;
import com.stream_pi.actionapi.actionproperty.property.Type;
import com.stream_pi.action_api.actionproperty.property.Type;
import com.stream_pi.actionapi.normalaction.NormalAction;
import com.stream_pi.action_api.normalaction.NormalAction;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.version.Version;
import com.stream_pi.util.version.Version;
import mother.motherconnection.MotherConnection;
import mother.motherconnection.MotherConnection;
import net.twasi.obsremotejava.OBSRemoteController;
import net.twasi.obsremotejava.OBSRemoteController;
public class SetReplayBuffer extends NormalAction {
public class SetReplayBuffer extends NormalAction {
public SetReplayBuffer() {
public SetReplayBuffer() {
setName("Set Replay Buffer");
setName("Set Replay Buffer");
setCategory("OBS");
setCategory("OBS");
setVisibilityInServerSettingsPane(false);
setVisibilityInServerSettingsPane(false);
setAuthor("rnayabed");
setAuthor("rnayabed");
setVersion(new Version(1, 0, 0));
setVersion(new Version(1, 0, 0));
states = new ArrayList<>();
states = new ArrayList<>();
states.add("Start");
states.add("Start");
states.add("Stop");
states.add("Stop");
states.add("Save");
states.add("Save");
}
}
private ArrayList<String> states;
private ArrayList<String> states;
@Override
@Override
public void initProperties() throws Exception {
public void initProperties() throws Exception {
Property replayStatusActionProperty = new Property("replay_status", Type.LIST);
Property replayStatusActionProperty = new Property("replay_status", Type.LIST);
replayStatusActionProperty.setListValue(states);
replayStatusActionProperty.setListValue(states);
replayStatusActionProperty.setDisplayName("Replay Buffer State");
replayStatusActionProperty.setDisplayName("Replay Buffer State");
addClientProperties(replayStatusActionProperty);
addClientProperties(replayStatusActionProperty);
}
}
@Override
@Override
public void initAction() throws Exception {
public void initAction() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
@Override
@Override
public void onActionClicked() throws Exception {
public void onActionClicked() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
OBSRemoteController controller = MotherConnection.getRemoteController();
OBSRemoteController controller = MotherConnection.getRemoteController();
if (controller == null) {
if (controller == null) {
new StreamPiAlert("Is OBS Connected?",
new StreamPiAlert("Is OBS Connected?",
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
.show();
.show();
} else {
} else {
String state = states.get(getClientProperties().getSingleProperty("replay_status").getSelectedIndex());
String state = states.get(getClientProperties().getSingleProperty("replay_status").getSelectedIndex());
if(state.equals("Start"))
if(state.equals("Start"))
{
{
controller.startReplayBuffer(MotherConnection.getDefaultCallBack("Failed to Start Replay Buffer","Failed to do that"));
controller.startReplayBuffer(MotherConnection.getDefaultCallBack("Failed to Start Replay Buffer","Failed to do that"));
}
}
else if(state.equals("Stop"))
else if(state.equals("Stop"))
{
{
controller.stopReplayBuffer(MotherConnection.getDefaultCallBack("Failed to Stop Replay Buffer","Failed to do that"));
controller.stopReplayBuffer(MotherConnection.getDefaultCallBack("Failed to Stop Replay Buffer","Failed to do that"));
}
}
else if(state.equals("Save"))
else if(state.equals("Save"))
{
{
controller.saveReplayBuffer(MotherConnection.getDefaultCallBack("Failed to Save Replay Buffer","Failed to do that"));
controller.saveReplayBuffer(MotherConnection.getDefaultCallBack("Failed to Save Replay Buffer","Failed to do that"));
}
}
}
}
}
}
@Override
@Override
public void onShutDown() throws Exception {
public void onShutDown() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/target/classes" />
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.stream_pi:util:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:util:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:actionapi:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:action-api:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:15" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:15" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
</component>
</component>
</module>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_setstreamingaction</artifactId>
<artifactId>obssuite_setstreamingaction</artifactId>
<version>1.0.0</version>
<version>1.0.0</version>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.0</version>
<executions>
<executions>
<execution>
<execution>
<id>test-jar</id>
<id>test-jar</id>
<phase>package</phase>
<phase>package</phase>
<goals>
<goals>
<goal>test-jar</goal>
<goal>test-jar</goal>
</goals>
</goals>
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.8.1</version>
<configuration>
<configuration>
<release>11</release>
<release>11</release>
</configuration>
</configuration>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
<properties>
<properties>
<ActionAPIVersion>1.0.0</ActionAPIVersion>
<ActionAPIVersion>1.0.0-SNAPSHOT</ActionAPIVersion>
<UtilVersion>1.0.0</UtilVersion>
<UtilVersion>1.0.0-SNAPSHOT</UtilVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>util</artifactId>
<artifactId>util</artifactId>
<version>${UtilVersion}</version>
<version>${UtilVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>actionapi</artifactId>
<artifactId>action-api</artifactId>
<version>${ActionAPIVersion}</version>
<version>${ActionAPIVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_motheraction</artifactId>
<artifactId>obssuite_motheraction</artifactId>
<version>${OBSSuiteMotherVersion}</version>
<version>${OBSSuiteMotherVersion}</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
module com.stream_pi.obssuite.setstreamingaction
module com.stream_pi.obssuite.setstreamingaction
{
{
requires com.stream_pi.actionapi;
requires com.stream_pi.action_api;
requires com.stream_pi.util;
requires com.stream_pi.util;
requires obs.websocket.java;
requires obs.websocket.java;
requires com.stream_pi.obssuite.motheraction;
requires com.stream_pi.obssuite.motheraction;
provides com.stream_pi.actionapi.normalaction.NormalAction with setstreaming.SetStreaming;
provides com.stream_pi.action_api.normalaction.NormalAction with setstreaming.SetStreaming;
}
}
package setstreaming;
package setstreaming;
import java.util.ArrayList;
import java.util.ArrayList;
import com.stream_pi.actionapi.actionproperty.property.Property;
import com.stream_pi.action_api.actionproperty.property.Property;
import com.stream_pi.actionapi.actionproperty.property.Type;
import com.stream_pi.action_api.actionproperty.property.Type;
import com.stream_pi.actionapi.normalaction.NormalAction;
import com.stream_pi.action_api.normalaction.NormalAction;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.version.Version;
import com.stream_pi.util.version.Version;
import mother.motherconnection.MotherConnection;
import mother.motherconnection.MotherConnection;
import net.twasi.obsremotejava.OBSRemoteController;
import net.twasi.obsremotejava.OBSRemoteController;
public class SetStreaming extends NormalAction {
public class SetStreaming extends NormalAction {
public SetStreaming() {
public SetStreaming() {
setName("Set Streaming");
setName("Set Streaming");
setCategory("OBS");
setCategory("OBS");
setVisibilityInServerSettingsPane(false);
setVisibilityInServerSettingsPane(false);
setAuthor("rnayabed");
setAuthor("rnayabed");
setVersion(new Version(1, 0, 0));
setVersion(new Version(1, 0, 0));
states = new ArrayList<>();
states = new ArrayList<>();
states.add("Start");
states.add("Start");
states.add("Stop");
states.add("Stop");
}
}
private ArrayList<String> states;
private ArrayList<String> states;
@Override
@Override
public void initProperties() throws Exception {
public void initProperties() throws Exception {
Property streamingStatusProperty = new Property("streaming_status", Type.LIST);
Property streamingStatusProperty = new Property("streaming_status", Type.LIST);
streamingStatusProperty.setListValue(states);
streamingStatusProperty.setListValue(states);
streamingStatusProperty.setDisplayName("Streaming State");
streamingStatusProperty.setDisplayName("Streaming State");
addClientProperties(streamingStatusProperty);
addClientProperties(streamingStatusProperty);
}
}
@Override
@Override
public void initAction() throws Exception {
public void initAction() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
@Override
@Override
public void onActionClicked() throws Exception {
public void onActionClicked() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
OBSRemoteController controller = MotherConnection.getRemoteController();
OBSRemoteController controller = MotherConnection.getRemoteController();
if (controller == null) {
if (controller == null) {
new StreamPiAlert("Is OBS Connected?",
new StreamPiAlert("Is OBS Connected?",
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
.show();
.show();
} else {
} else {
String state = states.get(getClientProperties().getSingleProperty("streaming_status").getSelectedIndex());
String state = states.get(getClientProperties().getSingleProperty("streaming_status").getSelectedIndex());
if(state.equals("Start"))
if(state.equals("Start"))
{
{
controller.startStreaming(MotherConnection.getDefaultCallBack("Failed to Start Streaming","Failed to do that"));
controller.startStreaming(MotherConnection.getDefaultCallBack("Failed to Start Streaming","Failed to do that"));
}
}
else if(state.equals("Stop"))
else if(state.equals("Stop"))
{
{
controller.stopStreaming(MotherConnection.getDefaultCallBack("Failed to Stop Streaming","Failed to do that"));
controller.stopStreaming(MotherConnection.getDefaultCallBack("Failed to Stop Streaming","Failed to do that"));
}
}
}
}
}
}
@Override
@Override
public void onShutDown() throws Exception {
public void onShutDown() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
<output url="file://$MODULE_DIR$/target/classes" />
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.stream_pi:util:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:util:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-fontawesome5-pack:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-core:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-controls:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-base:linux:16-ea+6" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: org.kordamp.ikonli:ikonli-javafx:11.5.0" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:actionapi:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:action-api:1.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:15" level="project" />
<orderEntry type="library" name="Maven: com.stream-pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.openjfx:javafx-graphics:linux:15" level="project" />
<orderEntry type="library" name="Maven: com.stream_pi:obssuite_motheraction:1.0.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" name="Maven: net.twasi:obs-websocket-java:1.2.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.35.v20201120" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
</component>
</component>
</module>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_setstudiomodeaction</artifactId>
<artifactId>obssuite_setstudiomodeaction</artifactId>
<version>1.0.0</version>
<version>1.0.0</version>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.0</version>
<executions>
<executions>
<execution>
<execution>
<id>test-jar</id>
<id>test-jar</id>
<phase>package</phase>
<phase>package</phase>
<goals>
<goals>
<goal>test-jar</goal>
<goal>test-jar</goal>
</goals>
</goals>
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.8.1</version>
<configuration>
<configuration>
<release>11</release>
<release>11</release>
</configuration>
</configuration>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
<properties>
<properties>
<ActionAPIVersion>1.0.0</ActionAPIVersion>
<ActionAPIVersion>1.0.0-SNAPSHOT</ActionAPIVersion>
<UtilVersion>1.0.0</UtilVersion>
<UtilVersion>1.0.0-SNAPSHOT</UtilVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>util</artifactId>
<artifactId>util</artifactId>
<version>${UtilVersion}</version>
<version>${UtilVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>actionapi</artifactId>
<artifactId>action-api</artifactId>
<version>${ActionAPIVersion}</version>
<version>${ActionAPIVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_motheraction</artifactId>
<artifactId>obssuite_motheraction</artifactId>
<version>${OBSSuiteMotherVersion}</version>
<version>${OBSSuiteMotherVersion}</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
package SetStudioMode;
package SetStudioMode;
import com.stream_pi.actionapi.actionproperty.property.Property;
import com.stream_pi.action_api.actionproperty.property.Property;
import com.stream_pi.actionapi.actionproperty.property.Type;
import com.stream_pi.action_api.actionproperty.property.Type;
import com.stream_pi.actionapi.normalaction.NormalAction;
import com.stream_pi.action_api.normalaction.NormalAction;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.version.Version;
import com.stream_pi.util.version.Version;
import mother.motherconnection.MotherConnection;
import mother.motherconnection.MotherConnection;
import net.twasi.obsremotejava.OBSRemoteController;
import net.twasi.obsremotejava.OBSRemoteController;
public class SetStudioMode extends NormalAction {
public class SetStudioMode extends NormalAction {
public SetStudioMode() {
public SetStudioMode() {
setName("Set Studio Mode");
setName("Set Studio Mode");
setCategory("OBS");
setCategory("OBS");
setVisibilityInServerSettingsPane(false);
setVisibilityInServerSettingsPane(false);
setAuthor("rnayabed");
setAuthor("rnayabed");
setVersion(new Version(1, 0, 0));
setVersion(new Version(1, 0, 0));
}
}
@Override
@Override
public void initProperties() throws Exception {
public void initProperties() throws Exception {
Property studioModeStatusProperty = new Property("studio_mode_status", Type.BOOLEAN);
Property studioModeStatusProperty = new Property("studio_mode_status", Type.BOOLEAN);
studioModeStatusProperty.setDisplayName("Studio Mode");
studioModeStatusProperty.setDisplayName("Studio Mode");
addClientProperties(studioModeStatusProperty);
addClientProperties(studioModeStatusProperty);
}
}
@Override
@Override
public void initAction() throws Exception {
public void initAction() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
@Override
@Override
public void onActionClicked() throws Exception {
public void onActionClicked() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
OBSRemoteController controller = MotherConnection.getRemoteController();
OBSRemoteController controller = MotherConnection.getRemoteController();
if (controller == null) {
if (controller == null) {
new StreamPiAlert("Is OBS Connected?",
new StreamPiAlert("Is OBS Connected?",
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
.show();
.show();
} else
} else
{
{
controller.setStudioModeEnabled(getClientProperties().getSingleProperty("studio_mode_status").getBoolValue(),
controller.setStudioModeEnabled(getClientProperties().getSingleProperty("studio_mode_status").getBoolValue(),
MotherConnection.getDefaultCallBack("Failed to set studio mode","Failed to do that"));
MotherConnection.getDefaultCallBack("Failed to set studio mode","Failed to do that"));
}
}
}
}
@Override
@Override
public void onShutDown() throws Exception {
public void onShutDown() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
}
}
module com.stream_pi.obssuite.setstudiomodeaction
module com.stream_pi.obssuite.setstudiomodeaction
{
{
requires com.stream_pi.actionapi;
requires com.stream_pi.action_api;
requires com.stream_pi.util;
requires com.stream_pi.util;
requires obs.websocket.java;
requires obs.websocket.java;
requires com.stream_pi.obssuite.motheraction;
requires com.stream_pi.obssuite.motheraction;
provides com.stream_pi.actionapi.normalaction.NormalAction with SetStudioMode.SetStudioMode;
provides com.stream_pi.action_api.normalaction.NormalAction with SetStudioMode.SetStudioMode;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_setvolumeaction</artifactId>
<artifactId>obssuite_setvolumeaction</artifactId>
<version>1.0.0</version>
<version>1.0.0</version>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.0</version>
<executions>
<executions>
<execution>
<execution>
<id>test-jar</id>
<id>test-jar</id>
<phase>package</phase>
<phase>package</phase>
<goals>
<goals>
<goal>test-jar</goal>
<goal>test-jar</goal>
</goals>
</goals>
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.8.1</version>
<configuration>
<configuration>
<release>11</release>
<release>11</release>
</configuration>
</configuration>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
<properties>
<properties>
<ActionAPIVersion>1.0.0</ActionAPIVersion>
<ActionAPIVersion>1.0.0-SNAPSHOT</ActionAPIVersion>
<UtilVersion>1.0.0</UtilVersion>
<UtilVersion>1.0.0-SNAPSHOT</UtilVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<OBSSuiteMotherVersion>1.0.0</OBSSuiteMotherVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>util</artifactId>
<artifactId>util</artifactId>
<version>${UtilVersion}</version>
<version>${UtilVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>actionapi</artifactId>
<artifactId>action-api</artifactId>
<version>${ActionAPIVersion}</version>
<version>${ActionAPIVersion}</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>com.stream_pi</groupId>
<groupId>com.stream-pi</groupId>
<artifactId>obssuite_motheraction</artifactId>
<artifactId>obssuite_motheraction</artifactId>
<version>${OBSSuiteMotherVersion}</version>
<version>${OBSSuiteMotherVersion}</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
module com.stream_pi.obssuite.setvolumeaction
module com.stream_pi.obssuite.setvolumeaction
{
{
requires com.stream_pi.actionapi;
requires com.stream_pi.action_api;
requires com.stream_pi.util;
requires com.stream_pi.util;
requires obs.websocket.java;
requires obs.websocket.java;
requires com.stream_pi.obssuite.motheraction;
requires com.stream_pi.obssuite.motheraction;
provides com.stream_pi.actionapi.normalaction.NormalAction with setvolume.SetVolume;
provides com.stream_pi.action_api.normalaction.NormalAction with setvolume.SetVolume;
}
}
package setvolume;
package setvolume;
import com.stream_pi.actionapi.actionproperty.property.Property;
import com.stream_pi.action_api.actionproperty.property.Property;
import com.stream_pi.actionapi.actionproperty.property.Type;
import com.stream_pi.action_api.actionproperty.property.Type;
import com.stream_pi.actionapi.normalaction.NormalAction;
import com.stream_pi.action_api.normalaction.NormalAction;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlert;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.alert.StreamPiAlertType;
import com.stream_pi.util.version.Version;
import com.stream_pi.util.version.Version;
import mother.motherconnection.MotherConnection;
import mother.motherconnection.MotherConnection;
import net.twasi.obsremotejava.OBSRemoteController;
import net.twasi.obsremotejava.OBSRemoteController;
public class SetVolume extends NormalAction {
public class SetVolume extends NormalAction {
public SetVolume() {
public SetVolume() {
setName("Set Volume");
setName("Set Volume");
setCategory("OBS");
setCategory("OBS");
setVisibilityInServerSettingsPane(false);
setVisibilityInServerSettingsPane(false);
setAuthor("rnayabed");
setAuthor("rnayabed");
setVersion(new Version(1, 0, 0));
setVersion(new Version(1, 0, 0));
}
}
@Override
@Override
public void initProperties() throws Exception {
public void initProperties() throws Exception {
Property sourceProperty = new Property("source", Type.STRING);
Property sourceProperty = new Property("source", Type.STRING);
sourceProperty.setDisplayName("Source");
sourceProperty.setDisplayName("Source");
Property setVolumeProperty = new Property("volume", Type.DOUBLE);
Property setVolumeProperty = new Property("volume", Type.DOUBLE);
setVolumeProperty.setDisplayName("Volume");
setVolumeProperty.setDisplayName("Volume");
addClientProperties(sourceProperty, setVolumeProperty);
addClientProperties(sourceProperty, setVolumeProperty);
}
}
@Override
@Override
public void initAction() throws Exception {
public void initAction() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
@Override
@Override
public void onActionClicked() throws Exception {
public void onActionClicked() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
OBSRemoteController controller = MotherConnection.getRemoteController();
OBSRemoteController controller = MotherConnection.getRemoteController();
if (controller == null) {
if (controller == null) {
new StreamPiAlert("Is OBS Connected?",
new StreamPiAlert("Is OBS Connected?",
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
"It seems there is no connection to OBS, please connect it in Settings", StreamPiAlertType.WARNING)
.show();
.show();
}
}
else
else
{
{
String source = getClientProperties().getSingleProperty("source").getStringValue();
String source = getClientProperties().getSingleProperty("source").getStringValue();
double volume = getClientProperties().getSingleProperty("volume").getDoubleValue();
double volume = getClientProperties().getSingleProperty("volume").getDoubleValue();
controller.setVolume(source, volume, MotherConnection.getDefaultCallBack("Failed to Set Volume","Failed to do that"));
controller.setVolume(source, volume, MotherConnection.getDefaultCallBack("Failed to Set Volume","Failed to do that"));
}
}
}
}
@Override
@Override
public void onShutDown() throws Exception {
public void onShutDown() throws Exception {
// TODO Auto-generated method stub
// TODO Auto-generated method stub
}
}
}
}