Redo clips api

This commit is contained in:
2023-12-11 13:04:33 +00:00
parent 79973a3091
commit b75bea89e6
5 changed files with 109 additions and 19 deletions

View File

@ -2,7 +2,17 @@ namespace NostrStreamer.Services.Clips;
public interface IClipService
{
Task<ClipResult?> CreateClip(Guid streamId, string takenBy);
Task<List<ClipSegment>?> PrepareClip(Guid streamId);
Task<ClipResult?> MakeClip(string takenBy, List<ClipSegment> segments, float start, float length);
}
public record ClipResult(Uri Url);
public record ClipSegment(Guid Id, int Index)
{
public string GetPath()
{
return Path.Join(Path.GetTempPath(), Id.ToString(), $"{Index}.ts");
}
}