public IAsyncAction StopTraceAsync()
 {
     RtcManager.Instance.EnsureRtcIsInitialized();
     WebRTC.StopTracing();
     _appPerfTimer?.Cancel();
     return(Task.CompletedTask.AsAsyncAction());
 }
 public void StopTrace()
 {
     WebRTC.StopTracing();
     if (_appPerfTimer != null)
     {
         _appPerfTimer.Cancel();
     }
 }
        public void SaveWebRTCTrace()
        {
            if (!WebRTC.IsTracing())
            {
                return;
            }

            Task.Run(async() =>
            {
                WebRTC.StopTracing(); //stop tracing so that trace file can be properly saved.
                ToastNotificationService.ShowToastNotification("Saving Webrtc trace");
                var webrtcTraceInternalFile = ApplicationData.Current.LocalFolder.Path + "\\" + "_webrtc_trace.txt";

                WebRTC.SaveTrace(webrtcTraceInternalFile);

                await SaveToUserPickedFolder(webrtcTraceInternalFile);

                WebRTC.StartTracing();

                ToastNotificationService.ShowToastNotification("Saving Webrtc trace finished!");
            });
        }