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

Issue with streaming big media files #534

Open
lhns opened this issue Dec 21, 2024 · 3 comments
Open

Issue with streaming big media files #534

lhns opened this issue Dec 21, 2024 · 3 comments
Labels
bug Something isn't working need/author-input Needs input from the original author need/triage Needs initial labeling and prioritization

Comments

@lhns
Copy link

lhns commented Dec 21, 2024

I find this project very fascinating because it really opens up IPFS for real-world use.
I've played around with helia-verified-fetch and it works pretty well but it cannot be used with stuff like media elements containing big media files which have to be streamed.
A service worker like this one would make it possible.
If it was easy to integrate the ServiceWorker into other projects which might not be hosted on IPFS it could be used to load media files like images, audio or videos from IPFS in a streaming fashion.

@lidel
Copy link
Member

lidel commented Jan 13, 2025

This project is using https://www.npmjs.com/package/@helia/verified-fetch under the hood.

@lhns if you had issues with streaming big files, that is a bug. Mind providing a steps to reproduce?

@lidel lidel added need/author-input Needs input from the original author need/triage Needs initial labeling and prioritization labels Jan 13, 2025
@lidel lidel changed the title Library to integrate the ServiceWorker into other projects Issue with streaming big media files Jan 13, 2025
@lidel lidel added the bug Something isn't working label Jan 13, 2025
@SgtPooki
Copy link
Member

@lhns it sounds like streaming isn't necessarily broken for you, but the way verified-fetch has to be used doesn't work for streaming because you can't pass the response to <video> elements. Is that correct?

How would you be using the service worker in your application? We have discussed creating a workbox plugin that would make it easier for devs to add the service-worker-gateway to their applications, would that work for you?

@lhns
Copy link
Author

lhns commented Jan 13, 2025

@lhns it sounds like streaming isn't necessarily broken for you, but the way verified-fetch has to be used doesn't work for streaming because you can't pass the response to <video> elements. Is that correct?

How would you be using the service worker in your application? We have discussed creating a workbox plugin that would make it easier for devs to add the service-worker-gateway to their applications, would that work for you?

Yes this is correct! I think a workbox plugin would be a nice approach. My use case is pretty much as you described it. I want to use ipfs urls as the source of media elements like video and audio but by using this approch it could be applied to any asset of a web application using the standard fetch api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need/author-input Needs input from the original author need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

3 participants