Added a little more stability (not really)

This commit is contained in:
watsonb8
2019-11-29 19:27:31 -05:00
parent 85ab39defd
commit ad1fca2009
3 changed files with 29 additions and 59 deletions

View File

@ -33,16 +33,13 @@ namespace Aurora.RemoteImpl
while (continueSync)
{
DateTime time = Utils.TimeUtils.GetNetworkTime();
float position = PlayerService.Instance.CurrentMediaPosition;
Utils.Time networkTime = Utils.TimeUtils.GetNetworkTime();
float length = PlayerService.Instance.CurrentMediaLength;
float trackTime = length * position;
Sync sync = new Sync()
{
TrackTime = trackTime,
ServerTime = time.Ticks
TrackTime = length * PlayerService.Instance.CurrentMediaPosition,
ServerTime = networkTime.DateTime.Ticks + networkTime.Elapsed.Ticks
};
await responseStream.WriteAsync(sync);
Console.WriteLine("Sent Sync");