private void SaveToPhotosAlbum(UIImage image) { if (!Configuration.SaveToPhotosAlbum) { return; } image.SaveToPhotosAlbum((uiImage, nsError) => { if (nsError != null) { SaveToPhotosAlbumError?.Invoke(this, nsError); } }); }
/// <inheritdoc cref="IAVCaptureFileOutputRecordingDelegate"/> public void FinishedRecording(AVCaptureFileOutput captureOutput, NSUrl outputFileUrl, NSObject[] connections, NSError error) { if (error != null) { SaveToPhotosAlbumError?.Invoke(this, error); } else { if (Configuration.SaveToPhotosAlbum) { var al = new ALAssetsLibrary(); al.WriteVideoToSavedPhotosAlbum(outputFileUrl, (url, nsError) => { if (nsError != null) { SaveToPhotosAlbumError?.Invoke(this, nsError); } }); } _onVideoFinished?.Invoke(outputFileUrl); } }