Skip to content

Commit

Permalink
Added sync event handler sample
Browse files Browse the repository at this point in the history
  • Loading branch information
jowang-msft committed Apr 4, 2023
1 parent 764770d commit 22d2326
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion AcsWindowsSDKSamples/Samples/Call.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Windows.Devices.Geolocation.Provider;

namespace AcsWindowsSDKSamples.Samples
Expand All @@ -22,7 +23,14 @@ async void CallAsync()
await call.StartVideoAsync(localVideoStream);

// Set up event sinks for call object
call.IdChanged += OnIdChanged;
call.IdChanged += (object sender, PropertyChangedEventArgs e) =>
{
var me = sender as Call;
Task.Run(() =>
{
Console.WriteLine($"{me.State}");
});
};
call.StateChanged += OnStateChanged;
call.IsMutedChanged += OnIsMutedChanged;
call.StateChanged += OnStateChanged1;
Expand Down

0 comments on commit 22d2326

Please sign in to comment.