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:
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
Post a Comment