public bool StartRecording() { using (var configuration = new RecorderConfiguration()) { var path = FilePath; if (FilePathType == OutputPathType.PersistentDataPath) { path = Application.persistentDataPath + "/" + path; } configuration.setOutputFile(path); configuration.setProfile(Profile); configuration.setZoomMode(RecordZoomMode); RecordVideoOrientation orientation; switch (Orientation) { case VideoOrientation.Portrait: orientation = RecordVideoOrientation.Portrait; break; case VideoOrientation.Landscape: orientation = RecordVideoOrientation.Landscape; break; default: orientation = Screen.width > Screen.height ? RecordVideoOrientation.Landscape : RecordVideoOrientation.Portrait; break; } configuration.setVideoOrientation(orientation); return(StartRecording(configuration)); } }
public bool StartRecording(RecorderConfiguration configuration) { if (!IsReady || recorder != null) { return(false); } recorder = Recorder.create(configuration, EasyARController.Scheduler, (Action <RecordStatus, string>)((status, message) => { if (StatusUpdate != null) { StatusUpdate(status, message); } })); recorder.start(); return(true); }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.AppendFormat("TEMS Info Message of type \"{0}\":{1}", MessageType, Environment.NewLine); sb.AppendFormat(" Server Version = {0}.{1}", (uint)ServerVersion >> 16, (uint)ServerVersion & 0xFFFF); sb.AppendLine(); sb.AppendLine("Recorder Configuration:"); sb.AppendLine(RecorderConfiguration.ToString()); sb.AppendLine(); sb.AppendLine("Site Configuration:"); if (SiteConfiguration != null) { sb.AppendLine(SiteConfiguration.ToString()); } sb.AppendLine(); return(sb.ToString()); }
public RecorderConfiguration ExportRecorderOptions() { RecordedEvents r = (RecordedEvents)recordedEventsPropertyGrid.SelectedObject; try { PuppeteerOptions p = puppeteerOptionsUserControl.ExportOptions(); RecorderConfiguration rc = new RecorderConfiguration { PuppeteerOptions = p, RecordedEvents = r }; return(rc); } catch (ArgumentException e) { MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return(new RecorderConfiguration { PuppeteerOptions = ConfigManager.GetPuppeteerConfiguration(), RecordedEvents = r }); } }