private static MediaPickerController SetupController(MediaPickerDelegate mpDelegate, UIImagePickerControllerSourceType sourceType, string mediaType, StoreCameraMediaOptions options = null) { var picker = new MediaPickerController(mpDelegate); picker.MediaTypes = new[] { mediaType }; picker.SourceType = sourceType; if (sourceType == UIImagePickerControllerSourceType.Camera) { picker.CameraDevice = GetUICameraDevice(options.DefaultCamera); if (mediaType == TypeImage) { picker.CameraCaptureMode = UIImagePickerControllerCameraCaptureMode.Photo; } else if (mediaType == TypeMovie) { StoreVideoOptions voptions = (StoreVideoOptions)options; picker.CameraCaptureMode = UIImagePickerControllerCameraCaptureMode.Video; picker.VideoQuality = GetQuailty(voptions.Quality); picker.VideoMaximumDuration = voptions.DesiredLength.TotalSeconds; } } return(picker); }
public Intent GetTakeVideoUI (StoreVideoOptions options) { if (!IsCameraAvailable) throw new NotSupportedException(); VerifyOptions (options); return CreateMediaIntent (GetRequestId(), "video/*", MediaStore.ActionVideoCapture, options, tasked: false); }
public Intent GetTakeVideoUI(StoreVideoOptions options) { if (!IsCameraAvailable) { throw new NotSupportedException(); } VerifyOptions(options); return(CreateMediaIntent(GetRequestId(), "video/*", MediaStore.ActionVideoCapture, options, tasked: false)); }
public Task <MediaFile> TakeVideoAsync(StoreVideoOptions options) { if (!IsCameraAvailable) { throw new NotSupportedException(); } VerifyOptions(options); return(TakeMediaAsync("video/*", MediaStore.ActionVideoCapture, options)); }
public Task <MediaFile> TakeVideoAsync(StoreVideoOptions options) { if (!VideosSupported) { throw new NotSupportedException(); } if (!IsCameraAvailable) { throw new NotSupportedException(); } VerifyCameraOptions(options); return(TakeMedia(UIImagePickerControllerSourceType.Camera, TypeMovie, options)); }
public MediaPickerController GetTakeVideoUI(StoreVideoOptions options) { if (!VideosSupported) { throw new NotSupportedException(); } if (!IsCameraAvailable) { throw new NotSupportedException(); } VerifyCameraOptions(options); var d = new MediaPickerDelegate(null, UIImagePickerControllerSourceType.Camera, options); return(SetupController(d, UIImagePickerControllerSourceType.Camera, TypeMovie, options)); }
public async Task <MediaFile> TakeVideoAsync(StoreVideoOptions options) { options.VerifyOptions(); var capture = new CameraCaptureUI(); capture.VideoSettings.MaxResolution = GetResolutionFromQuality(options.Quality); capture.VideoSettings.MaxDurationInSeconds = (float)options.DesiredLength.TotalSeconds; capture.VideoSettings.Format = CameraCaptureUIVideoFormat.Mp4; var result = await capture.CaptureFileAsync(CameraCaptureUIMode.Video).AsTask(false); if (result == null) { throw new TaskCanceledException(); } return(new MediaFile(result.Path, () => result.OpenStreamForReadAsync().Result)); }
public Task<MediaFile> TakeVideoAsync (StoreVideoOptions options) { if (!VideosSupported) throw new NotSupportedException(); if (!IsCameraAvailable) throw new NotSupportedException(); VerifyCameraOptions (options); return GetMediaAsync (UIImagePickerControllerSourceType.Camera, TypeMovie, options); }
public MediaPickerController GetTakeVideoUI (StoreVideoOptions options) { if (!VideosSupported) throw new NotSupportedException(); if (!IsCameraAvailable) throw new NotSupportedException(); VerifyCameraOptions (options); var d = new MediaPickerDelegate (null, UIImagePickerControllerSourceType.Camera, options); return SetupController (d, UIImagePickerControllerSourceType.Camera, TypeMovie, options); }
public Task <MediaFile> TakeVideoAsync(StoreVideoOptions options) { throw new NotSupportedException(); }
public async Task<MediaFile> TakeVideoAsync (StoreVideoOptions options) { options.VerifyOptions(); var capture = new CameraCaptureUI(); capture.VideoSettings.MaxResolution = GetResolutionFromQuality (options.Quality); capture.VideoSettings.MaxDurationInSeconds = (float)options.DesiredLength.TotalSeconds; capture.VideoSettings.Format = CameraCaptureUIVideoFormat.Mp4; var result = await capture.CaptureFileAsync (CameraCaptureUIMode.Video).AsTask (false); if (result == null) throw new TaskCanceledException(); return new MediaFile (result.Path, () => result.OpenStreamForReadAsync().Result); }
public Task<MediaFile> TakeVideoAsync( StoreVideoOptions options ) { if(!IsCameraAvailable) { throw new NotSupportedException(); } VerifyOptions( options ); return TakeMediaAsync( "video/*", MediaStore.ActionVideoCapture, options ); }
public Task <MediaFile> TakeVideoAsync(StoreVideoOptions param_options) { return(null); }
public Task<MediaFile> TakeVideoAsync (StoreVideoOptions options) { throw new NotSupportedException(); }