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.
- package/package.json +1 -1
- package/worker.js +5 -2
package/package.json
CHANGED
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
|
|
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: {
|