javascript - Bytes range with Google Cloud Storage in Express -


i'm using google cloud storage hosting media. i've been trying chrome buffer audio when serving through express app. cannot seem figure out how set byte ranges on google cloud storage stream, causing chrome refuse.

i using express-range getting requested range, , google's official library interacting gcs.

const file = bucket.file(source.path); const stream = file.createreadstream({   'start': req.range.first,   'end': req.range.last, });  stream.pipe(res); 

this results in chrome refusing stream audio (greying out player when viewed in tab), , don't understand why. getting warning also: enter image description here

you can test audio here (it's ngrok tunnel)

edit: ended using send-seekable works usecase. not sure if performance, doesn't set byte ranges on gcs request, meaning entire resource being fetched (unless misunderstand how streams work)


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -