From 3ba0f3755010bbd937a7ec0d088c8a9a1fd5852d Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Thu, 29 Oct 2026 10:58:37 +0100 Subject: fix(spa): let a film read twice as far ahead The read-ahead budget stopped at 48 MB, about ninety seconds of an ordinary film. 96 MB; a smaller engine is still found by the walk. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-hub/src/meshbay_hub/static/video-player.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'packages/meshbay-hub/src/meshbay_hub/static') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/video-player.js b/packages/meshbay-hub/src/meshbay_hub/static/video-player.js index 770d2c33..96eccbd4 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/video-player.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/video-player.js @@ -44,8 +44,10 @@ const BUFFER_AHEAD_S = 90; // this SourceBuffer has actually been seen to accept. const BUFFER_AHEAD_STEP_BYTES = 4 * 1024 * 1024; // Where the walk stops even if nothing ever refuses. Memory a phone has to -// find, and past this the gain is a read-ahead nobody needs. -const BUFFER_AHEAD_MAX_BYTES = 48 * 1024 * 1024; +// find, and past this the gain is a read-ahead nobody needs. 48 MB was about +// ninety seconds of an ordinary film, too little lead on a mobile network that +// could have given more; a smaller engine is still found by the walk above. +const BUFFER_AHEAD_MAX_BYTES = 96 * 1024 * 1024; // A sanity bound on what the budget may convert to. A file whose size or // duration is wrong must not be able to ask for the whole film. const BUFFER_AHEAD_MAX_S = 600; -- cgit v1.2.3