diff options
| author | RblSb <msrblsb@gmail.com> | 2025-01-26 23:22:33 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2025-01-28 15:46:30 +0300 |
| commit | 0592564264fff57ccfd9677957196951f9f1c6cf (patch) | |
| tree | c360c2e5d45d9ac8706f836b0466b88221e1f10d /src/Types.hx | |
| parent | c7518e58788c17ad2ca8340ab5c7633489aa9518 (diff) | |
Video upload feature
And you can play video as soon as upload starts! This is pretty useful for thicc ones. Video will be keeped in cache and will comply cache size limit.
I'm also implemented system storage check to change cache limit if it's lower than config value, so upload will be blocked if there is lower than 10MiB available on disk.
Diffstat (limited to 'src/Types.hx')
| -rw-r--r-- | src/Types.hx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/Types.hx b/src/Types.hx index ec09b5c..ac2599c 100644 --- a/src/Types.hx +++ b/src/Types.hx @@ -14,6 +14,12 @@ typedef VideoDataRequest = { final atEnd:Bool; } +typedef UploadResponse = { + info:String, + ?url:String, + ?errorId:String, +} + typedef VideoData = { final duration:Float; var ?title:String; @@ -107,6 +113,12 @@ typedef Message = { time:String } +enum abstract ProgressType(String) { + var Caching; + var Downloading; + var Uploading; +} + @:using(Types.VideoItemTools) typedef VideoItem = { /** Immutable, used as identifier for skipping / removing items **/ @@ -183,6 +195,11 @@ typedef WsEvent = { ?serverMessage:{ textId:String }, + ?progress:{ + type:ProgressType, + ratio:Float, + ?data:String + }, ?updateClients:{ clients:Array<ClientData>, }, @@ -251,9 +268,8 @@ enum abstract WsEventType(String) { var Logout; var Message; var ServerMessage; + var Progress; var UpdateClients; - // var AddClient; - // var RemoveClient; var BanClient; var KickClient; var AddVideo; |
