@banou/media-player 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +1 -1
- package/package.json +1 -1
- package/src/utils.ts +4 -3
package/build/index.js
CHANGED
|
@@ -1885,7 +1885,7 @@ const sa = (e, r) => {
|
|
|
1885
1885
|
try {
|
|
1886
1886
|
t.enqueue(this.buffers.shift()), i();
|
|
1887
1887
|
} catch (o) {
|
|
1888
|
-
if (!(o instanceof TypeError && o.message === "ReadableStreamDefaultController.enqueue: Cannot enqueue into a stream that has already been requested to close."))
|
|
1888
|
+
if (!(o instanceof TypeError && (o.message === "ReadableStreamDefaultController.enqueue: Cannot enqueue into a stream that has already been requested to close." || o.message === "Failed to execute 'enqueue' on 'ReadableStreamDefaultController': Cannot enqueue a chunk into a readable stream that is closed or has been requested to be closed")))
|
|
1889
1889
|
throw o;
|
|
1890
1890
|
}
|
|
1891
1891
|
},
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -231,10 +231,11 @@ export const toBufferedStream = (SIZE: number) => (stream: ReadableStream) =>
|
|
|
231
231
|
controller.enqueue(this.buffers.shift())
|
|
232
232
|
tryToBuffer()
|
|
233
233
|
} catch(err) {
|
|
234
|
-
// firefox somehow shits the bed here
|
|
235
234
|
if (!(
|
|
236
|
-
err instanceof TypeError &&
|
|
237
|
-
|
|
235
|
+
err instanceof TypeError && (
|
|
236
|
+
err.message === 'ReadableStreamDefaultController.enqueue: Cannot enqueue into a stream that has already been requested to close.' ||
|
|
237
|
+
err.message === `Failed to execute 'enqueue' on 'ReadableStreamDefaultController': Cannot enqueue a chunk into a readable stream that is closed or has been requested to be closed`
|
|
238
|
+
)
|
|
238
239
|
)) {
|
|
239
240
|
throw err
|
|
240
241
|
}
|