public Recording Provide(ReplayPlayback replayPlaybackInfo, int replaySpeed, int framesPerSecond, string recordingSavePath) { if (replayPlaybackInfo == null) { throw new RecordingProviderException($"Argument not provided: {replayPlaybackInfo}"); } if (string.IsNullOrEmpty(recordingSavePath)) { throw new RecordingProviderException($"Argument not provided: {recordingSavePath}"); } try { Path.GetFullPath(recordingSavePath); } catch (Exception exception) { throw new RecordingProviderException(Error.InvalidPathError, exception); } return(new Recording { StartTime = (int)replayPlaybackInfo.Time, EndTime = (int)(replayPlaybackInfo.Time + replayPlaybackInfo.Length), ReplaySpeed = replaySpeed, FramesPerSecond = framesPerSecond, Path = recordingSavePath, Lossless = true, IsRecording = true }); }
public async Task <ReplayPlayback> SetupRecordingAsync(ReplayPlayback replayPlayback) { if (replayPlayback == null) { throw new System.ArgumentNullException(nameof(replayPlayback)); } return(await _restRepostory.PostAsync(ReplayPlaybackURL, replayPlayback)); }