Пример #1
0
        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);
        }
Пример #2
0
        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);
        }