Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipeThrough() not working in Safari #15

Open
kleinph opened this issue Mar 20, 2023 · 0 comments
Open

pipeThrough() not working in Safari #15

kleinph opened this issue Mar 20, 2023 · 0 comments

Comments

@kleinph
Copy link

kleinph commented Mar 20, 2023

When using the CompressionStreams polyfill with Safari like this:

file.stream().pipeThrough(new CompressionStream('gzip'));

the invocation of pipeThrough() fails with readable should be ReadableStream.

The error is thrown after isReadableStream check failed [1]. After debugging I'm sure, that it is failing, because the symbol readableStreamController_ is not defined in the tested value [2].

Note that Safari is also polyfilling the basic streams implemenation, bacause there is no support for BYOB/bytsoures.
Not using the polyfill and instead directly importing CompressionStream from the lib works.

This issue occurs at least on Safari 16.3 and 15.5 and TP.

I made a minimal reproducer in StackBlitz (check console output): https://stackblitz.com/edit/js-gaksqm

1:
throw new TypeError("readable must be a ReadableStream");

2:
return readableStreamController_ in value;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant