public Task <string> SelectVideo() { var task = new TaskCompletionSource <string>(); try { IntentHelper.SelectVideo((path) => { task.SetResult(path); }); } catch (Exception ex) { task.SetException(ex); } return(task.Task); }
public Task <bool> CompressVideo(string path, string path2) { var task = new TaskCompletionSource <bool>(); try { IntentHelper.CompressVideo(path, path2, (u) => { task.SetResult(true); }); } catch (Exception ex) { task.SetResult(false); } return(task.Task); }