diff options
| author | Adam Soltys <[email protected]> | 2026-10-13 05:10:27 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-13 05:10:27 +0000 |
| commit | 6fdca50f17b1e814bbf6ba1fc1ffcb18001c54fd (patch) | |
| tree | 6598fdb3a3f870cb3eb76e23eb630b07797d5b5e /android/app/src | |
| parent | 028dd56084b5a07bbff6d37e5f760ad344d58060 (diff) | |
| download | coinosv3-6fdca50f17b1e814bbf6ba1fc1ffcb18001c54fd.tar.gz coinosv3-6fdca50f17b1e814bbf6ba1fc1ffcb18001c54fd.zip | |
Media pager: every clip plays when it comes up, and the next two get a half-megabyte head start. Adam: flipping through clips should just play them, large ones too, and load a bit of what's next — not the whole of it. A clip over the size budget (or one whose size the host won't say: most, behind CORS) used to wait in the pager under a tap-to-play cover, and even a small one waited on its size probe (up to 5 s of HEAD) before playing. Now, on an ordinary connection, the pager plays the clip on screen at once, streaming as it goes, and fetches the opening 512 KB of the next two into the browser's HTTP cache with a range request (a host that ignores the range has the rest cancelled); the player, given the file when it's swiped to, takes its opening from the cache and streams on from there (the test's server sees its first request start at byte 524288; playing ~300 ms after the swipe). The next clips get no player of their own beforehand: one given its file, even with preload=metadata, took the whole 34 MB on a fast link. With Data Saver on or a slow link (2g/3g), the pager is careful as before: a clip over budget waits for a tap and nothing loads ahead. tools/pager-eager-test.js (35 MB clips: covered in the feed, played in the pager, 512 KB each ahead and nothing more, the cache reused; Data Saver: nothing ahead, the cover); feed-media-views-test moves its tap-to-play checks onto a slow link and checks the 50 MB clip plays on an ordinary one (its index-last probe check fails on HEAD before this too).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KPw21NEpWeTGu6swVASmBt
Diffstat (limited to 'android/app/src')
0 files changed, 0 insertions, 0 deletions
