-
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
How would I use this player from a Rust based WASM frontend framework? (Leptos) #7
Comments
I think itd be very difficult given that this project is not pure rust, and has some ts/js code thats required. |
Hi, I'm not too familiar with Leptos but yeah, the main way of interfacing with this library (its full API) today is through JavaScript. I guess there could be some adaptations to make it accessible in rust or WASM but I didn't yet take the time to think about it, though it would be a technically interesting project for sure. Also right now it also depends on JavaScript and web APIs for media buffering and playback control, especially on the MSE API and on the behavior of the HTML5's HTMLVideoElement, which can only be interacted to through JavaScript. Even HTTP requests, logging, or any kind of input/output has to go through JS due to how WebAssembly works today on the web. Still, I guess you could have something like Leptos - which is presumably mostly compiled down to WebAssembly and some JavaScript glue code - calling this JavaScript library, itself running a WebWorker and Rust through Webassembly inside (it needs JavaScript to do both anyway). |
Got it. We decided not to pursue this due to its infeasibility and the uphill nature of the problem. We decided to use hls-js and use a JS based framework - SvelteKit |
I am writing a frontend app in Leptos and I need to display an HLS stream in that app.
How would I use integrate this library to stream video to a WASM webapp?
The text was updated successfully, but these errors were encountered: