private async Task ApplyVideoEffectAsync() { if (currentState == RecordingState.Previewing) { previewEffect = ConstructVideoEffect(); await mediaCapture.AddVideoEffectAsync(previewEffect, MediaStreamType.VideoPreview); } else if (currentState == RecordingState.NotInitialized || currentState == RecordingState.Stopped) { await new MessageDialog("The preview or recording stream is not available.", "Effect not applied").ShowAsync(); } }
private async Task ClearVideoEffectsAsync() { await mediaCapture.ClearEffectsAsync(MediaStreamType.VideoPreview); previewEffect = null; }