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

QUESTION: Possible to stream data instead of downloading and extracting the zip/h5p? #108

Closed
asif-ir opened this issue Mar 29, 2022 · 2 comments

Comments

@asif-ir
Copy link

asif-ir commented Mar 29, 2022

Is there any way to use this library if we can't pull and unzip the h5p bundle every time and instead we store unzipped data directly in some blob storage (like GCS) and provide url to that directory?

@kennberg
Copy link

H5P player loads the content files in the browser (client-side). If you were to point to .h5p file, which is a zip file, the browser wouldn't be able to access the files inside it. AFAIK you need to host the content files in GCS.

@0xMurage
Copy link
Collaborator

linking a related issue #16

From my theoretical standpoint, it is technically plausible.

One approach you can try is using web workers to intercept all H5P requests. The web worker would have to do all the good stuff like unzipping/reading any requested file.

An H5P zipped file includes the instructions on what (content type) and how to display the content (h5p.json & library definitions). Thus, an H5P player acts as an execution engine and a glue to tie everything together.

If you're concerned about storage space, I would recommend storing all H5P libraries in a single location (to avoid duplicates). Most H5P libraries are versioned, so they are easily reused by different content types.

@asif-ir asif-ir closed this as completed Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants