Ejemplo n.º 1
0
        public ViewResult ProcessVideo(VideoInfo videoInfoInput, bool? RemoveSound)
        {
            videoInfo = videoInfoInput;
            //converterOptions object class?
            bool removeSound;
            if (RemoveSound == null)
                removeSound = false;
            else
                removeSound = RemoveSound.HasValue ? RemoveSound.Value : false;

            try
            {
                VideoDownloader.ProcessVideo(videoInfo, removeSound);
                // download video
                // convert video
                // upload video
            }
            catch (Exception ex)
            {
                logger.Error("Process video exception: " + ex.Message + Environment.NewLine + videoInfo.SourceUrl);
                throw;
            }

            return View("ProcessVideo", videoInfo);
        }
Ejemplo n.º 2
0
 public ViewResult VideoForm()
 {
     videoInfo = (VideoInfo)TempData["videoInfo"];
     ViewData["copyrighted"] = false;
     if (VideoDownloader.GetLicenseTemplate(videoInfo.License).Contains("Unknown"))
         ViewData["copyrighted"] = true;
     ViewData["videoInfo"] = videoInfo;
     return View("VideoForm", videoInfo);
 }
Ejemplo n.º 3
0
        public RedirectToRouteResult Submit(string videoUrl)
        {
            videoService = VideoServiceFactory.GetVideoService(videoUrl);
            videoInfo = videoService.GetVideoInfo(videoUrl);
            TempData["videoInfo"] = videoInfo;

            return RedirectToAction("VideoForm");
        }