Streaming large file from Object Storage

Is it possible to stream large files through Worker? i am hosting some videos on an object storage service. the link for video on object storage is like this
I want to change it to my domain like this
I use the script below but video buffers for 30 sec to 1 min, cannot fast forward and the video stops completely after few minutes of play.
I truly appreciate any help

async function handleRequest(request) {
const parsedUrl = new URL(request.url)
let path = parsedUrl.pathname
let lastSegment = path.substring(path.lastIndexOf('/'))
if (lastSegment.indexOf('.') === -1) {
path += '/index.html'
return fetch("" + path)
addEventListener('fetch', event => {

Workers aren’t built for this, there’s a separate video streaming product.

I don’t need CF to host my videos. I want to use it as proxy. other users use workers for similar video project. thanks anyway
for your reference :

Problem is, the workers are per-request, the process don’t live long enough for you to view the video.

1 Like