Skip to content

Commit

Permalink
some minor sipjs improvements (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: Besmir Beqiri <[email protected]>
  • Loading branch information
FlorianKirmaier and besidev authored May 6, 2024
1 parent 2b33356 commit 197ad15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void makeHangupButton() {
session.set(null);
});
session.addListener((observable, oldValue, newValue) -> {
button.setDisable(session.get() == null);
button.setDisable(session.get() == null || !session.get().stateProperty().get().equals(Session.State.Established));
});
button.setDisable(session.get() == null);
getChildren().add(button);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ public class State {
}

public void bye() {
webapi.executeScript(session.getName() + ".bye();");
webapi.js().eval(session.getName() + ".bye();")
.toPromise()
.onPromiseError(e -> e.printStackTrace());
}

public void endCall() {
Expand Down

0 comments on commit 197ad15

Please sign in to comment.