@napi-rs/webcodecs 1.0.0 → 1.1.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 (4) hide show
  1. package/README.md +147 -1
  2. package/index.d.ts +620 -24
  3. package/index.js +58 -52
  4. package/package.json +12 -11
package/index.js CHANGED
@@ -78,12 +78,12 @@ function requireNative() {
78
78
  const binding = require('@napi-rs/webcodecs-android-arm64')
79
79
  const bindingPackageVersion = require('@napi-rs/webcodecs-android-arm64/package.json').version
80
80
  if (
81
- bindingPackageVersion !== '0.0.0' &&
81
+ bindingPackageVersion !== '1.1.1' &&
82
82
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
83
83
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
84
84
  ) {
85
85
  throw new Error(
86
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
86
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
87
87
  )
88
88
  }
89
89
  return binding
@@ -100,12 +100,12 @@ function requireNative() {
100
100
  const binding = require('@napi-rs/webcodecs-android-arm-eabi')
101
101
  const bindingPackageVersion = require('@napi-rs/webcodecs-android-arm-eabi/package.json').version
102
102
  if (
103
- bindingPackageVersion !== '0.0.0' &&
103
+ bindingPackageVersion !== '1.1.1' &&
104
104
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
105
105
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
106
106
  ) {
107
107
  throw new Error(
108
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
108
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
109
109
  )
110
110
  }
111
111
  return binding
@@ -130,12 +130,12 @@ function requireNative() {
130
130
  const binding = require('@napi-rs/webcodecs-win32-x64-gnu')
131
131
  const bindingPackageVersion = require('@napi-rs/webcodecs-win32-x64-gnu/package.json').version
132
132
  if (
133
- bindingPackageVersion !== '0.0.0' &&
133
+ bindingPackageVersion !== '1.1.1' &&
134
134
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
135
135
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
136
136
  ) {
137
137
  throw new Error(
138
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
138
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
139
139
  )
140
140
  }
141
141
  return binding
@@ -152,12 +152,12 @@ function requireNative() {
152
152
  const binding = require('@napi-rs/webcodecs-win32-x64-msvc')
153
153
  const bindingPackageVersion = require('@napi-rs/webcodecs-win32-x64-msvc/package.json').version
154
154
  if (
155
- bindingPackageVersion !== '0.0.0' &&
155
+ bindingPackageVersion !== '1.1.1' &&
156
156
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
157
157
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
158
158
  ) {
159
159
  throw new Error(
160
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
160
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
161
161
  )
162
162
  }
163
163
  return binding
@@ -175,12 +175,12 @@ function requireNative() {
175
175
  const binding = require('@napi-rs/webcodecs-win32-ia32-msvc')
176
176
  const bindingPackageVersion = require('@napi-rs/webcodecs-win32-ia32-msvc/package.json').version
177
177
  if (
178
- bindingPackageVersion !== '0.0.0' &&
178
+ bindingPackageVersion !== '1.1.1' &&
179
179
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
180
180
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
181
181
  ) {
182
182
  throw new Error(
183
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
183
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
184
184
  )
185
185
  }
186
186
  return binding
@@ -197,12 +197,12 @@ function requireNative() {
197
197
  const binding = require('@napi-rs/webcodecs-win32-arm64-msvc')
198
198
  const bindingPackageVersion = require('@napi-rs/webcodecs-win32-arm64-msvc/package.json').version
199
199
  if (
200
- bindingPackageVersion !== '0.0.0' &&
200
+ bindingPackageVersion !== '1.1.1' &&
201
201
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
202
202
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
203
203
  ) {
204
204
  throw new Error(
205
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
205
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
206
206
  )
207
207
  }
208
208
  return binding
@@ -222,12 +222,12 @@ function requireNative() {
222
222
  const binding = require('@napi-rs/webcodecs-darwin-universal')
223
223
  const bindingPackageVersion = require('@napi-rs/webcodecs-darwin-universal/package.json').version
224
224
  if (
225
- bindingPackageVersion !== '0.0.0' &&
225
+ bindingPackageVersion !== '1.1.1' &&
226
226
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
227
227
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
228
228
  ) {
229
229
  throw new Error(
230
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
230
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
231
231
  )
232
232
  }
233
233
  return binding
@@ -244,12 +244,12 @@ function requireNative() {
244
244
  const binding = require('@napi-rs/webcodecs-darwin-x64')
245
245
  const bindingPackageVersion = require('@napi-rs/webcodecs-darwin-x64/package.json').version
246
246
  if (
247
- bindingPackageVersion !== '0.0.0' &&
247
+ bindingPackageVersion !== '1.1.1' &&
248
248
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
249
249
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
250
250
  ) {
251
251
  throw new Error(
252
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
252
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
253
253
  )
254
254
  }
255
255
  return binding
@@ -266,12 +266,12 @@ function requireNative() {
266
266
  const binding = require('@napi-rs/webcodecs-darwin-arm64')
267
267
  const bindingPackageVersion = require('@napi-rs/webcodecs-darwin-arm64/package.json').version
268
268
  if (
269
- bindingPackageVersion !== '0.0.0' &&
269
+ bindingPackageVersion !== '1.1.1' &&
270
270
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
271
271
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
272
272
  ) {
273
273
  throw new Error(
274
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
274
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
275
275
  )
276
276
  }
277
277
  return binding
@@ -292,12 +292,12 @@ function requireNative() {
292
292
  const binding = require('@napi-rs/webcodecs-freebsd-x64')
293
293
  const bindingPackageVersion = require('@napi-rs/webcodecs-freebsd-x64/package.json').version
294
294
  if (
295
- bindingPackageVersion !== '0.0.0' &&
295
+ bindingPackageVersion !== '1.1.1' &&
296
296
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
297
297
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
298
298
  ) {
299
299
  throw new Error(
300
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
300
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
301
301
  )
302
302
  }
303
303
  return binding
@@ -314,12 +314,12 @@ function requireNative() {
314
314
  const binding = require('@napi-rs/webcodecs-freebsd-arm64')
315
315
  const bindingPackageVersion = require('@napi-rs/webcodecs-freebsd-arm64/package.json').version
316
316
  if (
317
- bindingPackageVersion !== '0.0.0' &&
317
+ bindingPackageVersion !== '1.1.1' &&
318
318
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
319
319
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
320
320
  ) {
321
321
  throw new Error(
322
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
322
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
323
323
  )
324
324
  }
325
325
  return binding
@@ -341,12 +341,12 @@ function requireNative() {
341
341
  const binding = require('@napi-rs/webcodecs-linux-x64-musl')
342
342
  const bindingPackageVersion = require('@napi-rs/webcodecs-linux-x64-musl/package.json').version
343
343
  if (
344
- bindingPackageVersion !== '0.0.0' &&
344
+ bindingPackageVersion !== '1.1.1' &&
345
345
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
346
346
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
347
347
  ) {
348
348
  throw new Error(
349
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
349
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
350
350
  )
351
351
  }
352
352
  return binding
@@ -363,12 +363,12 @@ function requireNative() {
363
363
  const binding = require('@napi-rs/webcodecs-linux-x64-gnu')
364
364
  const bindingPackageVersion = require('@napi-rs/webcodecs-linux-x64-gnu/package.json').version
365
365
  if (
366
- bindingPackageVersion !== '0.0.0' &&
366
+ bindingPackageVersion !== '1.1.1' &&
367
367
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
368
368
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
369
369
  ) {
370
370
  throw new Error(
371
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
371
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
372
372
  )
373
373
  }
374
374
  return binding
@@ -387,12 +387,12 @@ function requireNative() {
387
387
  const binding = require('@napi-rs/webcodecs-linux-arm64-musl')
388
388
  const bindingPackageVersion = require('@napi-rs/webcodecs-linux-arm64-musl/package.json').version
389
389
  if (
390
- bindingPackageVersion !== '0.0.0' &&
390
+ bindingPackageVersion !== '1.1.1' &&
391
391
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
392
392
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
393
393
  ) {
394
394
  throw new Error(
395
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
395
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
396
396
  )
397
397
  }
398
398
  return binding
@@ -409,12 +409,12 @@ function requireNative() {
409
409
  const binding = require('@napi-rs/webcodecs-linux-arm64-gnu')
410
410
  const bindingPackageVersion = require('@napi-rs/webcodecs-linux-arm64-gnu/package.json').version
411
411
  if (
412
- bindingPackageVersion !== '0.0.0' &&
412
+ bindingPackageVersion !== '1.1.1' &&
413
413
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
414
414
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
415
415
  ) {
416
416
  throw new Error(
417
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
417
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
418
418
  )
419
419
  }
420
420
  return binding
@@ -433,12 +433,12 @@ function requireNative() {
433
433
  const binding = require('@napi-rs/webcodecs-linux-arm-musleabihf')
434
434
  const bindingPackageVersion = require('@napi-rs/webcodecs-linux-arm-musleabihf/package.json').version
435
435
  if (
436
- bindingPackageVersion !== '0.0.0' &&
436
+ bindingPackageVersion !== '1.1.1' &&
437
437
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
438
438
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
439
439
  ) {
440
440
  throw new Error(
441
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
441
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
442
442
  )
443
443
  }
444
444
  return binding
@@ -455,12 +455,12 @@ function requireNative() {
455
455
  const binding = require('@napi-rs/webcodecs-linux-arm-gnueabihf')
456
456
  const bindingPackageVersion = require('@napi-rs/webcodecs-linux-arm-gnueabihf/package.json').version
457
457
  if (
458
- bindingPackageVersion !== '0.0.0' &&
458
+ bindingPackageVersion !== '1.1.1' &&
459
459
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
460
460
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
461
461
  ) {
462
462
  throw new Error(
463
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
463
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
464
464
  )
465
465
  }
466
466
  return binding
@@ -479,12 +479,12 @@ function requireNative() {
479
479
  const binding = require('@napi-rs/webcodecs-linux-loong64-musl')
480
480
  const bindingPackageVersion = require('@napi-rs/webcodecs-linux-loong64-musl/package.json').version
481
481
  if (
482
- bindingPackageVersion !== '0.0.0' &&
482
+ bindingPackageVersion !== '1.1.1' &&
483
483
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
484
484
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
485
485
  ) {
486
486
  throw new Error(
487
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
487
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
488
488
  )
489
489
  }
490
490
  return binding
@@ -501,12 +501,12 @@ function requireNative() {
501
501
  const binding = require('@napi-rs/webcodecs-linux-loong64-gnu')
502
502
  const bindingPackageVersion = require('@napi-rs/webcodecs-linux-loong64-gnu/package.json').version
503
503
  if (
504
- bindingPackageVersion !== '0.0.0' &&
504
+ bindingPackageVersion !== '1.1.1' &&
505
505
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
506
506
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
507
507
  ) {
508
508
  throw new Error(
509
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
509
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
510
510
  )
511
511
  }
512
512
  return binding
@@ -525,12 +525,12 @@ function requireNative() {
525
525
  const binding = require('@napi-rs/webcodecs-linux-riscv64-musl')
526
526
  const bindingPackageVersion = require('@napi-rs/webcodecs-linux-riscv64-musl/package.json').version
527
527
  if (
528
- bindingPackageVersion !== '0.0.0' &&
528
+ bindingPackageVersion !== '1.1.1' &&
529
529
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
530
530
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
531
531
  ) {
532
532
  throw new Error(
533
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
533
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
534
534
  )
535
535
  }
536
536
  return binding
@@ -547,12 +547,12 @@ function requireNative() {
547
547
  const binding = require('@napi-rs/webcodecs-linux-riscv64-gnu')
548
548
  const bindingPackageVersion = require('@napi-rs/webcodecs-linux-riscv64-gnu/package.json').version
549
549
  if (
550
- bindingPackageVersion !== '0.0.0' &&
550
+ bindingPackageVersion !== '1.1.1' &&
551
551
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
552
552
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
553
553
  ) {
554
554
  throw new Error(
555
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
555
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
556
556
  )
557
557
  }
558
558
  return binding
@@ -570,12 +570,12 @@ function requireNative() {
570
570
  const binding = require('@napi-rs/webcodecs-linux-ppc64-gnu')
571
571
  const bindingPackageVersion = require('@napi-rs/webcodecs-linux-ppc64-gnu/package.json').version
572
572
  if (
573
- bindingPackageVersion !== '0.0.0' &&
573
+ bindingPackageVersion !== '1.1.1' &&
574
574
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
575
575
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
576
576
  ) {
577
577
  throw new Error(
578
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
578
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
579
579
  )
580
580
  }
581
581
  return binding
@@ -592,12 +592,12 @@ function requireNative() {
592
592
  const binding = require('@napi-rs/webcodecs-linux-s390x-gnu')
593
593
  const bindingPackageVersion = require('@napi-rs/webcodecs-linux-s390x-gnu/package.json').version
594
594
  if (
595
- bindingPackageVersion !== '0.0.0' &&
595
+ bindingPackageVersion !== '1.1.1' &&
596
596
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
597
597
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
598
598
  ) {
599
599
  throw new Error(
600
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
600
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
601
601
  )
602
602
  }
603
603
  return binding
@@ -618,12 +618,12 @@ function requireNative() {
618
618
  const binding = require('@napi-rs/webcodecs-openharmony-arm64')
619
619
  const bindingPackageVersion = require('@napi-rs/webcodecs-openharmony-arm64/package.json').version
620
620
  if (
621
- bindingPackageVersion !== '0.0.0' &&
621
+ bindingPackageVersion !== '1.1.1' &&
622
622
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
623
623
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
624
624
  ) {
625
625
  throw new Error(
626
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
626
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
627
627
  )
628
628
  }
629
629
  return binding
@@ -640,12 +640,12 @@ function requireNative() {
640
640
  const binding = require('@napi-rs/webcodecs-openharmony-x64')
641
641
  const bindingPackageVersion = require('@napi-rs/webcodecs-openharmony-x64/package.json').version
642
642
  if (
643
- bindingPackageVersion !== '0.0.0' &&
643
+ bindingPackageVersion !== '1.1.1' &&
644
644
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
645
645
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
646
646
  ) {
647
647
  throw new Error(
648
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
648
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
649
649
  )
650
650
  }
651
651
  return binding
@@ -662,12 +662,12 @@ function requireNative() {
662
662
  const binding = require('@napi-rs/webcodecs-openharmony-arm')
663
663
  const bindingPackageVersion = require('@napi-rs/webcodecs-openharmony-arm/package.json').version
664
664
  if (
665
- bindingPackageVersion !== '0.0.0' &&
665
+ bindingPackageVersion !== '1.1.1' &&
666
666
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
667
667
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
668
668
  ) {
669
669
  throw new Error(
670
- `Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
670
+ `Native binding package version mismatch, expected 1.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
671
671
  )
672
672
  }
673
673
  return binding
@@ -741,10 +741,16 @@ module.exports.ImageDecoder = nativeBinding.ImageDecoder
741
741
  module.exports.ImageDecodeResult = nativeBinding.ImageDecodeResult
742
742
  module.exports.ImageTrack = nativeBinding.ImageTrack
743
743
  module.exports.ImageTrackList = nativeBinding.ImageTrackList
744
+ module.exports.MkvDemuxer = nativeBinding.MkvDemuxer
745
+ module.exports.MkvMuxer = nativeBinding.MkvMuxer
746
+ module.exports.Mp4Demuxer = nativeBinding.Mp4Demuxer
747
+ module.exports.Mp4Muxer = nativeBinding.Mp4Muxer
744
748
  module.exports.VideoColorSpace = nativeBinding.VideoColorSpace
745
749
  module.exports.VideoDecoder = nativeBinding.VideoDecoder
746
750
  module.exports.VideoEncoder = nativeBinding.VideoEncoder
747
751
  module.exports.VideoFrame = nativeBinding.VideoFrame
752
+ module.exports.WebMDemuxer = nativeBinding.WebMDemuxer
753
+ module.exports.WebMMuxer = nativeBinding.WebMMuxer
748
754
  module.exports.AacBitstreamFormat = nativeBinding.AacBitstreamFormat
749
755
  module.exports.AlphaOption = nativeBinding.AlphaOption
750
756
  module.exports.AudioSampleFormat = nativeBinding.AudioSampleFormat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@napi-rs/webcodecs",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "WebCodecs API implementation for Node.js using FFmpeg",
5
5
  "keywords": [
6
6
  "N-API",
@@ -54,7 +54,8 @@
54
54
  "lint": "oxlint --type-aware",
55
55
  "prepublishOnly": "napi prepublish -t npm",
56
56
  "test": "ava",
57
- "typecheck": "tsc -b tsconfig.json",
57
+ "typecheck": "tsc -b tsconfig.json && tsc ./index.d.ts",
58
+ "preversion": "napi build --platform && git add .",
58
59
  "version": "napi version"
59
60
  },
60
61
  "lint-staged": {
@@ -150,14 +151,14 @@
150
151
  "registry": "https://registry.npmjs.org/"
151
152
  },
152
153
  "optionalDependencies": {
153
- "@napi-rs/webcodecs-darwin-x64": "1.0.0",
154
- "@napi-rs/webcodecs-darwin-arm64": "1.0.0",
155
- "@napi-rs/webcodecs-linux-x64-gnu": "1.0.0",
156
- "@napi-rs/webcodecs-linux-x64-musl": "1.0.0",
157
- "@napi-rs/webcodecs-win32-x64-msvc": "1.0.0",
158
- "@napi-rs/webcodecs-linux-arm64-gnu": "1.0.0",
159
- "@napi-rs/webcodecs-linux-arm64-musl": "1.0.0",
160
- "@napi-rs/webcodecs-win32-arm64-msvc": "1.0.0",
161
- "@napi-rs/webcodecs-linux-arm-gnueabihf": "1.0.0"
154
+ "@napi-rs/webcodecs-darwin-x64": "1.1.1",
155
+ "@napi-rs/webcodecs-darwin-arm64": "1.1.1",
156
+ "@napi-rs/webcodecs-linux-x64-gnu": "1.1.1",
157
+ "@napi-rs/webcodecs-linux-x64-musl": "1.1.1",
158
+ "@napi-rs/webcodecs-win32-x64-msvc": "1.1.1",
159
+ "@napi-rs/webcodecs-linux-arm64-gnu": "1.1.1",
160
+ "@napi-rs/webcodecs-linux-arm64-musl": "1.1.1",
161
+ "@napi-rs/webcodecs-win32-arm64-msvc": "1.1.1",
162
+ "@napi-rs/webcodecs-linux-arm-gnueabihf": "1.1.1"
162
163
  }
163
164
  }