@vindral/web-sdk 4.2.0-9-g20d8006e → 4.2.1-1-gf6c6f2fd
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/{BQPePwt2.js → B9WEkxkT.js} +10 -10
- package/{DAUPyLMi.js → CL0_JU7W.js} +1 -1
- package/{qbVRZqFN.js → CYgjrKff.js} +2281 -1911
- package/{wVqDCoXH.js → CrDL5rng.js} +3 -3
- package/{Bm-cshdP.js → Cug44nXk.js} +14 -11
- package/{Cv0Lr_8z.js → DDbXsjIU.js} +184 -184
- package/{B5bZayjf.js → DeYmk5AL.js} +2 -0
- package/DrWNJwZx.js +35 -0
- package/DtpcQ7ay.js +166 -0
- package/api-client.d.ts +3 -3
- package/api-client.js +1 -1
- package/cast-sender.d.ts +7 -7
- package/core.d.ts +27 -24
- package/core.js +1 -1
- package/legacy.d.ts +36 -33
- package/legacy.es.js +2580 -2183
- package/legacy.umd.js +133 -92
- package/package.json +1 -1
- package/player.d.ts +42 -39
- package/player.js +3 -3
- package/react.d.ts +43 -40
- package/vindral-player-component.js +2 -2
- package/B4Xt-UHG.js +0 -13
- package/D2u3dh0E.js +0 -166
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, t } from "./BsfwXDui.js";
|
|
2
2
|
import { M as n, v as r } from "./C01DcfYu.js";
|
|
3
|
-
import { t as i } from "./
|
|
3
|
+
import { t as i } from "./DrWNJwZx.js";
|
|
4
4
|
import { t as a } from "./RxoWWyzp.js";
|
|
5
5
|
//#region ../../libs/wasm-decoders/src/opus/wasm/opus.js
|
|
6
6
|
var o = (function() {
|
|
@@ -207,19 +207,19 @@ var o = (function() {
|
|
|
207
207
|
return e[e.OK = 0] = "OK", e[e["Bad argument"] = -1] = "Bad argument", e[e["Buffer too small"] = -2] = "Buffer too small", e[e["Internal error"] = -3] = "Internal error", e[e["Invalid packet"] = -4] = "Invalid packet", e[e.Unimplemented = -5] = "Unimplemented", e[e["Invalid state"] = -6] = "Invalid state", e[e["Memory allocation fail"] = -7] = "Memory allocation fail", e;
|
|
208
208
|
}(c || {}), l = class t {
|
|
209
209
|
constructor(n, r, i) {
|
|
210
|
-
e(this, "opusModule", void 0), e(this, "decoderInstance", void 0), e(this, "opusBufferPointer", void 0), e(this, "pcmBufferPointer", void 0), e(this, "
|
|
210
|
+
e(this, "opusModule", void 0), e(this, "decoderInstance", void 0), e(this, "opusBufferPointer", void 0), e(this, "pcmBufferPointer", void 0), e(this, "channels", void 0), e(this, "pcmBufferByteSize", () => t.MAX_SAMPLES * this.channels * Float32Array.BYTES_PER_ELEMENT), e(this, "unload", () => {
|
|
211
211
|
this.opusModule._free(this.opusBufferPointer), this.opusModule._free(this.pcmBufferPointer), this.opusModule._opus_decoder_destroy(this.decoderInstance);
|
|
212
212
|
}), e(this, "decode", (e) => {
|
|
213
|
-
|
|
213
|
+
if (e.byteLength > t.MAX_OPUS_BUFFER) throw Error(`Opus packet too large (${e.byteLength} bytes), max ${t.MAX_OPUS_BUFFER} bytes`);
|
|
214
|
+
this.opusModule.HEAPU8.set(e, this.opusBufferPointer);
|
|
214
215
|
let n = this.opusModule._opus_decode_float(this.decoderInstance, this.opusBufferPointer, e.byteLength, this.pcmBufferPointer, t.MAX_SAMPLES, 0);
|
|
215
|
-
if (n < 0) throw Error(c[n]);
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
this.pcm = this.opusModule.HEAPF32.subarray(a, a + this.pcmBufferByteSize() / Float32Array.BYTES_PER_ELEMENT);
|
|
216
|
+
if (n < 0) throw Error(`${c[n]} (${n})`);
|
|
217
|
+
let r = this.pcmBufferPointer / Float32Array.BYTES_PER_ELEMENT;
|
|
218
|
+
return this.opusModule.HEAPF32.subarray(r, r + n * this.channels);
|
|
219
|
+
}), this.opusModule = n, this.channels = i, this.decoderInstance = this.opusModule._opus_decoder_create(r, i, 0), this.opusBufferPointer = this.opusModule._malloc(t.MAX_OPUS_BUFFER), this.pcmBufferPointer = this.opusModule._malloc(this.pcmBufferByteSize());
|
|
220
220
|
}
|
|
221
221
|
};
|
|
222
|
-
s = l, e(l, "MAX_OPUS_BUFFER",
|
|
222
|
+
s = l, e(l, "MAX_OPUS_BUFFER", 16384), e(l, "MAX_SAMPLES", 6 * 960), e(l, "create", function() {
|
|
223
223
|
var e = t(function* (e, t) {
|
|
224
224
|
return new s(yield o(), e, t);
|
|
225
225
|
});
|
|
@@ -235,7 +235,7 @@ var u, d = class {
|
|
|
235
235
|
this.decoder.unload();
|
|
236
236
|
}), e(this, "enqueue", (e) => {
|
|
237
237
|
try {
|
|
238
|
-
let t = Date.now(), n = this.decoder.decode(e.data);
|
|
238
|
+
let t = Date.now(), n = this.decoder.decode(new Uint8Array(e.data));
|
|
239
239
|
this.decodedSamples.push(a(a({}, e), {}, {
|
|
240
240
|
type: "audio",
|
|
241
241
|
format: "f32",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, t } from "./BsfwXDui.js";
|
|
2
2
|
import { a as n, i as r, n as i, r as a, t as o } from "./B7hT-BKr.js";
|
|
3
|
-
import { g as s, h as c, n as l, r as ee, t as u, v as te, y as ne } from "./
|
|
3
|
+
import { g as s, h as c, n as l, r as ee, t as u, v as te, y as ne } from "./CrDL5rng.js";
|
|
4
4
|
import { t as d } from "./RxoWWyzp.js";
|
|
5
5
|
//#region \0rolldown/runtime.js
|
|
6
6
|
var f = Object.defineProperty, p = (e, t) => {
|