First pass at syncing worked with some bug fixes

This commit is contained in:
watsonb8
2019-11-12 20:09:45 -05:00
parent 1acc383e90
commit 3398d145ac
8 changed files with 128 additions and 66 deletions

View File

@ -225,7 +225,7 @@ namespace Aurora.Design.Views.Party
{
SetState(PartyState.Connecting);
_client.Start(Hostname, SettingsService.Instance.DefaultPort.ToString());
await JoinParty();
await JoinParty(false);
//TODO add cancellation token
try
@ -252,7 +252,7 @@ namespace Aurora.Design.Views.Party
string localHost = ServerService.GetLocalIPAddress();
_client.IsHost = true;
_client.Start(localHost, SettingsService.Instance.DefaultPort.ToString());
await JoinParty();
await JoinParty(true);
//TODO add cancellation token
@ -341,7 +341,7 @@ namespace Aurora.Design.Views.Party
/// Join the remote party.
/// </summary>
/// <returns></returns>
private async Task JoinParty()
private async Task JoinParty(bool asHost)
{
try
{
@ -383,6 +383,7 @@ namespace Aurora.Design.Views.Party
meta.Duration = data.Duration;
RemoteAudio remote = new RemoteAudio(data.Id,
asHost,
meta,
_client.RemotePlaybackClient,
_client.RemoteSyncClient);