opus-codec-worker 0.0.6 → 0.0.7

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 +1 -1
  2. package/worker.js +5 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opus-codec-worker",
3
3
  "license": "MIT",
4
- "version": "0.0.6",
4
+ "version": "0.0.7",
5
5
  "files": [
6
6
  "**/*.js"
7
7
  ]
package/worker.js CHANGED
@@ -2331,11 +2331,14 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
2331
2331
  const opus_1 = __webpack_require__(/*! opus-codec/opus */ "./node_modules/opus-codec/opus/index.js");
2332
2332
  const actions_1 = __webpack_require__(/*! ../actions/actions */ "./actions/actions.js");
2333
2333
  const native_1 = __importDefault(__webpack_require__(/*! opus-codec/native */ "./node_modules/opus-codec/native/index.js"));
2334
- const pendingRuntime = (0, native_1.default)();
2334
+ const runtime_1 = __webpack_require__(/*! opus-codec/runtime */ "./node_modules/opus-codec/runtime/index.js");
2335
+ const pendingRuntime = (0, native_1.default)({
2336
+ wasmBinary: '/opus/index.wasm',
2337
+ });
2335
2338
  let nextEncoderId = 0;
2336
2339
  const encoders = new Map();
2337
2340
  onmessage = async (e) => {
2338
- const runtime = await pendingRuntime;
2341
+ const runtime = new runtime_1.Runtime(await pendingRuntime);
2339
2342
  const req = e.data;
2340
2343
  switch (req.type) {
2341
2344
  case actions_1.RequestType.CreateEncoder: {