private async Task StopTracks() { Console.Error.WriteLine("Stopping tracks..."); await Task.WhenAll( _LocalAudioTrack1.Source.Stop().AsTask(TaskCreationOptions.RunContinuationsAsynchronously), _LocalAudioTrack2.Source.Stop().AsTask(TaskCreationOptions.RunContinuationsAsynchronously), _LocalVideoTrack1.Source.Stop().AsTask(TaskCreationOptions.RunContinuationsAsynchronously), _LocalVideoTrack2.Source.Stop().AsTask(TaskCreationOptions.RunContinuationsAsynchronously) ).ConfigureAwait(false); _LocalAudioTrack1.Destroy(); _LocalAudioTrack2.Destroy(); _LocalVideoTrack1.Destroy(); _LocalVideoTrack2.Destroy(); _RemoteAudioTrack1.Destroy(); _RemoteAudioTrack2.Destroy(); _RemoteVideoTrack1.Destroy(); _RemoteVideoTrack2.Destroy(); }