Redo clips api
This commit is contained in:
@ -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");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user