GRI-1854: playback from the cache, offline — grimoirix-signage-client #89
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!89
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/GRI-1854-offline-playback"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Signage #21 (GRI-1854): the client plays from its cache, full screen, with or without a server.
Stacked on #86, which is stacked on #84. Merge in the order #84 → #86 → this PR. This diff then shrinks to the six files in the last commit.
What is added
player.rs(pure, 8 tests): the merged cursor plus the cache gives the nextStep.CannotLoad. If nothing is valid, it isNothingScheduled. These are kept apart, asoffline-first.mdasks.httpandhttpsURLs reach the web view, sofile://andjavascript:are refused (tested).playback.rs:Cursor::resumeandCursor::position, so the player can own the playlist. Nothing in the existing behaviour changes.renderer/image.rs:show_fitted, which scales to the window and keeps the aspect ratio. A PDF page arrives at the server's render size, not the screen's.grimoirix-signage-client, a new binary behindgtk-renderer:watchchannels connect them: the playlist goes one way, the item on screen goes back as the heartbeat'splaying_item;GRIMOIRIX_RENDERER_WINDOWEDis set, the same variable as #81.#21 "done when" (pull the network cable: the playlist keeps playing), run on this host under Xvfb at 1280×720. The server address pointed at a closed port, and the data dir held a stored identity and playlist:
One bug the live run caught, and this PR fixes it: a
tokio::watchreceiver counts its first value as already seen. So the playlist loaded from disk never reached the player, and an offline start showed a blank fallback. The player is now seeded from the receiver at start-up.For packaging (#81, Forgemother): the
.debshould install this binary as/usr/bin/grimoirix-signage-client, notrenderer_spike. Build it withcargo build --release -p client --features gtk-renderer --bin grimoirix-signage-client. It reads/etc/grimoirix-signage/client.toml(server = "https://…") orGRIMOIRIX_SIGNAGE_SERVER.Known limits, for later:
Tests: 8 new unit tests in
player../scripts/local-gates.sh --rust-onlypasses.cargo clippy -p client --features gtk-renderer --all-targets -D warningsis clean; CI does not build that feature.