app: show the game being recorded while it runs
The daemon's protocol says whether it is recording and which game it is on, and nothing else, so the app could not say what was being recorded or stop it. A Recording screen now opens by itself when a recording starts, and at launch if one is already running, and a button in the title bar brings it back from any other screen. It shows the champion, the queue and the summoner, when the game began, two clocks, the live scoreline and both teams, and the clip being written as it grows on disk. The game's own data is read once a second on a thread of its own, from the endpoint the daemon polls for its events, which needs no login. Without an answer the screen keeps what it has and says it is waiting. Stop recording and Stop and delete end the game. A stop over the protocol is not the stop the recorder gives a game that ends by itself. The video lands in a new timeline while the open one is left behind, which showed in the match history as a game that never happened, next to one with no champion. Stopping from the app closes the open timeline into the one holding the video, and deleting removes the clip and both. The history skips timelines that have no end meanwhile, so a recording in progress is not listed as a game.
This commit is contained in:
1 parent
b9d97d0724
commit
e546ab6969
6 files changed
+1522
-9
No files matched your search
+22
-2
@@ -23,7 +23,10 @@ Headless renders, for looking at a screen without a window:
|
||||
```sh
|
||||
cargo run -- --snap history.png --scene history
|
||||
cargo run -- --snap settings.png --scene settings
|
||||
cargo run -- --snap recording.png --scene recording
|
||||
cargo run -- --snap recording.png --scene recording # the settings tab
|
||||
cargo run -- --snap recording-live.png --scene recording-live # a game being recorded
|
||||
cargo run -- --snap recording-live-delete.png --scene recording-live-delete
|
||||
cargo run -- --snap recording-idle.png --scene recording-idle
|
||||
cargo run -- --snap audio.png --scene audio
|
||||
cargo run -- --snap review.png --scene review
|
||||
cargo run -- --snap clips.png --scene clips
|
||||
@@ -70,7 +73,7 @@ reading (`history::tests`), highlight clipping (`highlight::tests`) and formatti
|
||||
| `src/export.rs` | ffmpeg clip export, the clips folder it fills and its miniatures |
|
||||
| `src/os.rs` | Run key, toasts, tray icon and menu |
|
||||
| `src/ui.rs` | Colours, cards, switches, sliders, buttons |
|
||||
| `src/screens/` | Settings, match history, clips, game review |
|
||||
| `src/screens/` | Settings, match history, clips, game review, the recording in progress |
|
||||
|
||||
## Where this stands against TODO.txt
|
||||
|
||||
@@ -110,6 +113,23 @@ reading (`history::tests`), highlight clipping (`highlight::tests`) and formatti
|
||||
10. Parity: `tauri-app` is still in the tree. Delete it once the items above are verified on a
|
||||
machine with a live League Client.
|
||||
|
||||
### The recording screen
|
||||
|
||||
While the daemon records, the app opens on the game it is recording and can stop it. The
|
||||
daemon's protocol answers about the daemon only — recording or not, and which game id — so the
|
||||
screen reads the game where it is: `/liveclientdata/allgamedata` on `https://127.0.0.1:2999`,
|
||||
the endpoint the daemon itself polls for its events, which needs no login. It is read once a
|
||||
second on a thread of its own, together with the timeline the recorder opened for this game
|
||||
(the champion, the queue and the summoner it fetched at the start) and the clip being written
|
||||
in the recordings folder. Without the game's answer the screen still shows what it has, and
|
||||
says it is waiting.
|
||||
|
||||
Stopping over the protocol is not the stop the recorder gives a game that ends by itself: the
|
||||
recorder writes the video into a new timeline and leaves the open one behind, which would show
|
||||
in Match history as a game that never happened, next to one with no champion. The app closes
|
||||
the open timeline into the one holding the video (`history::close_stopped`), and "Stop and
|
||||
delete" removes the clip and both.
|
||||
|
||||
### Known gaps
|
||||
|
||||
- Item images are not drawn. Champion portraits download from Data Dragon on first sight and are
|
||||
|
||||
Reference in new issue
Block a user