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)
|
public void SetState(PlayerState state)
|
||||||
{
|
{
|
||||||
_state = state;
|
_state = state;
|
||||||
_client.Set(StatePath, "playing");
|
_client.SetAsync(StatePath, "playing");
|
||||||
}
|
}
|
||||||
|
|
||||||
public FirebaseController(string clientId, ControllerStateChangedEventHandler stateChanged, ControllerSongChangedEventHandler songChanged)
|
public FirebaseController(string clientId, ControllerStateChangedEventHandler stateChanged, ControllerSongChangedEventHandler songChanged)
|
||||||
|
|||||||
@ -38,16 +38,13 @@ namespace KaraokePlayer
|
|||||||
switch (args.State)
|
switch (args.State)
|
||||||
{
|
{
|
||||||
case PlayerState.playing:
|
case PlayerState.playing:
|
||||||
//this.Invoke(new Action(() => { player.play(); }));
|
this.Invoke(new Action(() => { player.play(); }));
|
||||||
player.play();
|
|
||||||
break;
|
break;
|
||||||
case PlayerState.paused:
|
case PlayerState.paused:
|
||||||
//this.Invoke(new Action(() => { player.pause(); }));
|
this.Invoke(new Action(() => { player.pause(); }));
|
||||||
player.pause();
|
|
||||||
break;
|
break;
|
||||||
case PlayerState.stopped:
|
case PlayerState.stopped:
|
||||||
//this.Invoke(new Action(() => { player.stop(); }));
|
this.Invoke(new Action(() => { player.stop(); }));
|
||||||
player.stop();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user