Beispiel #1
0
 private int GetVideoTotalTime(string videoPath)
 {
     TimeSpan videoTotalTime = new ConvertVideo().GetVideoTotalTime(videoPath);
     return TimeParser.TimeToSecond(videoTotalTime.Hours, videoTotalTime.Minutes, videoTotalTime.Seconds);
 }
 private void VideoAction(HttpRequest Request, HttpResponse Response)
 {
     HttpPostedFile postFile = Request.Files["Filedata"];
     Response.Charset = "utf-8";
     ConvertVideo video = new ConvertVideo();
     VideoModel model = new VideoModel();
     string valueByCache = ConfigSystem.GetValueByCache("UploadVideoUrl");
     JsonObject obj2 = new JsonObject();
     if (video.UploadVideo(postFile, false, valueByCache, null, false, false, out model, ".swf"))
     {
         obj2.Accumulate("Status", "OK");
         obj2.Accumulate("SavePath", model.SavePath);
         Response.Write("1|" + obj2.ToString());
     }
     else
     {
         obj2.Accumulate("Status", "Failed");
         obj2.Accumulate("ErrorMessage", video.errorMessage);
         Response.Write("0|" + obj2.ToString());
     }
 }