public async Task SwapCameraAsync() { IsBusy = true; var successful = false; try { await streamingService.SwapCameraAsync(); Settings.CameraPanel = streamingService.CameraPanel; successful = (streamingService.CurrentState == ScenarioState.Streaming); } catch { } finally { if (successful) { await this.NotifyCameraPanelAsync(); } else { await this.NotifySwapCameraErrorAsync(); } } IsBusy = false; }
public async Task SwapCameraAsync(SwipeDirection direction) { var successful = false; try { await streamingService.SwapCameraAsync(); Settings.CameraPanel = streamingService.CameraPanel; successful = (streamingService.CurrentState == ScenarioState.Streaming); } catch { } finally { if (successful) { await this.NotifyCameraPanelAsync(); } else { await this.NotifyInitializationErrorAsync(); } } }