-
Notifications
You must be signed in to change notification settings - Fork 4
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
(Proposal) Support Multiple Sources for HLS Segments #6
Comments
Hello, Interesting, thanks. To my understanding, the WebRTC APIs still need to be called in JS (they are not available through WebAssembly directly), so here the WebRTC code would probably be in the By the way, it's the same situation with the To go back to P2P, what we did at the time we implemented it on the other DASH player, was to let an application define its own fetching logic and provide it as a callback through a player API which was then called by the player at request time.
The Local Storage API specifically is fairly limited in size (10 MB?) and as such is not adapted for storing large media segments for offline playback, yet the IndexedDB API allows much more storage so you're right that segment retrieval from storage may be an useful feature. That's something implemented for example by the shaka-player for offline playback. Thoughts? |
What
Currently,
wasp-hls
fetches segments only from HTTP (as per HLS spec). My proposal is to make the WASM module extensible, allowing different sources to gather the segments from.I.e. some sources could be
WebTransport
,WebSocket
,WebRTC
orLocal/Session Storage
Why
Some examples why this could be useful:
How
Proposal 1 (better)
A possible implementation could be to generalize the
Requester
struct into aRequesterTrait
enabling the user to implement different behaviours (i.eHTTPRequester
,WebRTCRequester
,LocalRequester
ecc.) or a combination of them.As of now the process of fetching a segment goes through:
Dispatcher
->Requester
->Rs Binding
->Ts Bindings
->Dispatcher
where the
Requester
is tighly coupled with the JS Bindings due to thefetch
being executed at Worker-level and returning the data with callbacks.A possible solution could be to execute the
fetch
inside the WASM (rs-core) enviroment instead of the JS one.Proposal 2 (janky af)
Intercept the
fetch
request in the Worker and pass it tors-core
where multiple handlers can be implemented and send back the response.The text was updated successfully, but these errors were encountered: