/* * void recordFinishedHandler(Exception ex) * { * * if (isDeleteVideoIniOS) { * DeleteVideoIniOS (); * } else { * string videoPath = ShareREC.lastRecordingPath (); * if (videoPath != null) { * string dirPath = Path.Combine (Application.persistentDataPath,"ScreenCaps"); * FileInfo file = new FileInfo (videoPath); * string realVideoPath = Path.Combine (dirPath, file.Name); * File.Move (videoPath, realVideoPath); * * Utility.PrepareForSendMessage ("StopScreenCap", "0",realVideoPath,true); * * } * } * * } * * void DeleteVideoIniOS() * { * * Utility.LogPrint ("--------start delete file"); * * string videoPath = ShareREC.lastRecordingPath (); * Utility.LogPrint ("--------"+videoPath); * * if (File.Exists (videoPath)) { * File.Delete (videoPath); * Utility.LogPrint ("--------delete file"); * } else { * Utility.LogPrint ("++++++++++"+videoPath); * } * isDeleteVideoIniOS = false; * * } */ #endif #if UNITY_ANDROID void StopRecorderEnd() { if (!isDeleteVideo) { long[] videoArr = ShareREC.ListLocalVideos(); string videoPath = ShareREC.GetLocalVideoPath(videoArr [videoArr.Length - 1]); Utility.PrepareForSendMessage("StopScreenCap", "0", videoPath, true); } else //delete video { long[] videoArrID = ShareREC.ListLocalVideos(); if (videoArrID.Length >= 1) { ShareREC.DeleteLocalVideo(videoArrID[videoArrID.Length - 1]); } isDeleteVideo = false; } }