mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 03:11:10 +00:00
Adds the playback manifest endpoint
This commit is contained in:
1 parent
7dc5953e1d
commit
d7c1ae60c2
17 files changed
+993
-10
No files matched your search
+21
@@ -0,0 +1,21 @@
|
||||
namespace Lumina.Domain.SharedKernel.Common.Enums.Playback;
|
||||
|
||||
/// <summary>
|
||||
/// Extension methods for <see cref="PlaybackDeliveryShape"/>.
|
||||
/// </summary>
|
||||
public static class PlaybackDeliveryShapeExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets whether the audio delivered in the provided <paramref name="shape"/> can be seeked by a player.
|
||||
/// </summary>
|
||||
/// <param name="shape">The shape the delivered audio is addressed and seeked by.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true"/> when the shape can be seeked, otherwise <see langword="false"/>. Audio delivered as the original file is
|
||||
/// seeked by byte range, and audio delivered as time addressed segments is seeked by segment, so both of the shapes the server
|
||||
/// produces are seekable; a future shape that cannot be seeked reports <see langword="false"/>.
|
||||
/// </returns>
|
||||
public static bool IsSeekable(this PlaybackDeliveryShape shape)
|
||||
{
|
||||
return shape is PlaybackDeliveryShape.ByteRangeSeekable or PlaybackDeliveryShape.TimeAddressedSegments;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user