From: Debayan Sutradhar Date: Fri, 02 Apr 2021 20:12:39 +0530 Subject: updated audio clip action to not throw NPE when nothing is running on shutdown --- updated audio clip action to not throw NPE when nothing is running on shutdown obs mother and setprofileaction now work --- --- 'a/obssuite/mother/pom.xml' +++ b/obssuite/mother/pom.xml @@ -69,7 +69,7 @@ org.eclipse.jetty.websocket websocket-client - 9.4.35.v20201120 + 9.4.39.v20210325 --- 'a/obssuite/mother/src/main/java/module-info.java' +++ b/obssuite/mother/src/main/java/module-info.java @@ -15,5 +15,5 @@ module com.stream_pi.obssuite.motheracti requires transitive com.google.gson; exports mother.motherconnection; - provides com.stream_pi.action_api.normalaction.NormalAction with mother.Mother; + provides com.stream_pi.action_api.externalplugin.ExternalPlugin with mother.Mother; } \ No newline at end of file --- 'a/obssuite/mother/src/main/java/mother/Mother.java' +++ b/obssuite/mother/src/main/java/mother/Mother.java @@ -2,7 +2,7 @@ package mother; import com.stream_pi.action_api.actionproperty.property.Property; import com.stream_pi.action_api.actionproperty.property.Type; -import com.stream_pi.action_api.normalaction.NormalAction; +import com.stream_pi.action_api.externalplugin.NormalAction; import com.stream_pi.util.version.Version; import com.stream_pi.util.exception.MinorException; @@ -26,7 +26,7 @@ public class Mother extends NormalAction connectDisconnectButton = new Button("Connect"); - setButtonBar(connectDisconnectButton); + setServerSettingsButtonBar(connectDisconnectButton); } private Button connectDisconnectButton; --- 'a/obssuite/mother/src/main/java/mother/motherconnection/MotherConnection.java' +++ b/obssuite/mother/src/main/java/mother/motherconnection/MotherConnection.java @@ -7,8 +7,8 @@ import net.twasi.obsremotejava.OBSRemote import net.twasi.obsremotejava.callbacks.Callback; import net.twasi.obsremotejava.requests.ResponseBase; -public class MotherConnection { - +public class MotherConnection +{ private static OBSRemoteController obsRemoteController = null; public static OBSRemoteController getRemoteController() { --- 'a/obssuite/setcurrentprofile/src/main/java/module-info.java' +++ b/obssuite/setcurrentprofile/src/main/java/module-info.java @@ -5,5 +5,5 @@ module com.stream_pi.obssuite.setcurrent requires com.stream_pi.obssuite.motheraction; - provides com.stream_pi.action_api.normalaction.NormalAction with setcurrentprofile.SetCurrentProfile; + provides com.stream_pi.action_api.externalplugin.ExternalPlugin with setcurrentprofile.SetCurrentProfile; } --- 'a/obssuite/setcurrentprofile/src/main/java/setcurrentprofile/SetCurrentProfile.java' +++ b/obssuite/setcurrentprofile/src/main/java/setcurrentprofile/SetCurrentProfile.java @@ -2,7 +2,7 @@ package setcurrentprofile; import com.stream_pi.action_api.actionproperty.property.Property; import com.stream_pi.action_api.actionproperty.property.Type; -import com.stream_pi.action_api.normalaction.NormalAction; +import com.stream_pi.action_api.externalplugin.NormalAction; import com.stream_pi.util.alert.StreamPiAlert; import com.stream_pi.util.alert.StreamPiAlertType; import com.stream_pi.util.version.Version; --- 'a/playaudioclipaction/src/main/java/com/stream_pi/playaudioclipaction/PlayAudioClipAction.java' +++ b/playaudioclipaction/src/main/java/com/stream_pi/playaudioclipaction/PlayAudioClipAction.java @@ -81,8 +81,11 @@ public class PlayAudioClipAction extends @Override public void onShutDown() { - if(mediaPlayer.isPlaying()) - Platform.runLater(mediaPlayer::stop); + if(mediaPlayer != null) + { + if(mediaPlayer.isPlaying()) + Platform.runLater(mediaPlayer::stop); + } }