mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-08-07 09:42:50 +00:00
Added dotnet FCast client.
This commit is contained in:
parent
f0fa5c067f
commit
c4e9303cc3
8 changed files with 1191 additions and 0 deletions
74
clients/terminal-dotnet/FCastClient/Models.cs
Normal file
74
clients/terminal-dotnet/FCastClient/Models.cs
Normal file
|
@ -0,0 +1,74 @@
|
|||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
public class PlayMessage
|
||||
{
|
||||
[JsonPropertyName("container")]
|
||||
public required string Container { get; set; }
|
||||
|
||||
[JsonPropertyName("url")]
|
||||
public string? Url { get; set; }
|
||||
|
||||
[JsonPropertyName("content")]
|
||||
public string? Content { get; set; }
|
||||
|
||||
[JsonPropertyName("time")]
|
||||
public double? Time { get; set; }
|
||||
|
||||
[JsonPropertyName("speed")]
|
||||
public double? Speed { get; set; }
|
||||
|
||||
[JsonPropertyName("headers")]
|
||||
public Dictionary<string, string>? Headers { get; set; }
|
||||
}
|
||||
|
||||
public class SeekMessage
|
||||
{
|
||||
[JsonPropertyName("time")]
|
||||
public required double Time { get; set; }
|
||||
}
|
||||
|
||||
public class PlaybackUpdateMessage
|
||||
{
|
||||
[JsonPropertyName("time")]
|
||||
public required double Time { get; set; }
|
||||
|
||||
[JsonPropertyName("duration")]
|
||||
public required double Duration { get; set; }
|
||||
|
||||
[JsonPropertyName("speed")]
|
||||
public required double Speed { get; set; }
|
||||
|
||||
[JsonPropertyName("state")]
|
||||
public required int State { get; set; } // 0 = None, 1 = Playing, 2 = Paused
|
||||
}
|
||||
|
||||
public class VolumeUpdateMessage
|
||||
{
|
||||
[JsonPropertyName("volume")]
|
||||
public required double Volume { get; set; } // (0-1)
|
||||
}
|
||||
|
||||
public class SetVolumeMessage
|
||||
{
|
||||
[JsonPropertyName("volume")]
|
||||
public required double Volume { get; set; }
|
||||
}
|
||||
|
||||
public class SetSpeedMessage
|
||||
{
|
||||
[JsonPropertyName("speed")]
|
||||
public required double Speed { get; set; }
|
||||
}
|
||||
|
||||
public class PlaybackErrorMessage
|
||||
{
|
||||
[JsonPropertyName("message")]
|
||||
public required string Message { get; set; }
|
||||
}
|
||||
|
||||
public class VersionMessage
|
||||
{
|
||||
[JsonPropertyName("version")]
|
||||
public required ulong Version { get; set; }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue