StreamSaver.js icon indicating copy to clipboard operation
StreamSaver.js copied to clipboard

Support for [email protected]

Open heri16 opened this issue 3 years ago • 4 comments

[email protected] has been released and includes some breaking changes.

https://github.com/MattiasBuelens/web-streams-polyfill/blob/master/CHANGELOG.md

Is there any intent to support it?

heri16 avatar Oct 22 '20 11:10 heri16

Is there any intent to support it?

Um, yea... do you know what is breaking?

jimmywarting avatar Oct 22 '20 12:10 jimmywarting

I use [email protected]

But. Did not find any problems

btw: If use import should import 'web-streams-polyfill/dist/polyfill.min.js'

a-wing avatar Oct 22 '20 15:10 a-wing

Specifically for us, we ran into an incompatibility:

    function IsWritableStream(x) {
        if (!typeIsObject(x)) {
            return false;
        }
        if (!Object.prototype.hasOwnProperty.call(x, '_writableStreamController')) {
            return false;
        }
        return true;
    }

This function (which is part of the web-streams-polyfill) returns false when looking at StreamSaver's createWriteStream result.

This result in an error when using pipeTo:

ReadableStream.prototype.pipeTo's first argument must be a WritableStream

EtienneBruines avatar Jul 14 '21 12:07 EtienneBruines

Yea, it's a big issue with interchangeable versions of native and polyfilled streams u pretty much have to use the same version of readable+writable stream for them to work together

Possible solution i have waited long for: https://github.com/MattiasBuelens/web-streams-polyfill/issues/20

related issues: https://github.com/MattiasBuelens/web-streams-polyfill/issues/70 https://github.com/MattiasBuelens/web-streams-polyfill/issues/75

jimmywarting avatar Jul 14 '21 12:07 jimmywarting