w3c / media-source

Media Source Extensions
https://w3c.github.io/media-source/
Other
268 stars 58 forks source link

Feature Request: Implement appendBuffer(blob) #185

Open beaufortfrancois opened 7 years ago

beaufortfrancois commented 7 years ago

Is there's a technical reason why blob is not a valid source for appendBuffer()? The immediate benefit I see to use blob is to not fetch the whole content at once into renderer memory like arrayBuffer does. It would be especially true in responses from the Cache API.

jyavenard commented 7 years ago

Wouldn't that concern "not fetch the whole content at once into renderer memory like arrayBuffer does." a Blink only thing?

So far down the line, may be too late to add support for blob...

calvaris commented 7 years ago

IIRC at some point there was the intention of having appendBuffer taking a ReadableStream which would allow not loading the whole buffer in memory. I just checked the status of this and could not find it anywhere.

jyavenard commented 7 years ago

I believe you mean appendStream... it was removed in #139

paulbrucecotton commented 7 years ago

Can we close this issue as a duplicate of ISSUE-14?

/paulc HME WG Chair

beaufortfrancois commented 7 years ago

@paulbrucecotton Do we have a rough ETA when to expect the next version of MSE (including appendStream())?

paulbrucecotton commented 7 years ago

The HME WG's charter currently only permits the WG to do maintenance on MSE. In Philippe's announcement it clearly states:

"As such, the Working Group is only allowed to make corrections that do not add new features [4] to its Recommendation(s) under this charter extension."

My suggestion is that those interested in the appendStream feature should "incubate" such a feature in a Community Group.

/paulc HME WG Chair

beaufortfrancois commented 7 years ago

Thank you @paulbrucecotton @wolenetz Is that something you would be interested in?

mayeaux commented 6 years ago

+1

jakearchibald commented 6 years ago

@calvaris

IIRC at some point there was the intention of having appendBuffer taking a ReadableStream which would allow not loading the whole buffer in memory

Rather than take a readable stream, it should expose a writable endpoint that you could pipe to.

I threw together a little demo of this at https://media-source-writable.glitch.me/, based on an example from @beaufortfrancois.

wolenetz commented 2 years ago

See also #14, probably a duplicate if the approach is to add a writable endpoint to a SourceBuffer to which a stream/sequence of chunks could be piped.