@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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banou/media-player",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
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
- err.message === 'ReadableStreamDefaultController.enqueue: Cannot enqueue into a stream that has already been requested to close.'
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
  }