react-player icon indicating copy to clipboard operation
react-player copied to clipboard

HLS video downloading whole files on initial. LFS git

Open ardiansyaherwin opened this issue 4 years ago • 2 comments

Hi,

I faced an issue that only happens on production build. The HLS method is working fine on local development, the player only fetch some first TS files and the video player is working properly.

Once the app is lived on production, on initial load, the player is downloading all TS files (you can see it on network tab). Though it's already finished downloading all TS files, the video cant be played.

No error shown, that's why I'm so confused right now. any help would be great.

Maybe it happened because I hosted the TS files on Git LFS?

You can see the app live in https://pentjoeri-hati-front.vercel.app/. username: user2 password: user2user2

here's my code: <ReactPlayer url="/show/pentjoeri-hati-kelompok-pojok-2021.m3u8" className='react-player' config={{ file: { forceHLS: true, } }} width='100%' height='100%' controls />

  Thanks

ardiansyaherwin avatar Aug 26 '21 12:08 ardiansyaherwin

Hey man, did you ever work this out?

I have a 35 second MP4 that I converted to m3u8 using ffmpeg that generates 17 second chunks. However, when I load the react-player, it downloads ALL 17 chunks straight away. Sort of nullifying the point of wanting to use HLS.

LiamWinterton avatar Nov 04 '22 11:11 LiamWinterton

Same here. There must be an option to prevent loading all the parts but only if the user keeps watching it should be downloaded. It creates unnecessary traffic. Any help is appreciated.

tacettintiras avatar Jun 14 '23 11:06 tacettintiras