Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
well theres xhr or fetch. I assume because you're using react, the clients browser is newer, so fetch might be better.
-
Sushrant844y@Wisecrack how to serve video from server, can i return it as normal ? i guess it will hamper user data? for ex. if video is of 1 gb should i return whole video ?
or should i return whole video and fetch in step by step ? -
@Sushrant if the video is 1gb, no I would not recommend returning the whole thing, only this is a frontend for *local* video files.
If you're accessing remote video files, you're gonna want to stream them using say rmtp.
frontend I'd use something like videojs which suppports hls and other streaming formats out of the box.
but im really new so get a second opinion for sure. -
Sushrant844y@Wisecrack thank you again bro, if used technology like video js or something which support hls. Can i return whole file from backend and leave rest of the work for frontend to get that data in chunk form?
-
@Sushrant try it. see if videojs automatically retrieves in chunks. watch incoming data requests in chrome devtools.
Related Rants
I almost looked for every possible source but is not satisfied or not found optimum way or path.
Actually i have to build a netflix clone (not exactly but a video on demand platform for one local client). The tech stack will be React at the frontend and DRF (Django Rest Framework) at the backend.
I know the node will match my purpose at best, but this needs to be done on DRF. How should I return the video, should I return it in bytes, packets and what can sample code look like, how frontend should fetch it. It will really help if you put your insight, in general. Thank you
question
drf
django
python