aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-29 10:58:37 +0100
committerChristophe Besson <cbesson@gmail.com>2026-10-29 10:58:37 +0100
commit3ba0f3755010bbd937a7ec0d088c8a9a1fd5852d (patch)
tree43002d5de037d46f37719e8250cee2db5cfd5d5d /packages/meshbay-hub
parent101e8fbf1b277da74a3510435e28fd4bcaa6edae (diff)
downloadmeshbay-3ba0f3755010bbd937a7ec0d088c8a9a1fd5852d.tar.gz
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 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/video-player.js6
1 files changed, 4 insertions, 2 deletions
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;