MobileDocumentVideoSource.cs 596 B

12345678910111213141516171819202122
  1. using System;
  2. using System.Threading.Tasks;
  3. using Xamarin.Essentials;
  4. namespace InABox.Mobile
  5. {
  6. public class MobileDocumentVideoSource : MobileVideoSource<MobileDocumentVideoSource, MobileDocumentVideoOptions>
  7. {
  8. public MobileDocumentVideoSource(MobileDocumentVideoOptions options) : base(options)
  9. {
  10. }
  11. protected override async Task<bool> IsEnabled()
  12. => await IsEnabled<Permissions.Photos>();
  13. protected override async Task<FileResult> Capture()
  14. => await MediaPicker.CaptureVideoAsync();
  15. }
  16. }