left await actions out of FB core, but put back the form invoke things
This commit is contained in:
parent
bd549b584c
commit
cdce3825bd
@ -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)
|
||||
|
||||
@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user