Cloudfare R2 mismatches between 206 and 200 status code

I use cloudfare r2 to store and stream videos for my website. When i first play the video, the video works fine but when i forward to some point of the video, it restarts the video, playing from 00:00. The workaround is to reload the page, which is ofc not good for user experience. When i investigate the network log, i found out that the first time playing the video, the status code is 200. After reload the page, the status code is 206 - partial content. The issue gets worse once after i reload the page. When i try to seek to some points of the video, some of the requests are 206, but some are 200, which forces to download the large chunk of video in between. Is there a way to always make 206 requests to cloudfare r2. I am using Nextjs and videojs for streaming.
2 Replies
Erisa
Erisa10mo ago
How large is the video file? There are some known issues with files above 512MB where the fix is to disable cache on the path (since non-Enterprise plans won't cache above that size anyway)
groktruth
groktruthOP10mo ago
Hi, the size varies from 500mb to 2gb Thanks for your response. I can fix the bug now
Want results from more Discord servers?
Add your server