feat(podcasts): prepare seekable MP4 replays and overlay controls
Remux completed broadcasts with FFmpeg, retain source segments and account for both formats. Serve authenticated byte ranges and add native Android/Desktop replay controls with auto-hide. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
ed75f06fb2
commit
1dcbfe159a
31 changed files with 1386 additions and 36 deletions
|
|
@ -7,6 +7,13 @@ namespace Yavsc.Abstract.Streaming;
|
|||
[JsonConverter(typeof(JsonStringEnumConverter<PodcastState>))]
|
||||
public enum PodcastState { Live, Completed, Interrupted }
|
||||
|
||||
/// <summary>Preparation state of the seekable MP4 copy of a completed broadcast.</summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter<PodcastReplayState>))]
|
||||
public enum PodcastReplayState { Pending, Processing, Ready, Failed }
|
||||
|
||||
/// <summary>Persistent MP4 preparation result; source segments are retained.</summary>
|
||||
public sealed record PodcastReplayResponse(PodcastReplayState State, long Bytes = 0, string? Error = null);
|
||||
|
||||
/// <summary>Creates an authenticated live broadcast with a retained replay.</summary>
|
||||
public sealed record CreatePodcastRequest
|
||||
{
|
||||
|
|
@ -18,7 +25,10 @@ public sealed record CreatePodcastRequest
|
|||
public sealed record PodcastResponse(
|
||||
Guid Id, string Title, string OwnerId, string OwnerName,
|
||||
DateTimeOffset CreatedAt, DateTimeOffset UpdatedAt, PodcastState State,
|
||||
int SegmentCount, long Bytes, double DurationSeconds);
|
||||
int SegmentCount, long Bytes, double DurationSeconds)
|
||||
{
|
||||
public PodcastReplayResponse? Replay { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>An independently decodable MPEG-TS HLS segment.</summary>
|
||||
public sealed record PodcastSegmentResponse(int Sequence, double DurationSeconds, int Bytes);
|
||||
|
|
|
|||
Loading…
Reference in a new issue