From a0be6bfcac07a256949082e935e1be06753ab872 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Thu, 15 Oct 2026 10:17:29 +0200 Subject: feat(cli): stream — a film or a song played in a media player MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `meshbay-cli stream PATH` serves one video or sound file over HTTP on 127.0.0.1 for VLC, mpv or any player that reads HTTP; `--player PROGRAM` starts the player, and closing it stops the stream, as Ctrl+C does. The file goes as the node stores it: no remux, no transcode, no stream slot on the node. Byte ranges are answered from leaseless file_req chunks decrypted in memory, eight ahead and the last 24 kept. Loopback only, a random token in the address, a foreign Host refused (DNS rebinding), an audio or video type with nosniff. The connection is pinged and reopened when it dies; a refusal by the node stops the stream (exit 5). Co-Authored-By: Claude Opus 5.5 --- docs/USERGUIDE.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs/USERGUIDE.md') diff --git a/docs/USERGUIDE.md b/docs/USERGUIDE.md index 5b6f77a..93205d3 100644 --- a/docs/USERGUIDE.md +++ b/docs/USERGUIDE.md @@ -245,6 +245,7 @@ meshbay-cli chat Family -m "On my way" # post one (-m - reads it from stdin) meshbay-cli chat Family --follow # then each new message, until Ctrl+C meshbay-cli chat # interactive: pick a group, talk, Esc to leave meshbay-cli get -R Family/photos/2024 # download, here; -o elsewhere +meshbay-cli stream --player vlc 'Family/films/Night Drive.mkv' # play it; Ctrl+C stops meshbay-cli put -R ~/scans Family/documents meshbay-cli rm Family/documents/old-draft.odt # asks first; --yes in a script meshbay-cli logout @@ -254,7 +255,10 @@ A group is named as the GROUP column of `meshbay-cli groups` prints it; add `@owner` only when two of your groups share a name. Quote wildcards (`'Family/music/*.flac'`): they are matched against the group, not against your disk. An interrupted download resumes where it stopped the next time you -run the same `get`. `rm` deletes what you uploaded, from any of your devices; +run the same `get`. `stream` plays a film or a song without downloading it: +it prints an address to open in VLC or mpv (or starts the player with +`--player`), which works on this computer only and until you press Ctrl+C or +close the player; skipping ahead in the player works. `rm` deletes what you uploaded, from any of your devices; the node's operator can delete anything. Run `meshbay-cli` with nothing after it for a two-pane view: this computer on the left, your groups on the right, F5 to copy the selection across, Delete to delete it from the group (what `rm` may delete). -- cgit v1.2.3