Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better stream audio/video content with libzim wasm #869

Open
mossroy opened this issue Jun 6, 2022 · 0 comments
Open

Better stream audio/video content with libzim wasm #869

mossroy opened this issue Jun 6, 2022 · 0 comments

Comments

@mossroy
Copy link
Contributor

mossroy commented Jun 6, 2022

Libzim supports reading only chunks of data of a DirEntry : https://libzim.readthedocs.io/en/stable/api/classzim_1_1Item.html#_CPPv4NK3zim4Item7getDataE11offset_type9size_type

This is something we are not able to do with our current custom javascript backend.

Making use of this in the ServiceWorker would avoid wasting resources reading the complete data when the browser only requests a chunk.
It would probably improve performance when seeking inside audio/video content. In particular when the user is dragging the cursor of the progress bar (which can generate multiple HTTP requests requesting for small chunks)

It should not be very difficult to implement, as it only needs to pass offset and length parameters to getData().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants