@banou/media-player 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.tsx +0 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@banou/media-player",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@emotion/react": "^11.10.5",
39
39
  "jassub": "^1.7.1",
40
- "libav-wasm": "^0.3.1",
40
+ "libav-wasm": "^0.3.2",
41
41
  "mp4box": "^0.5.2",
42
42
  "osra": "^0.0.11",
43
43
  "p-queue": "^7.3.4",
package/src/index.tsx CHANGED
@@ -252,7 +252,6 @@ const FKNVideo = forwardRef<HTMLVideoElement, VideoHTMLAttributes<HTMLInputEleme
252
252
 
253
253
  const pull = async () => {
254
254
  const chunk = await remuxer.read()
255
- // @ts-expect-error
256
255
  chunks = [...chunks, chunk]
257
256
  return chunk
258
257
  }
@@ -268,7 +267,6 @@ const FKNVideo = forwardRef<HTMLVideoElement, VideoHTMLAttributes<HTMLInputEleme
268
267
  for (let i = 0; i < sliceIndex + BUFFER_COUNT; i++) {
269
268
  if (chunks[i]) continue
270
269
  const chunk = await pull()
271
- // @ts-expect-error
272
270
  await appendBuffer(chunk.buffer)
273
271
  }
274
272
 
@@ -304,9 +302,7 @@ const FKNVideo = forwardRef<HTMLVideoElement, VideoHTMLAttributes<HTMLInputEleme
304
302
  chunks = []
305
303
  await remuxer.seek(seekTime)
306
304
  const chunk1 = await pull()
307
- // @ts-expect-error
308
305
  sourceBuffer.timestampOffset = chunk1.pts
309
- // @ts-expect-error
310
306
  await appendBuffer(chunk1.buffer)
311
307
  if (firstSeekPaused === false) {
312
308
  await videoElement.play()
@@ -323,7 +319,6 @@ const FKNVideo = forwardRef<HTMLVideoElement, VideoHTMLAttributes<HTMLInputEleme
323
319
  })
324
320
 
325
321
  const firstChunk = await pull()
326
- // @ts-expect-error
327
322
  appendBuffer(firstChunk.buffer)
328
323
 
329
324
  videoElement.addEventListener('timeupdate', () => {