quickvo-player 0.2.5 → 0.2.6
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/dist/index.js +416 -416
- package/dist/index.umd.cjs +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -117,8 +117,8 @@ class O {
|
|
|
117
117
|
y(this, "inputStream", new MediaStream()), y(this, "outputStream", new MediaStream()), y(this, "inputGain", 1), y(this, "enhanceGain", 1), y(this, "bgsGain", 1), y(this, "bgmGain", 1), y(this, "outputGain", 1), y(this, "mixAudioMap", /* @__PURE__ */ new Map()), y(this, "audioContext", new AudioContext()), y(this, "sourceNode"), y(this, "inputGainNode"), y(this, "enhanceGainNode"), y(this, "bgsGainNode"), y(this, "bgmGainNode"), y(this, "analyserNode"), y(this, "analyserArrayData"), y(this, "outputGainNode"), y(this, "destinationNode"), y(this, "filterStream", (u) => u), y(this, "stop", () => {
|
|
118
118
|
{
|
|
119
119
|
const u = this.inputStream.getTracks();
|
|
120
|
-
for (const
|
|
121
|
-
|
|
120
|
+
for (const n of u)
|
|
121
|
+
n.stop(), this.inputStream.removeTrack(n);
|
|
122
122
|
}
|
|
123
123
|
}), y(this, "getStream", () => this.filterStream(this.outputStream)), y(this, "setMute", (u = !0) => {
|
|
124
124
|
u ? this.analyserNode.disconnect(this.outputGainNode) : this.analyserNode.connect(this.outputGainNode);
|
|
@@ -133,47 +133,47 @@ class O {
|
|
|
133
133
|
}), y(this, "setOutputGain", (u) => {
|
|
134
134
|
this.outputGain = u, this.outputGainNode.gain.setValueAtTime(this.outputGain, this.audioContext.currentTime);
|
|
135
135
|
}), y(this, "getVolume", () => {
|
|
136
|
-
const { analyserNode: u, analyserArrayData:
|
|
137
|
-
u.getByteFrequencyData(
|
|
138
|
-
let
|
|
139
|
-
for (let i = 0; i <
|
|
140
|
-
|
|
141
|
-
return Math.ceil(
|
|
142
|
-
}), y(this, "mixAudio", (u,
|
|
136
|
+
const { analyserNode: u, analyserArrayData: n } = this;
|
|
137
|
+
u.getByteFrequencyData(n);
|
|
138
|
+
let r = 0;
|
|
139
|
+
for (let i = 0; i < n.length; i++)
|
|
140
|
+
r += n[i];
|
|
141
|
+
return Math.ceil(r / n.length);
|
|
142
|
+
}), y(this, "mixAudio", (u, n = "bgm") => new Promise(async (r, i) => {
|
|
143
143
|
try {
|
|
144
144
|
{
|
|
145
|
-
const s = this.mixAudioMap.get(
|
|
145
|
+
const s = this.mixAudioMap.get(n);
|
|
146
146
|
s && s.stop();
|
|
147
147
|
}
|
|
148
|
-
const t =
|
|
149
|
-
this.mixAudioMap.set(
|
|
150
|
-
e.disconnect(t), this.mixAudioMap.delete(
|
|
148
|
+
const t = n === "bgs" ? this.bgsGainNode : this.bgmGainNode, e = this.audioContext.createBufferSource();
|
|
149
|
+
this.mixAudioMap.set(n, e), e.buffer = u, e.connect(t), e.onended = () => {
|
|
150
|
+
e.disconnect(t), this.mixAudioMap.delete(n), r(!0);
|
|
151
151
|
}, e.start(0);
|
|
152
152
|
} catch (t) {
|
|
153
153
|
i(t);
|
|
154
154
|
}
|
|
155
155
|
})), y(this, "mixAudioStop", (u) => {
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
}), y(this, "changeMix", (u,
|
|
159
|
-
const
|
|
160
|
-
|
|
156
|
+
const n = this.mixAudioMap.get(u);
|
|
157
|
+
n == null || n.stop();
|
|
158
|
+
}), y(this, "changeMix", (u, n) => {
|
|
159
|
+
const r = u === "bgs" ? this.bgsGainNode : this.bgmGainNode;
|
|
160
|
+
n ? r.connect(this.destinationNode) : r.disconnect(this.destinationNode);
|
|
161
161
|
}), a && (this.audioContext = a), this.inputStream = o, this.sourceNode = this.audioContext.createMediaStreamSource(this.inputStream), this.inputGainNode = this.audioContext.createGain(), this.inputGainNode.gain.setValueAtTime(this.inputGain, this.audioContext.currentTime), this.enhanceGainNode = this.audioContext.createGain(), this.enhanceGainNode.gain.setValueAtTime(this.enhanceGain, this.audioContext.currentTime), this.bgsGainNode = this.audioContext.createGain(), this.bgsGainNode.gain.setValueAtTime(this.bgsGain, this.audioContext.currentTime), this.bgmGainNode = this.audioContext.createGain(), this.bgmGainNode.gain.setValueAtTime(this.bgmGain, this.audioContext.currentTime), this.analyserNode = this.audioContext.createAnalyser(), this.analyserNode.fftSize = 512, this.analyserArrayData = new Uint8Array(this.analyserNode.frequencyBinCount), this.outputGainNode = this.audioContext.createGain(), this.outputGainNode.gain.setValueAtTime(this.outputGain, this.audioContext.currentTime), this.destinationNode = this.audioContext.createMediaStreamDestination(), this.outputStream = this.destinationNode.stream;
|
|
162
162
|
{
|
|
163
|
-
const { sourceNode: u, inputGainNode:
|
|
164
|
-
u.connect(
|
|
163
|
+
const { sourceNode: u, inputGainNode: n, enhanceGainNode: r, bgsGainNode: i, bgmGainNode: t, analyserNode: e, outputGainNode: s, destinationNode: l } = this;
|
|
164
|
+
u.connect(n), n.connect(r), r.connect(e), i.connect(e), t.connect(e), r.connect(l), i.connect(l), t.connect(l), e.connect(s), s.connect(this.audioContext.destination);
|
|
165
165
|
}
|
|
166
166
|
this.setMute(!0), this.audioContext.resume();
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
const E = async (h, o) => {
|
|
170
170
|
try {
|
|
171
|
-
const { format: a, numberOfChannels: u, numberOfFrames:
|
|
171
|
+
const { format: a, numberOfChannels: u, numberOfFrames: n, sampleRate: r } = o, i = h.createBuffer(u, n, r);
|
|
172
172
|
for (let t = 0; t < u; t++) {
|
|
173
173
|
const e = o.allocationSize({ planeIndex: t }), s = new Uint8Array(e);
|
|
174
174
|
o.copyTo(s, { planeIndex: t });
|
|
175
175
|
const l = new DataView(s.buffer), c = i.getChannelData(t);
|
|
176
|
-
for (let d = 0; d <
|
|
176
|
+
for (let d = 0; d < n; d++) {
|
|
177
177
|
let p;
|
|
178
178
|
switch (a) {
|
|
179
179
|
case "s16":
|
|
@@ -222,15 +222,15 @@ class W {
|
|
|
222
222
|
const { audioData: a, playbackRate: u = 1 } = o;
|
|
223
223
|
try {
|
|
224
224
|
if (!this.audioContext || !this.destination) return;
|
|
225
|
-
let
|
|
226
|
-
if (!
|
|
227
|
-
const
|
|
228
|
-
|
|
225
|
+
let n = await E(this.audioContext, a);
|
|
226
|
+
if (!n) return;
|
|
227
|
+
const r = this.audioContext.createBufferSource();
|
|
228
|
+
r.buffer = n, r.playbackRate.value = u;
|
|
229
229
|
const i = -1200 * Math.log2(u);
|
|
230
|
-
|
|
231
|
-
const t = Math.max(this.nextStartTime, this.audioContext.currentTime), e =
|
|
232
|
-
this.nextStartTime = t + e,
|
|
233
|
-
this.pendingSources = this.pendingSources.filter((s) => s !==
|
|
230
|
+
r.detune.value = i, r.connect(this.destination);
|
|
231
|
+
const t = Math.max(this.nextStartTime, this.audioContext.currentTime), e = n.duration / u;
|
|
232
|
+
this.nextStartTime = t + e, r.start(t), this.pendingSources.push(r), r.onended = () => {
|
|
233
|
+
this.pendingSources = this.pendingSources.filter((s) => s !== r);
|
|
234
234
|
}, this.audioContext.state === "suspended" && await this.audioContext.resume();
|
|
235
235
|
} finally {
|
|
236
236
|
a.close();
|
|
@@ -298,44 +298,44 @@ class $ {
|
|
|
298
298
|
* @param timeout 超时时间 ms
|
|
299
299
|
* @returns
|
|
300
300
|
*/
|
|
301
|
-
m(this, "add", (o, a = () => !1, u = 0) => new Promise((
|
|
301
|
+
m(this, "add", (o, a = () => !1, u = 0) => new Promise((n) => {
|
|
302
302
|
var t, e;
|
|
303
|
-
if (a()) return
|
|
303
|
+
if (a()) return n(!0);
|
|
304
304
|
this.resolvesMap.has(o) || this.resolvesMap.set(o, /* @__PURE__ */ new Map()), this.index++;
|
|
305
|
-
const
|
|
305
|
+
const r = `${this.index}`;
|
|
306
306
|
if (u = Math.max(0, u), u === 0) {
|
|
307
|
-
(t = this.resolvesMap.get(o)) == null || t.set(
|
|
307
|
+
(t = this.resolvesMap.get(o)) == null || t.set(r, { resolve: n, timer: 0 });
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
const i = window.setTimeout(() => {
|
|
311
311
|
this.emit(o);
|
|
312
312
|
}, u);
|
|
313
|
-
(e = this.resolvesMap.get(o)) == null || e.set(
|
|
313
|
+
(e = this.resolvesMap.get(o)) == null || e.set(r, { resolve: n, timer: i });
|
|
314
314
|
}));
|
|
315
315
|
m(this, "emit", async (o) => {
|
|
316
316
|
const a = this.resolvesMap.get(o);
|
|
317
317
|
if (!a) return;
|
|
318
318
|
const u = [...a.keys()];
|
|
319
|
-
for (const
|
|
320
|
-
const
|
|
321
|
-
|
|
319
|
+
for (const n of u) {
|
|
320
|
+
const r = a.get(n);
|
|
321
|
+
r && (clearTimeout(r.timer), r.resolve(), a.delete(n));
|
|
322
322
|
}
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
const Y = (h) => {
|
|
327
327
|
const o = new DataView(h.buffer);
|
|
328
|
-
let a = 0, u,
|
|
328
|
+
let a = 0, u, n, r;
|
|
329
329
|
u = o.getUint32(a, !1), a += 4;
|
|
330
330
|
{
|
|
331
331
|
const i = o.getUint8(a), t = i >> 7 & 1, e = i >> 5 & 3, s = i & 31;
|
|
332
|
-
|
|
332
|
+
n = { forbidden_zero_bit: t, nal_ref_idc: e, nal_unit_type: s }, a += 1;
|
|
333
333
|
}
|
|
334
334
|
{
|
|
335
335
|
const i = u - 1;
|
|
336
|
-
|
|
336
|
+
r = new Uint8Array(o.buffer.slice(a, a + i));
|
|
337
337
|
}
|
|
338
|
-
return { size: u, header:
|
|
338
|
+
return { size: u, header: n, data: r };
|
|
339
339
|
};
|
|
340
340
|
var P, U;
|
|
341
341
|
class x {
|
|
@@ -350,34 +350,34 @@ class x {
|
|
|
350
350
|
* @param input string | URL | Request
|
|
351
351
|
* @param init RequestInit
|
|
352
352
|
*/
|
|
353
|
-
m(this, "check", (o, a) => new Promise(async (u,
|
|
353
|
+
m(this, "check", (o, a) => new Promise(async (u, n) => {
|
|
354
354
|
var i;
|
|
355
355
|
this.stop(), H(this, U, new AbortController());
|
|
356
|
-
const
|
|
356
|
+
const r = window.setTimeout(() => {
|
|
357
357
|
var t;
|
|
358
|
-
(t = I(this, U)) == null || t.abort("Timeout."),
|
|
358
|
+
(t = I(this, U)) == null || t.abort("Timeout."), n({ status: "timeout", reason: "" });
|
|
359
359
|
}, I(this, P).timeout);
|
|
360
360
|
try {
|
|
361
361
|
const t = await fetch(o, { ...a, method: "HEAD", signal: (i = I(this, U)) == null ? void 0 : i.signal });
|
|
362
|
-
t.status === 200 ? u({ status: "successed", reason: "" }) :
|
|
362
|
+
t.status === 200 ? u({ status: "successed", reason: "" }) : n({ status: "failed", reason: `${t.status}` });
|
|
363
363
|
} catch (t) {
|
|
364
|
-
|
|
364
|
+
n({ status: "error", reason: t.message });
|
|
365
365
|
}
|
|
366
|
-
clearTimeout(
|
|
366
|
+
clearTimeout(r);
|
|
367
367
|
}));
|
|
368
368
|
/**
|
|
369
369
|
*
|
|
370
370
|
* @param input string | URL | Request
|
|
371
371
|
* @param init RequestInit
|
|
372
372
|
*/
|
|
373
|
-
m(this, "request", async (o, a) => new Promise(async (u,
|
|
374
|
-
var
|
|
373
|
+
m(this, "request", async (o, a) => new Promise(async (u, n) => {
|
|
374
|
+
var r;
|
|
375
375
|
try {
|
|
376
376
|
I(this, P).check && await this.check(o, a), H(this, U, new AbortController());
|
|
377
|
-
const i = await fetch(o, { ...a, signal: (
|
|
377
|
+
const i = await fetch(o, { ...a, signal: (r = I(this, U)) == null ? void 0 : r.signal });
|
|
378
378
|
u(i);
|
|
379
379
|
} catch (i) {
|
|
380
|
-
this.stop(),
|
|
380
|
+
this.stop(), n(i);
|
|
381
381
|
}
|
|
382
382
|
}));
|
|
383
383
|
/**
|
|
@@ -398,6 +398,7 @@ class et {
|
|
|
398
398
|
frameTrack: !1
|
|
399
399
|
});
|
|
400
400
|
m(this, "prFetch", new x());
|
|
401
|
+
m(this, "getSegmentsFetch", new x());
|
|
401
402
|
m(this, "prResolves", new $());
|
|
402
403
|
m(this, "url", "");
|
|
403
404
|
m(this, "demuxerWorker");
|
|
@@ -414,7 +415,7 @@ class et {
|
|
|
414
415
|
* @param url : string
|
|
415
416
|
*/
|
|
416
417
|
m(this, "start", async (o) => {
|
|
417
|
-
this.stop(), this.url = o;
|
|
418
|
+
await this.stop(), this.url = o;
|
|
418
419
|
const a = q(o);
|
|
419
420
|
if (a === "unknown") throw new Error("This address cannot be parsed.");
|
|
420
421
|
switch (this.init(a), a) {
|
|
@@ -430,16 +431,16 @@ class et {
|
|
|
430
431
|
* 停止
|
|
431
432
|
*/
|
|
432
433
|
m(this, "stop", async () => {
|
|
433
|
-
var a, u,
|
|
434
|
+
var a, u, n, r, i;
|
|
434
435
|
try {
|
|
435
|
-
clearInterval(this.hls.getSegmentsTimer), this.prFetch.stop();
|
|
436
|
+
this.url = "", clearInterval(this.hls.getSegmentsTimer), this.prFetch.stop(), this.getSegmentsFetch.stop();
|
|
436
437
|
} catch (t) {
|
|
437
438
|
console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: error", t);
|
|
438
439
|
}
|
|
439
|
-
(a = this.demuxerWorker) == null || a.destroy(), (u = this.decoderWorker) == null || u.destroy(), (
|
|
440
|
+
(a = this.demuxerWorker) == null || a.destroy(), (u = this.decoderWorker) == null || u.destroy(), (n = this.renderWorker) == null || n.destroy();
|
|
440
441
|
const o = [...this.cutRenders.keys()];
|
|
441
442
|
for (const t of o)
|
|
442
|
-
(
|
|
443
|
+
(r = this.cutRenders.get(t)) == null || r.worker.destroy(), this.cutRenders.delete(t);
|
|
443
444
|
M(this.stream), (i = this.audioPlayer) == null || i.destroy();
|
|
444
445
|
});
|
|
445
446
|
/**
|
|
@@ -526,20 +527,20 @@ class et {
|
|
|
526
527
|
}, this.demuxerWorker.on.info = (a) => {
|
|
527
528
|
this.option.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: info", a), this.on.demuxer.info && this.on.demuxer.info(a);
|
|
528
529
|
}, this.demuxerWorker.on.config = (a) => {
|
|
529
|
-
var
|
|
530
|
+
var n, r;
|
|
530
531
|
this.option.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: config", a), this.on.demuxer.config && this.on.demuxer.config(a);
|
|
531
532
|
const { kind: u } = a;
|
|
532
533
|
switch (u) {
|
|
533
534
|
case "audio":
|
|
534
535
|
{
|
|
535
536
|
const { codec: i, sampleRate: t, numberOfChannels: e } = a;
|
|
536
|
-
(
|
|
537
|
+
(n = this.decoderWorker) == null || n.initAudio({ codec: i, sampleRate: t, numberOfChannels: e });
|
|
537
538
|
}
|
|
538
539
|
break;
|
|
539
540
|
case "video":
|
|
540
541
|
{
|
|
541
542
|
const { codec: i, description: t } = a;
|
|
542
|
-
(
|
|
543
|
+
(r = this.decoderWorker) == null || r.initVideo({ codec: i, description: t });
|
|
543
544
|
}
|
|
544
545
|
break;
|
|
545
546
|
}
|
|
@@ -549,14 +550,14 @@ class et {
|
|
|
549
550
|
switch (u) {
|
|
550
551
|
case "audio":
|
|
551
552
|
{
|
|
552
|
-
const { type:
|
|
553
|
-
this.decoderWorker.push({ kind: u, init: { type:
|
|
553
|
+
const { type: n, dts: r, data: i } = a, t = r * 1e3;
|
|
554
|
+
this.decoderWorker.push({ kind: u, init: { type: n, timestamp: t, data: i } });
|
|
554
555
|
}
|
|
555
556
|
break;
|
|
556
557
|
case "video":
|
|
557
558
|
{
|
|
558
|
-
const { type:
|
|
559
|
-
this.decoderWorker.push({ kind: u, init: { type:
|
|
559
|
+
const { type: n, dts: r, data: i, nalus: t = [] } = a, e = r * 1e3;
|
|
560
|
+
this.decoderWorker.push({ kind: u, init: { type: n, timestamp: e, data: i }, nalus: t });
|
|
560
561
|
}
|
|
561
562
|
break;
|
|
562
563
|
}
|
|
@@ -569,23 +570,23 @@ class et {
|
|
|
569
570
|
this.decoderWorker = new N(), this.decoderWorker.init(o);
|
|
570
571
|
const { frameTrack: a = !1 } = this.option;
|
|
571
572
|
this.decoderWorker.setFrameTrack(a), this.decoderWorker.on.audio.decode = (u) => {
|
|
572
|
-
var
|
|
573
|
-
(
|
|
573
|
+
var n;
|
|
574
|
+
(n = this.audioPlayer) == null || n.push(u), this.on.decoder.audio && this.on.decoder.audio(u);
|
|
574
575
|
}, this.decoderWorker.on.audio.error = (u) => {
|
|
575
576
|
this.option.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: audio.error ", u), this.on.error && this.on.error(u);
|
|
576
577
|
}, this.decoderWorker.on.video.decode = async (u) => {
|
|
577
|
-
var
|
|
578
|
-
(
|
|
579
|
-
const
|
|
580
|
-
for (const t of
|
|
578
|
+
var r, i;
|
|
579
|
+
(r = this.renderWorker) == null || r.push(u);
|
|
580
|
+
const n = [...this.cutRenders.keys()];
|
|
581
|
+
for (const t of n)
|
|
581
582
|
(i = this.cutRenders.get(t)) == null || i.worker.push(u);
|
|
582
583
|
this.on.decoder.video && this.on.decoder.video(u), u.bitmap.close();
|
|
583
584
|
}, this.decoderWorker.on.video.error = (u) => {
|
|
584
|
-
this.
|
|
585
|
+
this.on.error && this.on.error(u);
|
|
585
586
|
}, this.decoderWorker.on.nalus = async (u) => {
|
|
586
|
-
for (const
|
|
587
|
-
if (
|
|
588
|
-
const { header:
|
|
587
|
+
for (const n of u) {
|
|
588
|
+
if (n.byteLength <= 4) continue;
|
|
589
|
+
const { header: r, data: i } = Y(n), { nal_unit_type: t } = r;
|
|
589
590
|
t === 6 && this.on.decoder.sei && this.on.decoder.sei(i);
|
|
590
591
|
}
|
|
591
592
|
}, this.decoderWorker.on.analysis = (u) => {
|
|
@@ -604,12 +605,12 @@ class et {
|
|
|
604
605
|
var o, a;
|
|
605
606
|
try {
|
|
606
607
|
let u = await this.prFetch.request(this.url);
|
|
607
|
-
if (u.status !== 200 && (await new Promise((
|
|
608
|
-
const
|
|
609
|
-
if (!
|
|
608
|
+
if (u.status !== 200 && (await new Promise((r) => setTimeout(() => r(!0), 500)), u = await this.prFetch.request(this.url)), u.status !== 200 && (await new Promise((r) => setTimeout(() => r(!0), 500)), u = await this.prFetch.request(this.url)), u.status !== 200) throw new Error("request is error.");
|
|
609
|
+
const n = (o = u.body) == null ? void 0 : o.getReader();
|
|
610
|
+
if (!n) throw new Error("reader is error.");
|
|
610
611
|
for (; ; ) {
|
|
611
|
-
const { done:
|
|
612
|
-
if (i && ((a = this.demuxerWorker) == null || a.push(i)),
|
|
612
|
+
const { done: r, value: i } = await n.read();
|
|
613
|
+
if (i && ((a = this.demuxerWorker) == null || a.push(i)), r || this.url === "") break;
|
|
613
614
|
}
|
|
614
615
|
} catch (u) {
|
|
615
616
|
if ((u == null ? void 0 : u.name) !== "AbortError") throw Error(u);
|
|
@@ -625,34 +626,33 @@ class et {
|
|
|
625
626
|
parse: async (o) => {
|
|
626
627
|
const a = new TextDecoder("utf-8").decode(o).split(`
|
|
627
628
|
`).map((e) => e.replace("\r", "")), u = this.url.substring(0, this.url.lastIndexOf("/") + 1);
|
|
628
|
-
let
|
|
629
|
+
let n = 4, r = 0, i = !1;
|
|
629
630
|
const t = [];
|
|
630
631
|
for (const e of a)
|
|
631
|
-
e.startsWith("#EXTINF:") ?
|
|
632
|
+
e.startsWith("#EXTINF:") ? n = parseFloat(e.split(":")[1].split(",")[0]) : e.startsWith("#EXT-X-TARGETDURATION:") ? r = parseInt(e.split(":")[1]) : e.startsWith("#EXT-X-ENDLIST") ? i = !1 : e.startsWith("#EXT-X-MEDIA-SEQUENCE:") ? i = !0 : e.includes(".ts") && !e.startsWith("#") && t.push({
|
|
632
633
|
url: e.startsWith("http") ? e : u + e,
|
|
633
|
-
duration:
|
|
634
|
+
duration: n,
|
|
634
635
|
isLive: i
|
|
635
636
|
});
|
|
636
|
-
return { baseUrl: u, targetDuration:
|
|
637
|
+
return { baseUrl: u, targetDuration: r, isLive: i, segments: t };
|
|
637
638
|
},
|
|
638
639
|
getSegments: async () => {
|
|
639
640
|
var o;
|
|
640
641
|
try {
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
if (!r) throw new Error("reader is error.");
|
|
642
|
+
let a = await this.getSegmentsFetch.request(this.url);
|
|
643
|
+
if (a.status !== 200 && (await new Promise((n) => setTimeout(() => n(!0), 500)), a = await this.getSegmentsFetch.request(this.url)), a.status !== 200 && (await new Promise((n) => setTimeout(() => n(!0), 500)), a = await this.getSegmentsFetch.request(this.url)), a.status !== 200) throw new Error("request is error.");
|
|
644
|
+
const u = (o = a.body) == null ? void 0 : o.getReader();
|
|
645
|
+
if (!u) throw new Error("reader is error.");
|
|
646
646
|
for (; ; ) {
|
|
647
|
-
const { done: n, value:
|
|
648
|
-
if (
|
|
649
|
-
const
|
|
650
|
-
this.hls.isLive =
|
|
651
|
-
let
|
|
652
|
-
const
|
|
653
|
-
|
|
647
|
+
const { done: n, value: r } = await u.read();
|
|
648
|
+
if (r) {
|
|
649
|
+
const i = await this.hls.parse(r), { segments: t = [], isLive: e = !1 } = i;
|
|
650
|
+
this.hls.isLive = e, e === !1 && (this.option.frameTrack = !1);
|
|
651
|
+
let s = Array.from(t, (c) => c.url);
|
|
652
|
+
const l = s.findIndex((c) => c === this.hls.url);
|
|
653
|
+
l !== -1 && (s = s.slice(l + 1)), this.hls.urls = s;
|
|
654
654
|
}
|
|
655
|
-
if (n) break;
|
|
655
|
+
if (n || this.url === "") break;
|
|
656
656
|
}
|
|
657
657
|
} catch (a) {
|
|
658
658
|
this.on.error && this.on.error(a);
|
|
@@ -662,20 +662,20 @@ class et {
|
|
|
662
662
|
var o, a, u;
|
|
663
663
|
try {
|
|
664
664
|
for (await this.hls.getSegments(), this.hls.getSegmentsTimer = window.setInterval(this.hls.getSegments, 500), this.hls.isLive === !1 && (clearInterval(this.hls.getSegmentsTimer), (o = this.decoderWorker) == null ? void 0 : o.setFrameTrack(!1)); ; ) {
|
|
665
|
-
const
|
|
666
|
-
if (
|
|
667
|
-
this.hls.url =
|
|
668
|
-
const
|
|
669
|
-
if (!
|
|
665
|
+
const n = this.hls.urls.shift();
|
|
666
|
+
if (n) {
|
|
667
|
+
this.hls.url = n;
|
|
668
|
+
const r = (a = (await this.prFetch.request(n)).body) == null ? void 0 : a.getReader();
|
|
669
|
+
if (!r) throw new Error("segment reader is error.");
|
|
670
670
|
for (; ; ) {
|
|
671
|
-
const { done: i, value: t } = await
|
|
672
|
-
if (t && ((u = this.demuxerWorker) == null || u.push(t)), i) break;
|
|
671
|
+
const { done: i, value: t } = await r.read();
|
|
672
|
+
if (t && ((u = this.demuxerWorker) == null || u.push(t)), i || this.url === "") break;
|
|
673
673
|
}
|
|
674
674
|
} else
|
|
675
|
-
await new Promise((
|
|
675
|
+
await new Promise((r) => setTimeout(() => r(!0), 300));
|
|
676
676
|
}
|
|
677
|
-
} catch (
|
|
678
|
-
if ((
|
|
677
|
+
} catch (n) {
|
|
678
|
+
if ((n == null ? void 0 : n.name) !== "AbortError") throw Error(n);
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
681
|
});
|
|
@@ -688,10 +688,10 @@ function requireAspromise() {
|
|
|
688
688
|
if (hasRequiredAspromise) return aspromise;
|
|
689
689
|
hasRequiredAspromise = 1, aspromise = h;
|
|
690
690
|
function h(o, a) {
|
|
691
|
-
for (var u = new Array(arguments.length - 1),
|
|
692
|
-
u[
|
|
691
|
+
for (var u = new Array(arguments.length - 1), n = 0, r = 2, i = !0; r < arguments.length; )
|
|
692
|
+
u[n++] = arguments[r++];
|
|
693
693
|
return new Promise(function(e, s) {
|
|
694
|
-
u[
|
|
694
|
+
u[n] = function(c) {
|
|
695
695
|
if (i)
|
|
696
696
|
if (i = !1, c)
|
|
697
697
|
s(c);
|
|
@@ -722,8 +722,8 @@ function requireBase64() {
|
|
|
722
722
|
++s;
|
|
723
723
|
return Math.ceil(t.length * 3) / 4 - s;
|
|
724
724
|
};
|
|
725
|
-
for (var a = new Array(64), u = new Array(123),
|
|
726
|
-
u[a[
|
|
725
|
+
for (var a = new Array(64), u = new Array(123), n = 0; n < 64; )
|
|
726
|
+
u[a[n] = n < 26 ? n + 65 : n < 52 ? n + 71 : n < 62 ? n - 4 : n - 59 | 43] = n++;
|
|
727
727
|
o.encode = function(t, e, s) {
|
|
728
728
|
for (var l = null, c = [], d = 0, p = 0, f; e < s; ) {
|
|
729
729
|
var w = t[e++];
|
|
@@ -742,14 +742,14 @@ function requireBase64() {
|
|
|
742
742
|
}
|
|
743
743
|
return p && (c[d++] = a[f], c[d++] = 61, p === 1 && (c[d++] = 61)), l ? (d && l.push(String.fromCharCode.apply(String, c.slice(0, d))), l.join("")) : String.fromCharCode.apply(String, c.slice(0, d));
|
|
744
744
|
};
|
|
745
|
-
var
|
|
745
|
+
var r = "invalid encoding";
|
|
746
746
|
o.decode = function(t, e, s) {
|
|
747
747
|
for (var l = s, c = 0, d, p = 0; p < t.length; ) {
|
|
748
748
|
var f = t.charCodeAt(p++);
|
|
749
749
|
if (f === 61 && c > 1)
|
|
750
750
|
break;
|
|
751
751
|
if ((f = u[f]) === void 0)
|
|
752
|
-
throw Error(
|
|
752
|
+
throw Error(r);
|
|
753
753
|
switch (c) {
|
|
754
754
|
case 0:
|
|
755
755
|
d = f, c = 1;
|
|
@@ -766,7 +766,7 @@ function requireBase64() {
|
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
768
|
if (c === 1)
|
|
769
|
-
throw Error(
|
|
769
|
+
throw Error(r);
|
|
770
770
|
return s - l;
|
|
771
771
|
}, o.test = function(t) {
|
|
772
772
|
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t);
|
|
@@ -780,10 +780,10 @@ function requireEventemitter() {
|
|
|
780
780
|
function h() {
|
|
781
781
|
this._listeners = {};
|
|
782
782
|
}
|
|
783
|
-
return h.prototype.on = function(a, u,
|
|
783
|
+
return h.prototype.on = function(a, u, n) {
|
|
784
784
|
return (this._listeners[a] || (this._listeners[a] = [])).push({
|
|
785
785
|
fn: u,
|
|
786
|
-
ctx:
|
|
786
|
+
ctx: n || this
|
|
787
787
|
}), this;
|
|
788
788
|
}, h.prototype.off = function(a, u) {
|
|
789
789
|
if (a === void 0)
|
|
@@ -791,16 +791,16 @@ function requireEventemitter() {
|
|
|
791
791
|
else if (u === void 0)
|
|
792
792
|
this._listeners[a] = [];
|
|
793
793
|
else
|
|
794
|
-
for (var
|
|
795
|
-
r
|
|
794
|
+
for (var n = this._listeners[a], r = 0; r < n.length; )
|
|
795
|
+
n[r].fn === u ? n.splice(r, 1) : ++r;
|
|
796
796
|
return this;
|
|
797
797
|
}, h.prototype.emit = function(a) {
|
|
798
798
|
var u = this._listeners[a];
|
|
799
799
|
if (u) {
|
|
800
|
-
for (var
|
|
801
|
-
|
|
802
|
-
for (
|
|
803
|
-
u[
|
|
800
|
+
for (var n = [], r = 1; r < arguments.length; )
|
|
801
|
+
n.push(arguments[r++]);
|
|
802
|
+
for (r = 0; r < u.length; )
|
|
803
|
+
u[r].fn.apply(u[r++].ctx, n);
|
|
804
804
|
}
|
|
805
805
|
return this;
|
|
806
806
|
}, eventemitter;
|
|
@@ -809,7 +809,7 @@ var float, hasRequiredFloat;
|
|
|
809
809
|
function requireFloat() {
|
|
810
810
|
if (hasRequiredFloat) return float;
|
|
811
811
|
hasRequiredFloat = 1, float = h(h);
|
|
812
|
-
function h(
|
|
812
|
+
function h(r) {
|
|
813
813
|
return typeof Float32Array < "u" ? function() {
|
|
814
814
|
var i = new Float32Array([-0]), t = new Uint8Array(i.buffer), e = t[3] === 128;
|
|
815
815
|
function s(p, f, w) {
|
|
@@ -818,14 +818,14 @@ function requireFloat() {
|
|
|
818
818
|
function l(p, f, w) {
|
|
819
819
|
i[0] = p, f[w] = t[3], f[w + 1] = t[2], f[w + 2] = t[1], f[w + 3] = t[0];
|
|
820
820
|
}
|
|
821
|
-
|
|
821
|
+
r.writeFloatLE = e ? s : l, r.writeFloatBE = e ? l : s;
|
|
822
822
|
function c(p, f) {
|
|
823
823
|
return t[0] = p[f], t[1] = p[f + 1], t[2] = p[f + 2], t[3] = p[f + 3], i[0];
|
|
824
824
|
}
|
|
825
825
|
function d(p, f) {
|
|
826
826
|
return t[3] = p[f], t[2] = p[f + 1], t[1] = p[f + 2], t[0] = p[f + 3], i[0];
|
|
827
827
|
}
|
|
828
|
-
|
|
828
|
+
r.readFloatLE = e ? c : d, r.readFloatBE = e ? d : c;
|
|
829
829
|
}() : function() {
|
|
830
830
|
function i(e, s, l, c) {
|
|
831
831
|
var d = s < 0 ? 1 : 0;
|
|
@@ -848,12 +848,12 @@ function requireFloat() {
|
|
|
848
848
|
e((d << 31 | p + 127 << 23 | f) >>> 0, l, c);
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
|
-
|
|
851
|
+
r.writeFloatLE = i.bind(null, o), r.writeFloatBE = i.bind(null, a);
|
|
852
852
|
function t(e, s, l) {
|
|
853
853
|
var c = e(s, l), d = (c >> 31) * 2 + 1, p = c >>> 23 & 255, f = c & 8388607;
|
|
854
854
|
return p === 255 ? f ? NaN : d * (1 / 0) : p === 0 ? d * 1401298464324817e-60 * f : d * Math.pow(2, p - 150) * (f + 8388608);
|
|
855
855
|
}
|
|
856
|
-
|
|
856
|
+
r.readFloatLE = t.bind(null, u), r.readFloatBE = t.bind(null, n);
|
|
857
857
|
}(), typeof Float64Array < "u" ? function() {
|
|
858
858
|
var i = new Float64Array([-0]), t = new Uint8Array(i.buffer), e = t[7] === 128;
|
|
859
859
|
function s(p, f, w) {
|
|
@@ -862,14 +862,14 @@ function requireFloat() {
|
|
|
862
862
|
function l(p, f, w) {
|
|
863
863
|
i[0] = p, f[w] = t[7], f[w + 1] = t[6], f[w + 2] = t[5], f[w + 3] = t[4], f[w + 4] = t[3], f[w + 5] = t[2], f[w + 6] = t[1], f[w + 7] = t[0];
|
|
864
864
|
}
|
|
865
|
-
|
|
865
|
+
r.writeDoubleLE = e ? s : l, r.writeDoubleBE = e ? l : s;
|
|
866
866
|
function c(p, f) {
|
|
867
867
|
return t[0] = p[f], t[1] = p[f + 1], t[2] = p[f + 2], t[3] = p[f + 3], t[4] = p[f + 4], t[5] = p[f + 5], t[6] = p[f + 6], t[7] = p[f + 7], i[0];
|
|
868
868
|
}
|
|
869
869
|
function d(p, f) {
|
|
870
870
|
return t[7] = p[f], t[6] = p[f + 1], t[5] = p[f + 2], t[4] = p[f + 3], t[3] = p[f + 4], t[2] = p[f + 5], t[1] = p[f + 6], t[0] = p[f + 7], i[0];
|
|
871
871
|
}
|
|
872
|
-
|
|
872
|
+
r.readDoubleLE = e ? c : d, r.readDoubleBE = e ? d : c;
|
|
873
873
|
}() : function() {
|
|
874
874
|
function i(e, s, l, c, d, p) {
|
|
875
875
|
var f = c < 0 ? 1 : 0;
|
|
@@ -895,25 +895,25 @@ function requireFloat() {
|
|
|
895
895
|
}
|
|
896
896
|
}
|
|
897
897
|
}
|
|
898
|
-
|
|
898
|
+
r.writeDoubleLE = i.bind(null, o, 0, 4), r.writeDoubleBE = i.bind(null, a, 4, 0);
|
|
899
899
|
function t(e, s, l, c, d) {
|
|
900
900
|
var p = e(c, d + s), f = e(c, d + l), w = (f >> 31) * 2 + 1, b = f >>> 20 & 2047, g = 4294967296 * (f & 1048575) + p;
|
|
901
901
|
return b === 2047 ? g ? NaN : w * (1 / 0) : b === 0 ? w * 5e-324 * g : w * Math.pow(2, b - 1075) * (g + 4503599627370496);
|
|
902
902
|
}
|
|
903
|
-
|
|
904
|
-
}(),
|
|
903
|
+
r.readDoubleLE = t.bind(null, u, 0, 4), r.readDoubleBE = t.bind(null, n, 4, 0);
|
|
904
|
+
}(), r;
|
|
905
905
|
}
|
|
906
|
-
function o(
|
|
907
|
-
i[t] =
|
|
906
|
+
function o(r, i, t) {
|
|
907
|
+
i[t] = r & 255, i[t + 1] = r >>> 8 & 255, i[t + 2] = r >>> 16 & 255, i[t + 3] = r >>> 24;
|
|
908
908
|
}
|
|
909
|
-
function a(
|
|
910
|
-
i[t] =
|
|
909
|
+
function a(r, i, t) {
|
|
910
|
+
i[t] = r >>> 24, i[t + 1] = r >>> 16 & 255, i[t + 2] = r >>> 8 & 255, i[t + 3] = r & 255;
|
|
911
911
|
}
|
|
912
|
-
function u(
|
|
913
|
-
return (
|
|
912
|
+
function u(r, i) {
|
|
913
|
+
return (r[i] | r[i + 1] << 8 | r[i + 2] << 16 | r[i + 3] << 24) >>> 0;
|
|
914
914
|
}
|
|
915
|
-
function r
|
|
916
|
-
return (
|
|
915
|
+
function n(r, i) {
|
|
916
|
+
return (r[i] << 24 | r[i + 1] << 16 | r[i + 2] << 8 | r[i + 3]) >>> 0;
|
|
917
917
|
}
|
|
918
918
|
return float;
|
|
919
919
|
}
|
|
@@ -937,20 +937,20 @@ function requireUtf8() {
|
|
|
937
937
|
return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(h) {
|
|
938
938
|
var o = h;
|
|
939
939
|
o.length = function(u) {
|
|
940
|
-
for (var
|
|
941
|
-
|
|
942
|
-
return
|
|
943
|
-
}, o.read = function(u,
|
|
944
|
-
var i =
|
|
940
|
+
for (var n = 0, r = 0, i = 0; i < u.length; ++i)
|
|
941
|
+
r = u.charCodeAt(i), r < 128 ? n += 1 : r < 2048 ? n += 2 : (r & 64512) === 55296 && (u.charCodeAt(i + 1) & 64512) === 56320 ? (++i, n += 4) : n += 3;
|
|
942
|
+
return n;
|
|
943
|
+
}, o.read = function(u, n, r) {
|
|
944
|
+
var i = r - n;
|
|
945
945
|
if (i < 1)
|
|
946
946
|
return "";
|
|
947
|
-
for (var t = null, e = [], s = 0, l;
|
|
948
|
-
l = u[
|
|
947
|
+
for (var t = null, e = [], s = 0, l; n < r; )
|
|
948
|
+
l = u[n++], l < 128 ? e[s++] = l : l > 191 && l < 224 ? e[s++] = (l & 31) << 6 | u[n++] & 63 : l > 239 && l < 365 ? (l = ((l & 7) << 18 | (u[n++] & 63) << 12 | (u[n++] & 63) << 6 | u[n++] & 63) - 65536, e[s++] = 55296 + (l >> 10), e[s++] = 56320 + (l & 1023)) : e[s++] = (l & 15) << 12 | (u[n++] & 63) << 6 | u[n++] & 63, s > 8191 && ((t || (t = [])).push(String.fromCharCode.apply(String, e)), s = 0);
|
|
949
949
|
return t ? (s && t.push(String.fromCharCode.apply(String, e.slice(0, s))), t.join("")) : String.fromCharCode.apply(String, e.slice(0, s));
|
|
950
|
-
}, o.write = function(u,
|
|
951
|
-
for (var i =
|
|
952
|
-
t = u.charCodeAt(s), t < 128 ? r
|
|
953
|
-
return
|
|
950
|
+
}, o.write = function(u, n, r) {
|
|
951
|
+
for (var i = r, t, e, s = 0; s < u.length; ++s)
|
|
952
|
+
t = u.charCodeAt(s), t < 128 ? n[r++] = t : t < 2048 ? (n[r++] = t >> 6 | 192, n[r++] = t & 63 | 128) : (t & 64512) === 55296 && ((e = u.charCodeAt(s + 1)) & 64512) === 56320 ? (t = 65536 + ((t & 1023) << 10) + (e & 1023), ++s, n[r++] = t >> 18 | 240, n[r++] = t >> 12 & 63 | 128, n[r++] = t >> 6 & 63 | 128, n[r++] = t & 63 | 128) : (n[r++] = t >> 12 | 224, n[r++] = t >> 6 & 63 | 128, n[r++] = t & 63 | 128);
|
|
953
|
+
return r - i;
|
|
954
954
|
};
|
|
955
955
|
}(utf8)), utf8;
|
|
956
956
|
}
|
|
@@ -959,11 +959,11 @@ function requirePool() {
|
|
|
959
959
|
if (hasRequiredPool) return pool_1;
|
|
960
960
|
hasRequiredPool = 1, pool_1 = h;
|
|
961
961
|
function h(o, a, u) {
|
|
962
|
-
var
|
|
962
|
+
var n = u || 8192, r = n >>> 1, i = null, t = n;
|
|
963
963
|
return function(s) {
|
|
964
|
-
if (s < 1 || s >
|
|
964
|
+
if (s < 1 || s > r)
|
|
965
965
|
return o(s);
|
|
966
|
-
t + s >
|
|
966
|
+
t + s > n && (i = o(n), t = 0);
|
|
967
967
|
var l = a.call(i, t, t += s);
|
|
968
968
|
return t & 7 && (t = (t | 7) + 1), l;
|
|
969
969
|
};
|
|
@@ -975,8 +975,8 @@ function requireLongbits() {
|
|
|
975
975
|
if (hasRequiredLongbits) return longbits;
|
|
976
976
|
hasRequiredLongbits = 1, longbits = o;
|
|
977
977
|
var h = requireMinimal$1();
|
|
978
|
-
function o(
|
|
979
|
-
this.lo =
|
|
978
|
+
function o(r, i) {
|
|
979
|
+
this.lo = r >>> 0, this.hi = i >>> 0;
|
|
980
980
|
}
|
|
981
981
|
var a = o.zero = new o(0, 0);
|
|
982
982
|
a.toNumber = function() {
|
|
@@ -1012,11 +1012,11 @@ function requireLongbits() {
|
|
|
1012
1012
|
}, o.prototype.toLong = function(i) {
|
|
1013
1013
|
return h.Long ? new h.Long(this.lo | 0, this.hi | 0, !!i) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!i };
|
|
1014
1014
|
};
|
|
1015
|
-
var
|
|
1015
|
+
var n = String.prototype.charCodeAt;
|
|
1016
1016
|
return o.fromHash = function(i) {
|
|
1017
1017
|
return i === u ? a : new o(
|
|
1018
|
-
(
|
|
1019
|
-
(
|
|
1018
|
+
(n.call(i, 0) | n.call(i, 1) << 8 | n.call(i, 2) << 16 | n.call(i, 3) << 24) >>> 0,
|
|
1019
|
+
(n.call(i, 4) | n.call(i, 5) << 8 | n.call(i, 6) << 16 | n.call(i, 7) << 24) >>> 0
|
|
1020
1020
|
);
|
|
1021
1021
|
}, o.prototype.toHash = function() {
|
|
1022
1022
|
return String.fromCharCode(
|
|
@@ -1051,68 +1051,68 @@ function requireMinimal$1() {
|
|
|
1051
1051
|
/* istanbul ignore next */
|
|
1052
1052
|
{}
|
|
1053
1053
|
), o.isInteger = Number.isInteger || /* istanbul ignore next */
|
|
1054
|
-
function(
|
|
1055
|
-
return typeof
|
|
1056
|
-
}, o.isString = function(
|
|
1057
|
-
return typeof
|
|
1058
|
-
}, o.isObject = function(
|
|
1059
|
-
return
|
|
1054
|
+
function(r) {
|
|
1055
|
+
return typeof r == "number" && isFinite(r) && Math.floor(r) === r;
|
|
1056
|
+
}, o.isString = function(r) {
|
|
1057
|
+
return typeof r == "string" || r instanceof String;
|
|
1058
|
+
}, o.isObject = function(r) {
|
|
1059
|
+
return r && typeof r == "object";
|
|
1060
1060
|
}, o.isset = /**
|
|
1061
1061
|
* Checks if a property on a message is considered to be present.
|
|
1062
1062
|
* @param {Object} obj Plain object or message instance
|
|
1063
1063
|
* @param {string} prop Property name
|
|
1064
1064
|
* @returns {boolean} `true` if considered to be present, otherwise `false`
|
|
1065
1065
|
*/
|
|
1066
|
-
o.isSet = function(
|
|
1067
|
-
var t =
|
|
1068
|
-
return t != null &&
|
|
1066
|
+
o.isSet = function(r, i) {
|
|
1067
|
+
var t = r[i];
|
|
1068
|
+
return t != null && r.hasOwnProperty(i) ? typeof t != "object" || (Array.isArray(t) ? t.length : Object.keys(t).length) > 0 : !1;
|
|
1069
1069
|
}, o.Buffer = function() {
|
|
1070
1070
|
try {
|
|
1071
|
-
var
|
|
1072
|
-
return
|
|
1071
|
+
var n = o.inquire("buffer").Buffer;
|
|
1072
|
+
return n.prototype.utf8Write ? n : (
|
|
1073
1073
|
/* istanbul ignore next */
|
|
1074
1074
|
null
|
|
1075
1075
|
);
|
|
1076
1076
|
} catch {
|
|
1077
1077
|
return null;
|
|
1078
1078
|
}
|
|
1079
|
-
}(), o._Buffer_from = null, o._Buffer_allocUnsafe = null, o.newBuffer = function(
|
|
1080
|
-
return typeof
|
|
1079
|
+
}(), o._Buffer_from = null, o._Buffer_allocUnsafe = null, o.newBuffer = function(r) {
|
|
1080
|
+
return typeof r == "number" ? o.Buffer ? o._Buffer_allocUnsafe(r) : new o.Array(r) : o.Buffer ? o._Buffer_from(r) : typeof Uint8Array > "u" ? r : new Uint8Array(r);
|
|
1081
1081
|
}, o.Array = typeof Uint8Array < "u" ? Uint8Array : Array, o.Long = /* istanbul ignore next */
|
|
1082
1082
|
o.global.dcodeIO && /* istanbul ignore next */
|
|
1083
1083
|
o.global.dcodeIO.Long || /* istanbul ignore next */
|
|
1084
|
-
o.global.Long || o.inquire("long"), o.key2Re = /^true|false|0|1$/, o.key32Re = /^-?(?:0|[1-9][0-9]*)$/, o.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, o.longToHash = function(
|
|
1085
|
-
return
|
|
1086
|
-
}, o.longFromHash = function(
|
|
1087
|
-
var t = o.LongBits.fromHash(
|
|
1084
|
+
o.global.Long || o.inquire("long"), o.key2Re = /^true|false|0|1$/, o.key32Re = /^-?(?:0|[1-9][0-9]*)$/, o.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, o.longToHash = function(r) {
|
|
1085
|
+
return r ? o.LongBits.from(r).toHash() : o.LongBits.zeroHash;
|
|
1086
|
+
}, o.longFromHash = function(r, i) {
|
|
1087
|
+
var t = o.LongBits.fromHash(r);
|
|
1088
1088
|
return o.Long ? o.Long.fromBits(t.lo, t.hi, i) : t.toNumber(!!i);
|
|
1089
1089
|
};
|
|
1090
|
-
function a(
|
|
1091
|
-
for (var t = Object.keys(
|
|
1092
|
-
(
|
|
1093
|
-
return
|
|
1090
|
+
function a(n, r, i) {
|
|
1091
|
+
for (var t = Object.keys(r), e = 0; e < t.length; ++e)
|
|
1092
|
+
(n[t[e]] === void 0 || !i) && (n[t[e]] = r[t[e]]);
|
|
1093
|
+
return n;
|
|
1094
1094
|
}
|
|
1095
|
-
o.merge = a, o.lcFirst = function(
|
|
1096
|
-
return
|
|
1095
|
+
o.merge = a, o.lcFirst = function(r) {
|
|
1096
|
+
return r.charAt(0).toLowerCase() + r.substring(1);
|
|
1097
1097
|
};
|
|
1098
|
-
function u(
|
|
1099
|
-
function
|
|
1100
|
-
if (!(this instanceof
|
|
1101
|
-
return new
|
|
1098
|
+
function u(n) {
|
|
1099
|
+
function r(i, t) {
|
|
1100
|
+
if (!(this instanceof r))
|
|
1101
|
+
return new r(i, t);
|
|
1102
1102
|
Object.defineProperty(this, "message", { get: function() {
|
|
1103
1103
|
return i;
|
|
1104
|
-
} }), Error.captureStackTrace ? Error.captureStackTrace(this,
|
|
1104
|
+
} }), Error.captureStackTrace ? Error.captureStackTrace(this, r) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), t && a(this, t);
|
|
1105
1105
|
}
|
|
1106
|
-
return
|
|
1106
|
+
return r.prototype = Object.create(Error.prototype, {
|
|
1107
1107
|
constructor: {
|
|
1108
|
-
value:
|
|
1108
|
+
value: r,
|
|
1109
1109
|
writable: !0,
|
|
1110
1110
|
enumerable: !1,
|
|
1111
1111
|
configurable: !0
|
|
1112
1112
|
},
|
|
1113
1113
|
name: {
|
|
1114
1114
|
get: function() {
|
|
1115
|
-
return
|
|
1115
|
+
return n;
|
|
1116
1116
|
},
|
|
1117
1117
|
set: void 0,
|
|
1118
1118
|
enumerable: !1,
|
|
@@ -1130,20 +1130,20 @@ function requireMinimal$1() {
|
|
|
1130
1130
|
enumerable: !1,
|
|
1131
1131
|
configurable: !0
|
|
1132
1132
|
}
|
|
1133
|
-
}),
|
|
1133
|
+
}), r;
|
|
1134
1134
|
}
|
|
1135
|
-
o.newError = u, o.ProtocolError = u("ProtocolError"), o.oneOfGetter = function(
|
|
1136
|
-
for (var i = {}, t = 0; t <
|
|
1137
|
-
i[
|
|
1135
|
+
o.newError = u, o.ProtocolError = u("ProtocolError"), o.oneOfGetter = function(r) {
|
|
1136
|
+
for (var i = {}, t = 0; t < r.length; ++t)
|
|
1137
|
+
i[r[t]] = 1;
|
|
1138
1138
|
return function() {
|
|
1139
1139
|
for (var e = Object.keys(this), s = e.length - 1; s > -1; --s)
|
|
1140
1140
|
if (i[e[s]] === 1 && this[e[s]] !== void 0 && this[e[s]] !== null)
|
|
1141
1141
|
return e[s];
|
|
1142
1142
|
};
|
|
1143
|
-
}, o.oneOfSetter = function(
|
|
1143
|
+
}, o.oneOfSetter = function(r) {
|
|
1144
1144
|
return function(i) {
|
|
1145
|
-
for (var t = 0; t <
|
|
1146
|
-
|
|
1145
|
+
for (var t = 0; t < r.length; ++t)
|
|
1146
|
+
r[t] !== i && delete this[r[t]];
|
|
1147
1147
|
};
|
|
1148
1148
|
}, o.toJSONOptions = {
|
|
1149
1149
|
longs: String,
|
|
@@ -1151,17 +1151,17 @@ function requireMinimal$1() {
|
|
|
1151
1151
|
bytes: String,
|
|
1152
1152
|
json: !0
|
|
1153
1153
|
}, o._configure = function() {
|
|
1154
|
-
var
|
|
1155
|
-
if (!
|
|
1154
|
+
var n = o.Buffer;
|
|
1155
|
+
if (!n) {
|
|
1156
1156
|
o._Buffer_from = o._Buffer_allocUnsafe = null;
|
|
1157
1157
|
return;
|
|
1158
1158
|
}
|
|
1159
|
-
o._Buffer_from =
|
|
1159
|
+
o._Buffer_from = n.from !== Uint8Array.from && n.from || /* istanbul ignore next */
|
|
1160
1160
|
function(i, t) {
|
|
1161
|
-
return new
|
|
1162
|
-
}, o._Buffer_allocUnsafe =
|
|
1161
|
+
return new n(i, t);
|
|
1162
|
+
}, o._Buffer_allocUnsafe = n.allocUnsafe || /* istanbul ignore next */
|
|
1163
1163
|
function(i) {
|
|
1164
|
-
return new
|
|
1164
|
+
return new n(i);
|
|
1165
1165
|
};
|
|
1166
1166
|
};
|
|
1167
1167
|
}(minimal$1)), minimal$1;
|
|
@@ -1170,8 +1170,8 @@ var writer, hasRequiredWriter;
|
|
|
1170
1170
|
function requireWriter() {
|
|
1171
1171
|
if (hasRequiredWriter) return writer;
|
|
1172
1172
|
hasRequiredWriter = 1, writer = e;
|
|
1173
|
-
var h = requireMinimal$1(), o, a = h.LongBits, u = h.base64,
|
|
1174
|
-
function
|
|
1173
|
+
var h = requireMinimal$1(), o, a = h.LongBits, u = h.base64, n = h.utf8;
|
|
1174
|
+
function r(b, g, k) {
|
|
1175
1175
|
this.fn = b, this.len = g, this.next = void 0, this.val = k;
|
|
1176
1176
|
}
|
|
1177
1177
|
function i() {
|
|
@@ -1180,7 +1180,7 @@ function requireWriter() {
|
|
|
1180
1180
|
this.head = b.head, this.tail = b.tail, this.len = b.len, this.next = b.states;
|
|
1181
1181
|
}
|
|
1182
1182
|
function e() {
|
|
1183
|
-
this.len = 0, this.head = new
|
|
1183
|
+
this.len = 0, this.head = new r(i, 0, 0), this.tail = this.head, this.states = null;
|
|
1184
1184
|
}
|
|
1185
1185
|
var s = function() {
|
|
1186
1186
|
return h.Buffer ? function() {
|
|
@@ -1194,7 +1194,7 @@ function requireWriter() {
|
|
|
1194
1194
|
e.create = s(), e.alloc = function(g) {
|
|
1195
1195
|
return new h.Array(g);
|
|
1196
1196
|
}, h.Array !== Array && (e.alloc = h.pool(e.alloc, h.Array.prototype.subarray)), e.prototype._push = function(g, k, T) {
|
|
1197
|
-
return this.tail = this.tail.next = new
|
|
1197
|
+
return this.tail = this.tail.next = new r(g, k, T), this.len += k, this;
|
|
1198
1198
|
};
|
|
1199
1199
|
function l(b, g, k) {
|
|
1200
1200
|
g[k] = b & 255;
|
|
@@ -1207,7 +1207,7 @@ function requireWriter() {
|
|
|
1207
1207
|
function d(b, g) {
|
|
1208
1208
|
this.len = b, this.next = void 0, this.val = g;
|
|
1209
1209
|
}
|
|
1210
|
-
d.prototype = Object.create(
|
|
1210
|
+
d.prototype = Object.create(r.prototype), d.prototype.fn = c, e.prototype.uint32 = function(g) {
|
|
1211
1211
|
return this.len += (this.tail = this.tail.next = new d(
|
|
1212
1212
|
(g = g >>> 0) < 128 ? 1 : g < 16384 ? 2 : g < 2097152 ? 3 : g < 268435456 ? 4 : 5,
|
|
1213
1213
|
g
|
|
@@ -1262,12 +1262,12 @@ function requireWriter() {
|
|
|
1262
1262
|
}
|
|
1263
1263
|
return this.uint32(k)._push(w, k, g);
|
|
1264
1264
|
}, e.prototype.string = function(g) {
|
|
1265
|
-
var k =
|
|
1266
|
-
return k ? this.uint32(k)._push(
|
|
1265
|
+
var k = n.length(g);
|
|
1266
|
+
return k ? this.uint32(k)._push(n.write, k, g) : this._push(l, 1, 0);
|
|
1267
1267
|
}, e.prototype.fork = function() {
|
|
1268
|
-
return this.states = new t(this), this.head = this.tail = new
|
|
1268
|
+
return this.states = new t(this), this.head = this.tail = new r(i, 0, 0), this.len = 0, this;
|
|
1269
1269
|
}, e.prototype.reset = function() {
|
|
1270
|
-
return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new
|
|
1270
|
+
return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new r(i, 0, 0), this.len = 0), this;
|
|
1271
1271
|
}, e.prototype.ldelim = function() {
|
|
1272
1272
|
var g = this.head, k = this.tail, T = this.len;
|
|
1273
1273
|
return this.reset().uint32(T), T && (this.tail.next = g.next, this.tail = k, this.len += T), this;
|
|
@@ -1290,65 +1290,65 @@ function requireWriter_buffer() {
|
|
|
1290
1290
|
h.call(this);
|
|
1291
1291
|
}
|
|
1292
1292
|
a._configure = function() {
|
|
1293
|
-
a.alloc = o._Buffer_allocUnsafe, a.writeBytesBuffer = o.Buffer && o.Buffer.prototype instanceof Uint8Array && o.Buffer.prototype.set.name === "set" ? function(
|
|
1294
|
-
i.set(
|
|
1295
|
-
} : function(
|
|
1296
|
-
if (
|
|
1297
|
-
|
|
1298
|
-
else for (var e = 0; e <
|
|
1299
|
-
i[t++] =
|
|
1293
|
+
a.alloc = o._Buffer_allocUnsafe, a.writeBytesBuffer = o.Buffer && o.Buffer.prototype instanceof Uint8Array && o.Buffer.prototype.set.name === "set" ? function(r, i, t) {
|
|
1294
|
+
i.set(r, t);
|
|
1295
|
+
} : function(r, i, t) {
|
|
1296
|
+
if (r.copy)
|
|
1297
|
+
r.copy(i, t, 0, r.length);
|
|
1298
|
+
else for (var e = 0; e < r.length; )
|
|
1299
|
+
i[t++] = r[e++];
|
|
1300
1300
|
};
|
|
1301
|
-
}, a.prototype.bytes = function(
|
|
1302
|
-
o.isString(
|
|
1303
|
-
var i =
|
|
1304
|
-
return this.uint32(i), i && this._push(a.writeBytesBuffer, i,
|
|
1301
|
+
}, a.prototype.bytes = function(r) {
|
|
1302
|
+
o.isString(r) && (r = o._Buffer_from(r, "base64"));
|
|
1303
|
+
var i = r.length >>> 0;
|
|
1304
|
+
return this.uint32(i), i && this._push(a.writeBytesBuffer, i, r), this;
|
|
1305
1305
|
};
|
|
1306
|
-
function u(
|
|
1307
|
-
|
|
1306
|
+
function u(n, r, i) {
|
|
1307
|
+
n.length < 40 ? o.utf8.write(n, r, i) : r.utf8Write ? r.utf8Write(n, i) : r.write(n, i);
|
|
1308
1308
|
}
|
|
1309
|
-
return a.prototype.string = function(
|
|
1310
|
-
var i = o.Buffer.byteLength(
|
|
1311
|
-
return this.uint32(i), i && this._push(u, i,
|
|
1309
|
+
return a.prototype.string = function(r) {
|
|
1310
|
+
var i = o.Buffer.byteLength(r);
|
|
1311
|
+
return this.uint32(i), i && this._push(u, i, r), this;
|
|
1312
1312
|
}, a._configure(), writer_buffer;
|
|
1313
1313
|
}
|
|
1314
1314
|
var reader, hasRequiredReader;
|
|
1315
1315
|
function requireReader() {
|
|
1316
1316
|
if (hasRequiredReader) return reader;
|
|
1317
|
-
hasRequiredReader = 1, reader =
|
|
1317
|
+
hasRequiredReader = 1, reader = r;
|
|
1318
1318
|
var h = requireMinimal$1(), o, a = h.LongBits, u = h.utf8;
|
|
1319
|
-
function
|
|
1319
|
+
function n(c, d) {
|
|
1320
1320
|
return RangeError("index out of range: " + c.pos + " + " + (d || 1) + " > " + c.len);
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function r(c) {
|
|
1323
1323
|
this.buf = c, this.pos = 0, this.len = c.length;
|
|
1324
1324
|
}
|
|
1325
1325
|
var i = typeof Uint8Array < "u" ? function(d) {
|
|
1326
1326
|
if (d instanceof Uint8Array || Array.isArray(d))
|
|
1327
|
-
return new
|
|
1327
|
+
return new r(d);
|
|
1328
1328
|
throw Error("illegal buffer");
|
|
1329
1329
|
} : function(d) {
|
|
1330
1330
|
if (Array.isArray(d))
|
|
1331
|
-
return new
|
|
1331
|
+
return new r(d);
|
|
1332
1332
|
throw Error("illegal buffer");
|
|
1333
1333
|
}, t = function() {
|
|
1334
1334
|
return h.Buffer ? function(p) {
|
|
1335
|
-
return (
|
|
1335
|
+
return (r.create = function(w) {
|
|
1336
1336
|
return h.Buffer.isBuffer(w) ? new o(w) : i(w);
|
|
1337
1337
|
})(p);
|
|
1338
1338
|
} : i;
|
|
1339
1339
|
};
|
|
1340
|
-
|
|
1341
|
-
h.Array.prototype.slice,
|
|
1340
|
+
r.create = t(), r.prototype._slice = h.Array.prototype.subarray || /* istanbul ignore next */
|
|
1341
|
+
h.Array.prototype.slice, r.prototype.uint32 = /* @__PURE__ */ function() {
|
|
1342
1342
|
var d = 4294967295;
|
|
1343
1343
|
return function() {
|
|
1344
1344
|
if (d = (this.buf[this.pos] & 127) >>> 0, this.buf[this.pos++] < 128 || (d = (d | (this.buf[this.pos] & 127) << 7) >>> 0, this.buf[this.pos++] < 128) || (d = (d | (this.buf[this.pos] & 127) << 14) >>> 0, this.buf[this.pos++] < 128) || (d = (d | (this.buf[this.pos] & 127) << 21) >>> 0, this.buf[this.pos++] < 128) || (d = (d | (this.buf[this.pos] & 15) << 28) >>> 0, this.buf[this.pos++] < 128)) return d;
|
|
1345
1345
|
if ((this.pos += 5) > this.len)
|
|
1346
|
-
throw this.pos = this.len,
|
|
1346
|
+
throw this.pos = this.len, n(this, 10);
|
|
1347
1347
|
return d;
|
|
1348
1348
|
};
|
|
1349
|
-
}(),
|
|
1349
|
+
}(), r.prototype.int32 = function() {
|
|
1350
1350
|
return this.uint32() | 0;
|
|
1351
|
-
},
|
|
1351
|
+
}, r.prototype.sint32 = function() {
|
|
1352
1352
|
var d = this.uint32();
|
|
1353
1353
|
return d >>> 1 ^ -(d & 1) | 0;
|
|
1354
1354
|
};
|
|
@@ -1364,7 +1364,7 @@ function requireReader() {
|
|
|
1364
1364
|
} else {
|
|
1365
1365
|
for (; d < 3; ++d) {
|
|
1366
1366
|
if (this.pos >= this.len)
|
|
1367
|
-
throw
|
|
1367
|
+
throw n(this);
|
|
1368
1368
|
if (c.lo = (c.lo | (this.buf[this.pos] & 127) << d * 7) >>> 0, this.buf[this.pos++] < 128)
|
|
1369
1369
|
return c;
|
|
1370
1370
|
}
|
|
@@ -1377,46 +1377,46 @@ function requireReader() {
|
|
|
1377
1377
|
} else
|
|
1378
1378
|
for (; d < 5; ++d) {
|
|
1379
1379
|
if (this.pos >= this.len)
|
|
1380
|
-
throw
|
|
1380
|
+
throw n(this);
|
|
1381
1381
|
if (c.hi = (c.hi | (this.buf[this.pos] & 127) << d * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
|
|
1382
1382
|
return c;
|
|
1383
1383
|
}
|
|
1384
1384
|
throw Error("invalid varint encoding");
|
|
1385
1385
|
}
|
|
1386
|
-
|
|
1386
|
+
r.prototype.bool = function() {
|
|
1387
1387
|
return this.uint32() !== 0;
|
|
1388
1388
|
};
|
|
1389
1389
|
function s(c, d) {
|
|
1390
1390
|
return (c[d - 4] | c[d - 3] << 8 | c[d - 2] << 16 | c[d - 1] << 24) >>> 0;
|
|
1391
1391
|
}
|
|
1392
|
-
|
|
1392
|
+
r.prototype.fixed32 = function() {
|
|
1393
1393
|
if (this.pos + 4 > this.len)
|
|
1394
|
-
throw
|
|
1394
|
+
throw n(this, 4);
|
|
1395
1395
|
return s(this.buf, this.pos += 4);
|
|
1396
|
-
},
|
|
1396
|
+
}, r.prototype.sfixed32 = function() {
|
|
1397
1397
|
if (this.pos + 4 > this.len)
|
|
1398
|
-
throw
|
|
1398
|
+
throw n(this, 4);
|
|
1399
1399
|
return s(this.buf, this.pos += 4) | 0;
|
|
1400
1400
|
};
|
|
1401
1401
|
function l() {
|
|
1402
1402
|
if (this.pos + 8 > this.len)
|
|
1403
|
-
throw
|
|
1403
|
+
throw n(this, 8);
|
|
1404
1404
|
return new a(s(this.buf, this.pos += 4), s(this.buf, this.pos += 4));
|
|
1405
1405
|
}
|
|
1406
|
-
return
|
|
1406
|
+
return r.prototype.float = function() {
|
|
1407
1407
|
if (this.pos + 4 > this.len)
|
|
1408
|
-
throw
|
|
1408
|
+
throw n(this, 4);
|
|
1409
1409
|
var d = h.float.readFloatLE(this.buf, this.pos);
|
|
1410
1410
|
return this.pos += 4, d;
|
|
1411
|
-
},
|
|
1411
|
+
}, r.prototype.double = function() {
|
|
1412
1412
|
if (this.pos + 8 > this.len)
|
|
1413
|
-
throw
|
|
1413
|
+
throw n(this, 4);
|
|
1414
1414
|
var d = h.float.readDoubleLE(this.buf, this.pos);
|
|
1415
1415
|
return this.pos += 8, d;
|
|
1416
|
-
},
|
|
1416
|
+
}, r.prototype.bytes = function() {
|
|
1417
1417
|
var d = this.uint32(), p = this.pos, f = this.pos + d;
|
|
1418
1418
|
if (f > this.len)
|
|
1419
|
-
throw
|
|
1419
|
+
throw n(this, d);
|
|
1420
1420
|
if (this.pos += d, Array.isArray(this.buf))
|
|
1421
1421
|
return this.buf.slice(p, f);
|
|
1422
1422
|
if (p === f) {
|
|
@@ -1424,21 +1424,21 @@ function requireReader() {
|
|
|
1424
1424
|
return w ? w.alloc(0) : new this.buf.constructor(0);
|
|
1425
1425
|
}
|
|
1426
1426
|
return this._slice.call(this.buf, p, f);
|
|
1427
|
-
},
|
|
1427
|
+
}, r.prototype.string = function() {
|
|
1428
1428
|
var d = this.bytes();
|
|
1429
1429
|
return u.read(d, 0, d.length);
|
|
1430
|
-
},
|
|
1430
|
+
}, r.prototype.skip = function(d) {
|
|
1431
1431
|
if (typeof d == "number") {
|
|
1432
1432
|
if (this.pos + d > this.len)
|
|
1433
|
-
throw
|
|
1433
|
+
throw n(this, d);
|
|
1434
1434
|
this.pos += d;
|
|
1435
1435
|
} else
|
|
1436
1436
|
do
|
|
1437
1437
|
if (this.pos >= this.len)
|
|
1438
|
-
throw
|
|
1438
|
+
throw n(this);
|
|
1439
1439
|
while (this.buf[this.pos++] & 128);
|
|
1440
1440
|
return this;
|
|
1441
|
-
},
|
|
1441
|
+
}, r.prototype.skipType = function(c) {
|
|
1442
1442
|
switch (c) {
|
|
1443
1443
|
case 0:
|
|
1444
1444
|
this.skip();
|
|
@@ -1461,13 +1461,13 @@ function requireReader() {
|
|
|
1461
1461
|
throw Error("invalid wire type " + c + " at offset " + this.pos);
|
|
1462
1462
|
}
|
|
1463
1463
|
return this;
|
|
1464
|
-
},
|
|
1465
|
-
o = c,
|
|
1464
|
+
}, r._configure = function(c) {
|
|
1465
|
+
o = c, r.create = t(), o._configure();
|
|
1466
1466
|
var d = h.Long ? "toLong" : (
|
|
1467
1467
|
/* istanbul ignore next */
|
|
1468
1468
|
"toNumber"
|
|
1469
1469
|
);
|
|
1470
|
-
h.merge(
|
|
1470
|
+
h.merge(r.prototype, {
|
|
1471
1471
|
int64: function() {
|
|
1472
1472
|
return e.call(this)[d](!1);
|
|
1473
1473
|
},
|
|
@@ -1499,8 +1499,8 @@ function requireReader_buffer() {
|
|
|
1499
1499
|
return a._configure = function() {
|
|
1500
1500
|
o.Buffer && (a.prototype._slice = o.Buffer.prototype.slice);
|
|
1501
1501
|
}, a.prototype.string = function() {
|
|
1502
|
-
var
|
|
1503
|
-
return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos +
|
|
1502
|
+
var n = this.uint32();
|
|
1503
|
+
return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + n, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + n, this.len));
|
|
1504
1504
|
}, a._configure(), reader_buffer;
|
|
1505
1505
|
}
|
|
1506
1506
|
var rpc = {}, service, hasRequiredService;
|
|
@@ -1509,17 +1509,17 @@ function requireService() {
|
|
|
1509
1509
|
hasRequiredService = 1, service = o;
|
|
1510
1510
|
var h = requireMinimal$1();
|
|
1511
1511
|
(o.prototype = Object.create(h.EventEmitter.prototype)).constructor = o;
|
|
1512
|
-
function o(a, u,
|
|
1512
|
+
function o(a, u, n) {
|
|
1513
1513
|
if (typeof a != "function")
|
|
1514
1514
|
throw TypeError("rpcImpl must be a function");
|
|
1515
|
-
h.EventEmitter.call(this), this.rpcImpl = a, this.requestDelimited = !!u, this.responseDelimited = !!
|
|
1515
|
+
h.EventEmitter.call(this), this.rpcImpl = a, this.requestDelimited = !!u, this.responseDelimited = !!n;
|
|
1516
1516
|
}
|
|
1517
|
-
return o.prototype.rpcCall = function a(u,
|
|
1517
|
+
return o.prototype.rpcCall = function a(u, n, r, i, t) {
|
|
1518
1518
|
if (!i)
|
|
1519
1519
|
throw TypeError("request must be specified");
|
|
1520
1520
|
var e = this;
|
|
1521
1521
|
if (!t)
|
|
1522
|
-
return h.asPromise(a, e, u,
|
|
1522
|
+
return h.asPromise(a, e, u, n, r, i);
|
|
1523
1523
|
if (!e.rpcImpl) {
|
|
1524
1524
|
setTimeout(function() {
|
|
1525
1525
|
t(Error("already ended"));
|
|
@@ -1529,7 +1529,7 @@ function requireService() {
|
|
|
1529
1529
|
try {
|
|
1530
1530
|
return e.rpcImpl(
|
|
1531
1531
|
u,
|
|
1532
|
-
|
|
1532
|
+
n[e.requestDelimited ? "encodeDelimited" : "encode"](i).finish(),
|
|
1533
1533
|
function(l, c) {
|
|
1534
1534
|
if (l)
|
|
1535
1535
|
return e.emit("error", l, u), t(l);
|
|
@@ -1540,9 +1540,9 @@ function requireService() {
|
|
|
1540
1540
|
);
|
|
1541
1541
|
return;
|
|
1542
1542
|
}
|
|
1543
|
-
if (!(c instanceof
|
|
1543
|
+
if (!(c instanceof r))
|
|
1544
1544
|
try {
|
|
1545
|
-
c =
|
|
1545
|
+
c = r[e.responseDelimited ? "decodeDelimited" : "decode"](c);
|
|
1546
1546
|
} catch (d) {
|
|
1547
1547
|
return e.emit("error", d, u), t(d);
|
|
1548
1548
|
}
|
|
@@ -1595,12 +1595,12 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1595
1595
|
return a.proto = function() {
|
|
1596
1596
|
const u = {};
|
|
1597
1597
|
return u.SeiData = function() {
|
|
1598
|
-
function r
|
|
1599
|
-
if (
|
|
1598
|
+
function n(r) {
|
|
1599
|
+
if (r) for (let i = Object.keys(r), t = 0; t < i.length; ++t) r[i[t]] != null && (this[i[t]] = r[i[t]]);
|
|
1600
1600
|
}
|
|
1601
|
-
return
|
|
1602
|
-
return new
|
|
1603
|
-
},
|
|
1601
|
+
return n.prototype.event = 0, n.prototype.data = $util.newBuffer([]), n.prototype.compress = !1, n.prototype.version = 0, n.create = function(i) {
|
|
1602
|
+
return new n(i);
|
|
1603
|
+
}, n.encode = function(i, t) {
|
|
1604
1604
|
return t || (t = $Writer.create()), i.event != null && Object.hasOwnProperty.call(i, "event") && t.uint32(
|
|
1605
1605
|
/* id 1, wireType 0 =*/
|
|
1606
1606
|
8
|
|
@@ -1614,9 +1614,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1614
1614
|
/* id 4, wireType 0 =*/
|
|
1615
1615
|
32
|
|
1616
1616
|
).int32(i.version), t;
|
|
1617
|
-
},
|
|
1617
|
+
}, n.encodeDelimited = function(i, t) {
|
|
1618
1618
|
return this.encode(i, t).ldelim();
|
|
1619
|
-
},
|
|
1619
|
+
}, n.decode = function(i, t, e) {
|
|
1620
1620
|
i instanceof $Reader || (i = $Reader.create(i));
|
|
1621
1621
|
let s = t === void 0 ? i.len : i.pos + t, l = new $root.com.quick.voice.proto.SeiData();
|
|
1622
1622
|
for (; i.pos < s; ) {
|
|
@@ -1645,9 +1645,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
1647
|
return l;
|
|
1648
|
-
},
|
|
1648
|
+
}, n.decodeDelimited = function(i) {
|
|
1649
1649
|
return i instanceof $Reader || (i = new $Reader(i)), this.decode(i, i.uint32());
|
|
1650
|
-
},
|
|
1650
|
+
}, n.verify = function(i) {
|
|
1651
1651
|
if (typeof i != "object" || i === null) return "object expected";
|
|
1652
1652
|
if (i.event != null && i.hasOwnProperty("event"))
|
|
1653
1653
|
switch (i.event) {
|
|
@@ -1658,7 +1658,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1658
1658
|
break;
|
|
1659
1659
|
}
|
|
1660
1660
|
return i.data != null && i.hasOwnProperty("data") && !(i.data && typeof i.data.length == "number" || $util.isString(i.data)) ? "data: buffer expected" : i.compress != null && i.hasOwnProperty("compress") && typeof i.compress != "boolean" ? "compress: boolean expected" : i.version != null && i.hasOwnProperty("version") && !$util.isInteger(i.version) ? "version: integer expected" : null;
|
|
1661
|
-
},
|
|
1661
|
+
}, n.fromObject = function(i) {
|
|
1662
1662
|
if (i instanceof $root.com.quick.voice.proto.SeiData) return i;
|
|
1663
1663
|
let t = new $root.com.quick.voice.proto.SeiData();
|
|
1664
1664
|
switch (i.event) {
|
|
@@ -1678,30 +1678,30 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1678
1678
|
break;
|
|
1679
1679
|
}
|
|
1680
1680
|
return i.data != null && (typeof i.data == "string" ? $util.base64.decode(i.data, t.data = $util.newBuffer($util.base64.length(i.data)), 0) : i.data.length >= 0 && (t.data = i.data)), i.compress != null && (t.compress = !!i.compress), i.version != null && (t.version = i.version | 0), t;
|
|
1681
|
-
},
|
|
1681
|
+
}, n.toObject = function(i, t) {
|
|
1682
1682
|
t || (t = {});
|
|
1683
1683
|
let e = {};
|
|
1684
1684
|
return t.defaults && (e.event = t.enums === String ? "Layout" : 0, t.bytes === String ? e.data = "" : (e.data = [], t.bytes !== Array && (e.data = $util.newBuffer(e.data))), e.compress = !1, e.version = 0), i.event != null && i.hasOwnProperty("event") && (e.event = t.enums === String ? $root.com.quick.voice.proto.EventType[i.event] === void 0 ? i.event : $root.com.quick.voice.proto.EventType[i.event] : i.event), i.data != null && i.hasOwnProperty("data") && (e.data = t.bytes === String ? $util.base64.encode(i.data, 0, i.data.length) : t.bytes === Array ? Array.prototype.slice.call(i.data) : i.data), i.compress != null && i.hasOwnProperty("compress") && (e.compress = i.compress), i.version != null && i.hasOwnProperty("version") && (e.version = i.version), e;
|
|
1685
|
-
},
|
|
1685
|
+
}, n.prototype.toJSON = function() {
|
|
1686
1686
|
return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
|
|
1687
|
-
},
|
|
1687
|
+
}, n.getTypeUrl = function(i) {
|
|
1688
1688
|
return i === void 0 && (i = "type.googleapis.com"), i + "/com.quick.voice.proto.SeiData";
|
|
1689
|
-
},
|
|
1689
|
+
}, n;
|
|
1690
1690
|
}(), u.EventType = function() {
|
|
1691
|
-
const
|
|
1692
|
-
return n[
|
|
1691
|
+
const n = {}, r = Object.create(n);
|
|
1692
|
+
return r[n[0] = "Layout"] = 0, r[n[1] = "Custom"] = 1, r;
|
|
1693
1693
|
}(), u.LayoutData = function() {
|
|
1694
|
-
function
|
|
1694
|
+
function n(i) {
|
|
1695
1695
|
if (this.userMap = {}, i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
|
|
1696
1696
|
}
|
|
1697
|
-
|
|
1698
|
-
let
|
|
1699
|
-
return Object.defineProperty(
|
|
1700
|
-
get: $util.oneOfGetter(
|
|
1701
|
-
set: $util.oneOfSetter(
|
|
1702
|
-
}),
|
|
1703
|
-
return new
|
|
1704
|
-
},
|
|
1697
|
+
n.prototype.roomId = "", n.prototype.type = 0, n.prototype.userMap = $util.emptyObject, n.prototype.globalCustom = null;
|
|
1698
|
+
let r;
|
|
1699
|
+
return Object.defineProperty(n.prototype, "_globalCustom", {
|
|
1700
|
+
get: $util.oneOfGetter(r = ["globalCustom"]),
|
|
1701
|
+
set: $util.oneOfSetter(r)
|
|
1702
|
+
}), n.create = function(t) {
|
|
1703
|
+
return new n(t);
|
|
1704
|
+
}, n.encode = function(t, e) {
|
|
1705
1705
|
if (e || (e = $Writer.create()), t.roomId != null && Object.hasOwnProperty.call(t, "roomId") && e.uint32(
|
|
1706
1706
|
/* id 1, wireType 2 =*/
|
|
1707
1707
|
10
|
|
@@ -1724,9 +1724,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1724
1724
|
/* id 4, wireType 2 =*/
|
|
1725
1725
|
34
|
|
1726
1726
|
).fork()).ldelim(), e;
|
|
1727
|
-
},
|
|
1727
|
+
}, n.encodeDelimited = function(t, e) {
|
|
1728
1728
|
return this.encode(t, e).ldelim();
|
|
1729
|
-
},
|
|
1729
|
+
}, n.decode = function(t, e, s) {
|
|
1730
1730
|
t instanceof $Reader || (t = $Reader.create(t));
|
|
1731
1731
|
let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.LayoutData(), d, p;
|
|
1732
1732
|
for (; t.pos < l; ) {
|
|
@@ -1771,9 +1771,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1771
1771
|
}
|
|
1772
1772
|
}
|
|
1773
1773
|
return c;
|
|
1774
|
-
},
|
|
1774
|
+
}, n.decodeDelimited = function(t) {
|
|
1775
1775
|
return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
|
|
1776
|
-
},
|
|
1776
|
+
}, n.verify = function(t) {
|
|
1777
1777
|
if (typeof t != "object" || t === null) return "object expected";
|
|
1778
1778
|
if (t.roomId != null && t.hasOwnProperty("roomId") && !$util.isString(t.roomId)) return "roomId: string expected";
|
|
1779
1779
|
if (t.type != null && t.hasOwnProperty("type"))
|
|
@@ -1798,7 +1798,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1798
1798
|
if (e) return "globalCustom." + e;
|
|
1799
1799
|
}
|
|
1800
1800
|
return null;
|
|
1801
|
-
},
|
|
1801
|
+
}, n.fromObject = function(t) {
|
|
1802
1802
|
if (t instanceof $root.com.quick.voice.proto.LayoutData) return t;
|
|
1803
1803
|
let e = new $root.com.quick.voice.proto.LayoutData();
|
|
1804
1804
|
switch (t.roomId != null && (e.roomId = String(t.roomId)), t.type) {
|
|
@@ -1834,7 +1834,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1834
1834
|
e.globalCustom = $root.com.quick.voice.proto.CustomInfo.fromObject(t.globalCustom);
|
|
1835
1835
|
}
|
|
1836
1836
|
return e;
|
|
1837
|
-
},
|
|
1837
|
+
}, n.toObject = function(t, e) {
|
|
1838
1838
|
e || (e = {});
|
|
1839
1839
|
let s = {};
|
|
1840
1840
|
(e.objects || e.defaults) && (s.userMap = {}), e.defaults && (s.roomId = "", s.type = e.enums === String ? "AudioAndVideo" : 0), t.roomId != null && t.hasOwnProperty("roomId") && (s.roomId = t.roomId), t.type != null && t.hasOwnProperty("type") && (s.type = e.enums === String ? $root.com.quick.voice.proto.LayoutType[t.type] === void 0 ? t.type : $root.com.quick.voice.proto.LayoutType[t.type] : t.type);
|
|
@@ -1844,23 +1844,23 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1844
1844
|
for (let c = 0; c < l.length; ++c) s.userMap[l[c]] = $root.com.quick.voice.proto.UserInfo.toObject(t.userMap[l[c]], e);
|
|
1845
1845
|
}
|
|
1846
1846
|
return t.globalCustom != null && t.hasOwnProperty("globalCustom") && (s.globalCustom = $root.com.quick.voice.proto.CustomInfo.toObject(t.globalCustom, e), e.oneofs && (s._globalCustom = "globalCustom")), s;
|
|
1847
|
-
},
|
|
1847
|
+
}, n.prototype.toJSON = function() {
|
|
1848
1848
|
return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
|
|
1849
|
-
},
|
|
1849
|
+
}, n.getTypeUrl = function(t) {
|
|
1850
1850
|
return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.LayoutData";
|
|
1851
|
-
},
|
|
1851
|
+
}, n;
|
|
1852
1852
|
}(), u.UserInfo = function() {
|
|
1853
|
-
function
|
|
1853
|
+
function n(i) {
|
|
1854
1854
|
if (this.audios = [], this.videos = [], i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
|
|
1855
1855
|
}
|
|
1856
|
-
|
|
1857
|
-
let
|
|
1858
|
-
return Object.defineProperty(
|
|
1859
|
-
get: $util.oneOfGetter(
|
|
1860
|
-
set: $util.oneOfSetter(
|
|
1861
|
-
}),
|
|
1862
|
-
return new
|
|
1863
|
-
},
|
|
1856
|
+
n.prototype.id = "", n.prototype.audios = $util.emptyArray, n.prototype.videos = $util.emptyArray, n.prototype.custom = null;
|
|
1857
|
+
let r;
|
|
1858
|
+
return Object.defineProperty(n.prototype, "_custom", {
|
|
1859
|
+
get: $util.oneOfGetter(r = ["custom"]),
|
|
1860
|
+
set: $util.oneOfSetter(r)
|
|
1861
|
+
}), n.create = function(t) {
|
|
1862
|
+
return new n(t);
|
|
1863
|
+
}, n.encode = function(t, e) {
|
|
1864
1864
|
if (e || (e = $Writer.create()), t.id != null && Object.hasOwnProperty.call(t, "id") && e.uint32(
|
|
1865
1865
|
/* id 1, wireType 2 =*/
|
|
1866
1866
|
10
|
|
@@ -1876,9 +1876,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1876
1876
|
/* id 4, wireType 2 =*/
|
|
1877
1877
|
34
|
|
1878
1878
|
).fork()).ldelim(), e;
|
|
1879
|
-
},
|
|
1879
|
+
}, n.encodeDelimited = function(t, e) {
|
|
1880
1880
|
return this.encode(t, e).ldelim();
|
|
1881
|
-
},
|
|
1881
|
+
}, n.decode = function(t, e, s) {
|
|
1882
1882
|
t instanceof $Reader || (t = $Reader.create(t));
|
|
1883
1883
|
let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.UserInfo();
|
|
1884
1884
|
for (; t.pos < l; ) {
|
|
@@ -1907,9 +1907,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
1909
1909
|
return c;
|
|
1910
|
-
},
|
|
1910
|
+
}, n.decodeDelimited = function(t) {
|
|
1911
1911
|
return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
|
|
1912
|
-
},
|
|
1912
|
+
}, n.verify = function(t) {
|
|
1913
1913
|
if (typeof t != "object" || t === null) return "object expected";
|
|
1914
1914
|
if (t.id != null && t.hasOwnProperty("id") && !$util.isString(t.id)) return "id: string expected";
|
|
1915
1915
|
if (t.audios != null && t.hasOwnProperty("audios")) {
|
|
@@ -1931,7 +1931,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1931
1931
|
if (e) return "custom." + e;
|
|
1932
1932
|
}
|
|
1933
1933
|
return null;
|
|
1934
|
-
},
|
|
1934
|
+
}, n.fromObject = function(t) {
|
|
1935
1935
|
if (t instanceof $root.com.quick.voice.proto.UserInfo) return t;
|
|
1936
1936
|
let e = new $root.com.quick.voice.proto.UserInfo();
|
|
1937
1937
|
if (t.id != null && (e.id = String(t.id)), t.audios) {
|
|
@@ -1955,7 +1955,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1955
1955
|
e.custom = $root.com.quick.voice.proto.CustomInfo.fromObject(t.custom);
|
|
1956
1956
|
}
|
|
1957
1957
|
return e;
|
|
1958
|
-
},
|
|
1958
|
+
}, n.toObject = function(t, e) {
|
|
1959
1959
|
e || (e = {});
|
|
1960
1960
|
let s = {};
|
|
1961
1961
|
if ((e.arrays || e.defaults) && (s.audios = [], s.videos = []), e.defaults && (s.id = ""), t.id != null && t.hasOwnProperty("id") && (s.id = t.id), t.audios && t.audios.length) {
|
|
@@ -1967,23 +1967,23 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
1967
1967
|
for (let l = 0; l < t.videos.length; ++l) s.videos[l] = $root.com.quick.voice.proto.VideoInfo.toObject(t.videos[l], e);
|
|
1968
1968
|
}
|
|
1969
1969
|
return t.custom != null && t.hasOwnProperty("custom") && (s.custom = $root.com.quick.voice.proto.CustomInfo.toObject(t.custom, e), e.oneofs && (s._custom = "custom")), s;
|
|
1970
|
-
},
|
|
1970
|
+
}, n.prototype.toJSON = function() {
|
|
1971
1971
|
return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
|
|
1972
|
-
},
|
|
1972
|
+
}, n.getTypeUrl = function(t) {
|
|
1973
1973
|
return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.UserInfo";
|
|
1974
|
-
},
|
|
1974
|
+
}, n;
|
|
1975
1975
|
}(), u.AudioInfo = function() {
|
|
1976
|
-
function
|
|
1976
|
+
function n(i) {
|
|
1977
1977
|
if (i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
|
|
1978
1978
|
}
|
|
1979
|
-
|
|
1980
|
-
let
|
|
1981
|
-
return Object.defineProperty(
|
|
1982
|
-
get: $util.oneOfGetter(
|
|
1983
|
-
set: $util.oneOfSetter(
|
|
1984
|
-
}),
|
|
1985
|
-
return new
|
|
1986
|
-
},
|
|
1979
|
+
n.prototype.type = 0, n.prototype.isEnable = !1, n.prototype.isMute = !1, n.prototype.volume = 0, n.prototype.updateTime = null;
|
|
1980
|
+
let r;
|
|
1981
|
+
return Object.defineProperty(n.prototype, "_updateTime", {
|
|
1982
|
+
get: $util.oneOfGetter(r = ["updateTime"]),
|
|
1983
|
+
set: $util.oneOfSetter(r)
|
|
1984
|
+
}), n.create = function(t) {
|
|
1985
|
+
return new n(t);
|
|
1986
|
+
}, n.encode = function(t, e) {
|
|
1987
1987
|
return e || (e = $Writer.create()), t.type != null && Object.hasOwnProperty.call(t, "type") && e.uint32(
|
|
1988
1988
|
/* id 1, wireType 0 =*/
|
|
1989
1989
|
8
|
|
@@ -2000,9 +2000,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
2000
2000
|
/* id 5, wireType 0 =*/
|
|
2001
2001
|
40
|
|
2002
2002
|
).int64(t.updateTime), e;
|
|
2003
|
-
},
|
|
2003
|
+
}, n.encodeDelimited = function(t, e) {
|
|
2004
2004
|
return this.encode(t, e).ldelim();
|
|
2005
|
-
},
|
|
2005
|
+
}, n.decode = function(t, e, s) {
|
|
2006
2006
|
t instanceof $Reader || (t = $Reader.create(t));
|
|
2007
2007
|
let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.AudioInfo();
|
|
2008
2008
|
for (; t.pos < l; ) {
|
|
@@ -2035,9 +2035,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
2035
2035
|
}
|
|
2036
2036
|
}
|
|
2037
2037
|
return c;
|
|
2038
|
-
},
|
|
2038
|
+
}, n.decodeDelimited = function(t) {
|
|
2039
2039
|
return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
|
|
2040
|
-
},
|
|
2040
|
+
}, n.verify = function(t) {
|
|
2041
2041
|
if (typeof t != "object" || t === null) return "object expected";
|
|
2042
2042
|
if (t.type != null && t.hasOwnProperty("type"))
|
|
2043
2043
|
switch (t.type) {
|
|
@@ -2048,7 +2048,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
2048
2048
|
break;
|
|
2049
2049
|
}
|
|
2050
2050
|
return t.isEnable != null && t.hasOwnProperty("isEnable") && typeof t.isEnable != "boolean" ? "isEnable: boolean expected" : t.isMute != null && t.hasOwnProperty("isMute") && typeof t.isMute != "boolean" ? "isMute: boolean expected" : t.volume != null && t.hasOwnProperty("volume") && typeof t.volume != "number" ? "volume: number expected" : t.updateTime != null && t.hasOwnProperty("updateTime") && !$util.isInteger(t.updateTime) && !(t.updateTime && $util.isInteger(t.updateTime.low) && $util.isInteger(t.updateTime.high)) ? "updateTime: integer|Long expected" : null;
|
|
2051
|
-
},
|
|
2051
|
+
}, n.fromObject = function(t) {
|
|
2052
2052
|
if (t instanceof $root.com.quick.voice.proto.AudioInfo) return t;
|
|
2053
2053
|
let e = new $root.com.quick.voice.proto.AudioInfo();
|
|
2054
2054
|
switch (t.type) {
|
|
@@ -2068,27 +2068,27 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
2068
2068
|
break;
|
|
2069
2069
|
}
|
|
2070
2070
|
return t.isEnable != null && (e.isEnable = !!t.isEnable), t.isMute != null && (e.isMute = !!t.isMute), t.volume != null && (e.volume = Number(t.volume)), t.updateTime != null && ($util.Long ? (e.updateTime = $util.Long.fromValue(t.updateTime)).unsigned = !1 : typeof t.updateTime == "string" ? e.updateTime = parseInt(t.updateTime, 10) : typeof t.updateTime == "number" ? e.updateTime = t.updateTime : typeof t.updateTime == "object" && (e.updateTime = new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber())), e;
|
|
2071
|
-
},
|
|
2071
|
+
}, n.toObject = function(t, e) {
|
|
2072
2072
|
e || (e = {});
|
|
2073
2073
|
let s = {};
|
|
2074
2074
|
return e.defaults && (s.type = e.enums === String ? "Microphone" : 0, s.isEnable = !1, s.isMute = !1, s.volume = 0), t.type != null && t.hasOwnProperty("type") && (s.type = e.enums === String ? $root.com.quick.voice.proto.AudioType[t.type] === void 0 ? t.type : $root.com.quick.voice.proto.AudioType[t.type] : t.type), t.isEnable != null && t.hasOwnProperty("isEnable") && (s.isEnable = t.isEnable), t.isMute != null && t.hasOwnProperty("isMute") && (s.isMute = t.isMute), t.volume != null && t.hasOwnProperty("volume") && (s.volume = e.json && !isFinite(t.volume) ? String(t.volume) : t.volume), t.updateTime != null && t.hasOwnProperty("updateTime") && (typeof t.updateTime == "number" ? s.updateTime = e.longs === String ? String(t.updateTime) : t.updateTime : s.updateTime = e.longs === String ? $util.Long.prototype.toString.call(t.updateTime) : e.longs === Number ? new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber() : t.updateTime, e.oneofs && (s._updateTime = "updateTime")), s;
|
|
2075
|
-
},
|
|
2075
|
+
}, n.prototype.toJSON = function() {
|
|
2076
2076
|
return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
|
|
2077
|
-
},
|
|
2077
|
+
}, n.getTypeUrl = function(t) {
|
|
2078
2078
|
return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.AudioInfo";
|
|
2079
|
-
},
|
|
2079
|
+
}, n;
|
|
2080
2080
|
}(), u.VideoInfo = function() {
|
|
2081
|
-
function
|
|
2081
|
+
function n(i) {
|
|
2082
2082
|
if (i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
|
|
2083
2083
|
}
|
|
2084
|
-
|
|
2085
|
-
let
|
|
2086
|
-
return Object.defineProperty(
|
|
2087
|
-
get: $util.oneOfGetter(
|
|
2088
|
-
set: $util.oneOfSetter(
|
|
2089
|
-
}),
|
|
2090
|
-
return new
|
|
2091
|
-
},
|
|
2084
|
+
n.prototype.type = 0, n.prototype.isEnable = !1, n.prototype.isMute = !1, n.prototype.width = 0, n.prototype.height = 0, n.prototype.x = 0, n.prototype.y = 0, n.prototype.updateTime = null;
|
|
2085
|
+
let r;
|
|
2086
|
+
return Object.defineProperty(n.prototype, "_updateTime", {
|
|
2087
|
+
get: $util.oneOfGetter(r = ["updateTime"]),
|
|
2088
|
+
set: $util.oneOfSetter(r)
|
|
2089
|
+
}), n.create = function(t) {
|
|
2090
|
+
return new n(t);
|
|
2091
|
+
}, n.encode = function(t, e) {
|
|
2092
2092
|
return e || (e = $Writer.create()), t.type != null && Object.hasOwnProperty.call(t, "type") && e.uint32(
|
|
2093
2093
|
/* id 1, wireType 0 =*/
|
|
2094
2094
|
8
|
|
@@ -2114,9 +2114,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
2114
2114
|
/* id 8, wireType 0 =*/
|
|
2115
2115
|
64
|
|
2116
2116
|
).int64(t.updateTime), e;
|
|
2117
|
-
},
|
|
2117
|
+
}, n.encodeDelimited = function(t, e) {
|
|
2118
2118
|
return this.encode(t, e).ldelim();
|
|
2119
|
-
},
|
|
2119
|
+
}, n.decode = function(t, e, s) {
|
|
2120
2120
|
t instanceof $Reader || (t = $Reader.create(t));
|
|
2121
2121
|
let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.VideoInfo();
|
|
2122
2122
|
for (; t.pos < l; ) {
|
|
@@ -2161,9 +2161,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
2161
2161
|
}
|
|
2162
2162
|
}
|
|
2163
2163
|
return c;
|
|
2164
|
-
},
|
|
2164
|
+
}, n.decodeDelimited = function(t) {
|
|
2165
2165
|
return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
|
|
2166
|
-
},
|
|
2166
|
+
}, n.verify = function(t) {
|
|
2167
2167
|
if (typeof t != "object" || t === null) return "object expected";
|
|
2168
2168
|
if (t.type != null && t.hasOwnProperty("type"))
|
|
2169
2169
|
switch (t.type) {
|
|
@@ -2174,7 +2174,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
2174
2174
|
break;
|
|
2175
2175
|
}
|
|
2176
2176
|
return t.isEnable != null && t.hasOwnProperty("isEnable") && typeof t.isEnable != "boolean" ? "isEnable: boolean expected" : t.isMute != null && t.hasOwnProperty("isMute") && typeof t.isMute != "boolean" ? "isMute: boolean expected" : t.width != null && t.hasOwnProperty("width") && !$util.isInteger(t.width) ? "width: integer expected" : t.height != null && t.hasOwnProperty("height") && !$util.isInteger(t.height) ? "height: integer expected" : t.x != null && t.hasOwnProperty("x") && !$util.isInteger(t.x) ? "x: integer expected" : t.y != null && t.hasOwnProperty("y") && !$util.isInteger(t.y) ? "y: integer expected" : t.updateTime != null && t.hasOwnProperty("updateTime") && !$util.isInteger(t.updateTime) && !(t.updateTime && $util.isInteger(t.updateTime.low) && $util.isInteger(t.updateTime.high)) ? "updateTime: integer|Long expected" : null;
|
|
2177
|
-
},
|
|
2177
|
+
}, n.fromObject = function(t) {
|
|
2178
2178
|
if (t instanceof $root.com.quick.voice.proto.VideoInfo) return t;
|
|
2179
2179
|
let e = new $root.com.quick.voice.proto.VideoInfo();
|
|
2180
2180
|
switch (t.type) {
|
|
@@ -2194,27 +2194,27 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
2194
2194
|
break;
|
|
2195
2195
|
}
|
|
2196
2196
|
return t.isEnable != null && (e.isEnable = !!t.isEnable), t.isMute != null && (e.isMute = !!t.isMute), t.width != null && (e.width = t.width | 0), t.height != null && (e.height = t.height | 0), t.x != null && (e.x = t.x | 0), t.y != null && (e.y = t.y | 0), t.updateTime != null && ($util.Long ? (e.updateTime = $util.Long.fromValue(t.updateTime)).unsigned = !1 : typeof t.updateTime == "string" ? e.updateTime = parseInt(t.updateTime, 10) : typeof t.updateTime == "number" ? e.updateTime = t.updateTime : typeof t.updateTime == "object" && (e.updateTime = new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber())), e;
|
|
2197
|
-
},
|
|
2197
|
+
}, n.toObject = function(t, e) {
|
|
2198
2198
|
e || (e = {});
|
|
2199
2199
|
let s = {};
|
|
2200
2200
|
return e.defaults && (s.type = e.enums === String ? "Camera" : 0, s.isEnable = !1, s.isMute = !1, s.width = 0, s.height = 0, s.x = 0, s.y = 0), t.type != null && t.hasOwnProperty("type") && (s.type = e.enums === String ? $root.com.quick.voice.proto.VideoType[t.type] === void 0 ? t.type : $root.com.quick.voice.proto.VideoType[t.type] : t.type), t.isEnable != null && t.hasOwnProperty("isEnable") && (s.isEnable = t.isEnable), t.isMute != null && t.hasOwnProperty("isMute") && (s.isMute = t.isMute), t.width != null && t.hasOwnProperty("width") && (s.width = t.width), t.height != null && t.hasOwnProperty("height") && (s.height = t.height), t.x != null && t.hasOwnProperty("x") && (s.x = t.x), t.y != null && t.hasOwnProperty("y") && (s.y = t.y), t.updateTime != null && t.hasOwnProperty("updateTime") && (typeof t.updateTime == "number" ? s.updateTime = e.longs === String ? String(t.updateTime) : t.updateTime : s.updateTime = e.longs === String ? $util.Long.prototype.toString.call(t.updateTime) : e.longs === Number ? new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber() : t.updateTime, e.oneofs && (s._updateTime = "updateTime")), s;
|
|
2201
|
-
},
|
|
2201
|
+
}, n.prototype.toJSON = function() {
|
|
2202
2202
|
return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
|
|
2203
|
-
},
|
|
2203
|
+
}, n.getTypeUrl = function(t) {
|
|
2204
2204
|
return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.VideoInfo";
|
|
2205
|
-
},
|
|
2205
|
+
}, n;
|
|
2206
2206
|
}(), u.CustomInfo = function() {
|
|
2207
|
-
function
|
|
2207
|
+
function n(i) {
|
|
2208
2208
|
if (this.customKeyMap = {}, i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
|
|
2209
2209
|
}
|
|
2210
|
-
|
|
2211
|
-
let
|
|
2212
|
-
return Object.defineProperty(
|
|
2213
|
-
get: $util.oneOfGetter(
|
|
2214
|
-
set: $util.oneOfSetter(
|
|
2215
|
-
}),
|
|
2216
|
-
return new
|
|
2217
|
-
},
|
|
2210
|
+
n.prototype.roomId = "", n.prototype.customKeyMap = $util.emptyObject, n.prototype.updateTime = null;
|
|
2211
|
+
let r;
|
|
2212
|
+
return Object.defineProperty(n.prototype, "_updateTime", {
|
|
2213
|
+
get: $util.oneOfGetter(r = ["updateTime"]),
|
|
2214
|
+
set: $util.oneOfSetter(r)
|
|
2215
|
+
}), n.create = function(t) {
|
|
2216
|
+
return new n(t);
|
|
2217
|
+
}, n.encode = function(t, e) {
|
|
2218
2218
|
if (e || (e = $Writer.create()), t.roomId != null && Object.hasOwnProperty.call(t, "roomId") && e.uint32(
|
|
2219
2219
|
/* id 1, wireType 2 =*/
|
|
2220
2220
|
10
|
|
@@ -2232,9 +2232,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
2232
2232
|
/* id 3, wireType 0 =*/
|
|
2233
2233
|
24
|
|
2234
2234
|
).int64(t.updateTime), e;
|
|
2235
|
-
},
|
|
2235
|
+
}, n.encodeDelimited = function(t, e) {
|
|
2236
2236
|
return this.encode(t, e).ldelim();
|
|
2237
|
-
},
|
|
2237
|
+
}, n.decode = function(t, e, s) {
|
|
2238
2238
|
t instanceof $Reader || (t = $Reader.create(t));
|
|
2239
2239
|
let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.CustomInfo(), d, p;
|
|
2240
2240
|
for (; t.pos < l; ) {
|
|
@@ -2275,9 +2275,9 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
2275
2275
|
}
|
|
2276
2276
|
}
|
|
2277
2277
|
return c;
|
|
2278
|
-
},
|
|
2278
|
+
}, n.decodeDelimited = function(t) {
|
|
2279
2279
|
return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
|
|
2280
|
-
},
|
|
2280
|
+
}, n.verify = function(t) {
|
|
2281
2281
|
if (typeof t != "object" || t === null) return "object expected";
|
|
2282
2282
|
if (t.roomId != null && t.hasOwnProperty("roomId") && !$util.isString(t.roomId)) return "roomId: string expected";
|
|
2283
2283
|
if (t.customKeyMap != null && t.hasOwnProperty("customKeyMap")) {
|
|
@@ -2286,7 +2286,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
2286
2286
|
for (let s = 0; s < e.length; ++s) if (!$util.isString(t.customKeyMap[e[s]])) return "customKeyMap: string{k:string} expected";
|
|
2287
2287
|
}
|
|
2288
2288
|
return t.updateTime != null && t.hasOwnProperty("updateTime") && !$util.isInteger(t.updateTime) && !(t.updateTime && $util.isInteger(t.updateTime.low) && $util.isInteger(t.updateTime.high)) ? "updateTime: integer|Long expected" : null;
|
|
2289
|
-
},
|
|
2289
|
+
}, n.fromObject = function(t) {
|
|
2290
2290
|
if (t instanceof $root.com.quick.voice.proto.CustomInfo) return t;
|
|
2291
2291
|
let e = new $root.com.quick.voice.proto.CustomInfo();
|
|
2292
2292
|
if (t.roomId != null && (e.roomId = String(t.roomId)), t.customKeyMap) {
|
|
@@ -2295,7 +2295,7 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
2295
2295
|
for (let s = Object.keys(t.customKeyMap), l = 0; l < s.length; ++l) e.customKeyMap[s[l]] = String(t.customKeyMap[s[l]]);
|
|
2296
2296
|
}
|
|
2297
2297
|
return t.updateTime != null && ($util.Long ? (e.updateTime = $util.Long.fromValue(t.updateTime)).unsigned = !1 : typeof t.updateTime == "string" ? e.updateTime = parseInt(t.updateTime, 10) : typeof t.updateTime == "number" ? e.updateTime = t.updateTime : typeof t.updateTime == "object" && (e.updateTime = new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber())), e;
|
|
2298
|
-
},
|
|
2298
|
+
}, n.toObject = function(t, e) {
|
|
2299
2299
|
e || (e = {});
|
|
2300
2300
|
let s = {};
|
|
2301
2301
|
(e.objects || e.defaults) && (s.customKeyMap = {}), e.defaults && (s.roomId = ""), t.roomId != null && t.hasOwnProperty("roomId") && (s.roomId = t.roomId);
|
|
@@ -2305,20 +2305,20 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
|
|
|
2305
2305
|
for (let c = 0; c < l.length; ++c) s.customKeyMap[l[c]] = t.customKeyMap[l[c]];
|
|
2306
2306
|
}
|
|
2307
2307
|
return t.updateTime != null && t.hasOwnProperty("updateTime") && (typeof t.updateTime == "number" ? s.updateTime = e.longs === String ? String(t.updateTime) : t.updateTime : s.updateTime = e.longs === String ? $util.Long.prototype.toString.call(t.updateTime) : e.longs === Number ? new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber() : t.updateTime, e.oneofs && (s._updateTime = "updateTime")), s;
|
|
2308
|
-
},
|
|
2308
|
+
}, n.prototype.toJSON = function() {
|
|
2309
2309
|
return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
|
|
2310
|
-
},
|
|
2310
|
+
}, n.getTypeUrl = function(t) {
|
|
2311
2311
|
return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.CustomInfo";
|
|
2312
|
-
},
|
|
2312
|
+
}, n;
|
|
2313
2313
|
}(), u.LayoutType = function() {
|
|
2314
|
-
const
|
|
2315
|
-
return n[
|
|
2314
|
+
const n = {}, r = Object.create(n);
|
|
2315
|
+
return r[n[0] = "AudioAndVideo"] = 0, r[n[1] = "OnlyAudio"] = 1, r[n[2] = "OnlyVideo"] = 2, r;
|
|
2316
2316
|
}(), u.AudioType = function() {
|
|
2317
|
-
const
|
|
2318
|
-
return n[
|
|
2317
|
+
const n = {}, r = Object.create(n);
|
|
2318
|
+
return r[n[0] = "Microphone"] = 0, r[n[1] = "SystemVoice"] = 1, r;
|
|
2319
2319
|
}(), u.VideoType = function() {
|
|
2320
|
-
const
|
|
2321
|
-
return n[
|
|
2320
|
+
const n = {}, r = Object.create(n);
|
|
2321
|
+
return r[n[0] = "Camera"] = 0, r[n[1] = "Screen"] = 1, r;
|
|
2322
2322
|
}(), u;
|
|
2323
2323
|
}(), a;
|
|
2324
2324
|
}(), o;
|
|
@@ -2357,9 +2357,9 @@ class RoomUser {
|
|
|
2357
2357
|
});
|
|
2358
2358
|
m(this, "init", (o) => {
|
|
2359
2359
|
var t, e, s, l;
|
|
2360
|
-
const { id: a, audios: u = [], videos:
|
|
2360
|
+
const { id: a, audios: u = [], videos: n = [] } = o;
|
|
2361
2361
|
this.userId = a;
|
|
2362
|
-
const
|
|
2362
|
+
const r = this.getUpdateTimeKey();
|
|
2363
2363
|
this.mc_audio && (this.mc_audio.remove = !0), this.mc_video && (this.mc_video.remove = !0), this.ss_audio && (this.ss_audio.remove = !0), this.ss_video && (this.ss_video.remove = !0);
|
|
2364
2364
|
for (const c of u) {
|
|
2365
2365
|
const { type: d = 0, isEnable: p = !1, isMute: f = !1, updateTime: w, volume: b = 0 } = c;
|
|
@@ -2378,7 +2378,7 @@ class RoomUser {
|
|
|
2378
2378
|
break;
|
|
2379
2379
|
}
|
|
2380
2380
|
}
|
|
2381
|
-
for (const c of
|
|
2381
|
+
for (const c of n) {
|
|
2382
2382
|
const { type: d = 0, isEnable: p, isMute: f, updateTime: w, width: b, height: g, x: k, y: T } = c;
|
|
2383
2383
|
switch (d) {
|
|
2384
2384
|
case 0:
|
|
@@ -2397,7 +2397,7 @@ class RoomUser {
|
|
|
2397
2397
|
}
|
|
2398
2398
|
(t = this.mc_audio) != null && t.remove && (this.mc_audio = void 0), (e = this.mc_video) != null && e.remove && (this.mc_video = void 0), (s = this.ss_audio) != null && s.remove && (this.ss_audio = void 0), (l = this.ss_video) != null && l.remove && (this.ss_video = void 0);
|
|
2399
2399
|
const i = this.getUpdateTimeKey();
|
|
2400
|
-
|
|
2400
|
+
r !== i && (this.updateTime = (/* @__PURE__ */ new Date()).getTime());
|
|
2401
2401
|
});
|
|
2402
2402
|
m(this, "destroy", () => {
|
|
2403
2403
|
var o, a;
|
|
@@ -2408,16 +2408,16 @@ class RoomUser {
|
|
|
2408
2408
|
const parseSEI = (h) => {
|
|
2409
2409
|
let o = 0, a = 0;
|
|
2410
2410
|
for (; ; ) {
|
|
2411
|
-
const
|
|
2412
|
-
if (a = a +
|
|
2411
|
+
const n = h[o];
|
|
2412
|
+
if (a = a + n, o = o + 1, n !== 255) break;
|
|
2413
2413
|
}
|
|
2414
2414
|
let u = 0;
|
|
2415
2415
|
for (; ; ) {
|
|
2416
|
-
const
|
|
2417
|
-
if (u = u +
|
|
2416
|
+
const n = h[o];
|
|
2417
|
+
if (u = u + n, o = o + 1, n !== 255) break;
|
|
2418
2418
|
}
|
|
2419
2419
|
if (a === 5) {
|
|
2420
|
-
const
|
|
2420
|
+
const n = h.slice(o, o + 16), i = Array.from(n, (f) => f.toString(16).padStart(2, "0")).join("");
|
|
2421
2421
|
o = o + 16;
|
|
2422
2422
|
const t = u - 16, e = h.slice(o, o + t), s = com.quick.voice.proto.SeiData.decode(e), { event: l = 0 } = s, c = s.data;
|
|
2423
2423
|
let d;
|
|
@@ -2467,44 +2467,44 @@ class QuickVoPlayer {
|
|
|
2467
2467
|
return Array.from(o, (u) => u.updateTime).join("_");
|
|
2468
2468
|
});
|
|
2469
2469
|
m(this, "checkAndCreateUser", (o, a) => {
|
|
2470
|
-
var u,
|
|
2470
|
+
var u, n;
|
|
2471
2471
|
if (this.usersMap.has(o)) {
|
|
2472
|
-
const
|
|
2473
|
-
if (
|
|
2474
|
-
const { sx: i, sy: t, sw: e, sh: s } =
|
|
2475
|
-
(u =
|
|
2472
|
+
const r = this.usersMap.get(o);
|
|
2473
|
+
if (r == null || r.init(a), r != null && r.mc_video) {
|
|
2474
|
+
const { sx: i, sy: t, sw: e, sh: s } = r.mc_video;
|
|
2475
|
+
(u = r == null ? void 0 : r.mc_video.worker) == null || u.setCut({ sx: i, sy: t, sw: e, sh: s });
|
|
2476
2476
|
}
|
|
2477
|
-
if (
|
|
2478
|
-
const { sx: i, sy: t, sw: e, sh: s } =
|
|
2479
|
-
(
|
|
2477
|
+
if (r != null && r.ss_video) {
|
|
2478
|
+
const { sx: i, sy: t, sw: e, sh: s } = r.ss_video;
|
|
2479
|
+
(n = r == null ? void 0 : r.ss_video.worker) == null || n.setCut({ sx: i, sy: t, sw: e, sh: s });
|
|
2480
2480
|
}
|
|
2481
2481
|
} else {
|
|
2482
|
-
const
|
|
2483
|
-
if (this.usersMap.set(o,
|
|
2484
|
-
if (
|
|
2485
|
-
const { sx: i, sy: t, sw: e, sh: s } =
|
|
2486
|
-
|
|
2487
|
-
p(), this.prPlayer.cut.remove(l), this.usersMap.delete(
|
|
2482
|
+
const r = new RoomUser();
|
|
2483
|
+
if (this.usersMap.set(o, r), r.init(a), r) {
|
|
2484
|
+
if (r.mc_video) {
|
|
2485
|
+
const { sx: i, sy: t, sw: e, sh: s } = r.mc_video, l = `${r.userId}_mc_video`, { worker: c, stream: d, destroy: p } = this.prPlayer.cut.create(l, { sx: i, sy: t, sw: e, sh: s });
|
|
2486
|
+
r.mc_video.worker = c, this.displayMode === "original" && c.setPause(!0), r.mc_video.stream = d, r.mc_video.destroy = () => {
|
|
2487
|
+
p(), this.prPlayer.cut.remove(l), this.usersMap.delete(r.userId);
|
|
2488
2488
|
};
|
|
2489
2489
|
}
|
|
2490
|
-
if (
|
|
2491
|
-
const { sx: i, sy: t, sw: e, sh: s } =
|
|
2492
|
-
|
|
2493
|
-
p(), this.prPlayer.cut.remove(l), this.usersMap.delete(
|
|
2490
|
+
if (r.ss_video) {
|
|
2491
|
+
const { sx: i, sy: t, sw: e, sh: s } = r.ss_video, l = `${r.userId}_ss_video`, { worker: c, stream: d, destroy: p } = this.prPlayer.cut.create(l, { sx: i, sy: t, sw: e, sh: s });
|
|
2492
|
+
r.ss_video.worker = c, this.displayMode === "original" && c.setPause(!0), r.ss_video.stream = d, r.ss_video.destroy = () => {
|
|
2493
|
+
p(), this.prPlayer.cut.remove(l), this.usersMap.delete(r.userId);
|
|
2494
2494
|
};
|
|
2495
2495
|
}
|
|
2496
2496
|
}
|
|
2497
2497
|
}
|
|
2498
2498
|
});
|
|
2499
2499
|
m(this, "setDisplayMode", (o) => {
|
|
2500
|
-
var a, u,
|
|
2500
|
+
var a, u, n, r, i, t, e, s;
|
|
2501
2501
|
switch (this.displayMode = o, o) {
|
|
2502
2502
|
case "original":
|
|
2503
2503
|
{
|
|
2504
2504
|
this.prPlayer.setPause(!1);
|
|
2505
2505
|
const l = [...this.usersMap.values()];
|
|
2506
2506
|
for (const c of l)
|
|
2507
|
-
(u = (a = c.mc_video) == null ? void 0 : a.worker) == null || u.setPause(!0), (
|
|
2507
|
+
(u = (a = c.mc_video) == null ? void 0 : a.worker) == null || u.setPause(!0), (r = (n = c.ss_video) == null ? void 0 : n.worker) == null || r.setPause(!0);
|
|
2508
2508
|
}
|
|
2509
2509
|
break;
|
|
2510
2510
|
case "cut":
|
|
@@ -2524,12 +2524,12 @@ class QuickVoPlayer {
|
|
|
2524
2524
|
try {
|
|
2525
2525
|
const a = parseSEI(o);
|
|
2526
2526
|
if (!a) return;
|
|
2527
|
-
const { event: u, data:
|
|
2527
|
+
const { event: u, data: n } = a;
|
|
2528
2528
|
switch (u) {
|
|
2529
2529
|
case 0:
|
|
2530
2530
|
{
|
|
2531
|
-
const { roomId:
|
|
2532
|
-
if (
|
|
2531
|
+
const { roomId: r, userMap: i } = n;
|
|
2532
|
+
if (r !== this.room.roomId) return;
|
|
2533
2533
|
const t = this.getAllUseUpdateKey(), e = Object.keys(i);
|
|
2534
2534
|
{
|
|
2535
2535
|
const l = [...this.usersMap.values()];
|
|
@@ -2549,8 +2549,8 @@ class QuickVoPlayer {
|
|
|
2549
2549
|
break;
|
|
2550
2550
|
case 1:
|
|
2551
2551
|
{
|
|
2552
|
-
const { roomId:
|
|
2553
|
-
this.room.roomId =
|
|
2552
|
+
const { roomId: r, updateTime: i } = n, { author: t, version: e } = n.customKeyMap;
|
|
2553
|
+
this.room.roomId = r, this.room.updateTime = i, this.room.author = t, this.room.version = e;
|
|
2554
2554
|
}
|
|
2555
2555
|
break;
|
|
2556
2556
|
}
|