diff --git a/FirebaseKaraoke/FirebaseController.cs b/FirebaseKaraoke/FirebaseController.cs index 1cdc559..29f1bc4 100644 --- a/FirebaseKaraoke/FirebaseController.cs +++ b/FirebaseKaraoke/FirebaseController.cs @@ -37,7 +37,7 @@ namespace KaraokePlayer.Classes public void SetState(PlayerState state) { _state = state; - _client.Set(StatePath, "playing"); + _client.SetAsync(StatePath, "playing"); } public FirebaseController(string clientId, ControllerStateChangedEventHandler stateChanged, ControllerSongChangedEventHandler songChanged) diff --git a/KaraokePlayer/MainForm.cs b/KaraokePlayer/MainForm.cs index 69a8c2e..d816f21 100644 --- a/KaraokePlayer/MainForm.cs +++ b/KaraokePlayer/MainForm.cs @@ -38,16 +38,13 @@ namespace KaraokePlayer switch (args.State) { case PlayerState.playing: - //this.Invoke(new Action(() => { player.play(); })); - player.play(); + this.Invoke(new Action(() => { player.play(); })); break; case PlayerState.paused: - //this.Invoke(new Action(() => { player.pause(); })); - player.pause(); + this.Invoke(new Action(() => { player.pause(); })); break; case PlayerState.stopped: - //this.Invoke(new Action(() => { player.stop(); })); - player.stop(); + this.Invoke(new Action(() => { player.stop(); })); break; } },