@vapi-ai/web 1.0.67 → 1.0.69
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/player.js +3 -1
- package/package.json +1 -1
- package/player.ts +5 -1
package/dist/player.js
CHANGED
|
@@ -24,7 +24,6 @@ class ContinuousPlayer extends events_1.default {
|
|
|
24
24
|
this.sourceBuffer.addEventListener("updateend", () => {
|
|
25
25
|
this.checkForGaps();
|
|
26
26
|
this.audioQueue.resume();
|
|
27
|
-
console.log("RESUMING");
|
|
28
27
|
});
|
|
29
28
|
});
|
|
30
29
|
}
|
|
@@ -42,6 +41,9 @@ class ContinuousPlayer extends events_1.default {
|
|
|
42
41
|
callback();
|
|
43
42
|
}
|
|
44
43
|
checkForGaps() {
|
|
44
|
+
if (this.sourceBuffer && this.sourceBuffer.buffered.length > 0) {
|
|
45
|
+
console.log(this.sourceBuffer.buffered.end(this.sourceBuffer.buffered.length - 1));
|
|
46
|
+
}
|
|
45
47
|
if (this.sourceBuffer) {
|
|
46
48
|
for (let i = 0; i < this.sourceBuffer.buffered.length; i++) {
|
|
47
49
|
// Start and end times of the buffered range
|
package/package.json
CHANGED
package/player.ts
CHANGED
|
@@ -30,7 +30,6 @@ export class ContinuousPlayer extends EventEmitter {
|
|
|
30
30
|
this.sourceBuffer.addEventListener("updateend", () => {
|
|
31
31
|
this.checkForGaps();
|
|
32
32
|
this.audioQueue.resume();
|
|
33
|
-
console.log("RESUMING");
|
|
34
33
|
});
|
|
35
34
|
});
|
|
36
35
|
}
|
|
@@ -55,6 +54,11 @@ export class ContinuousPlayer extends EventEmitter {
|
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
private checkForGaps(): void {
|
|
57
|
+
if (this.sourceBuffer && this.sourceBuffer.buffered.length > 0) {
|
|
58
|
+
console.log(
|
|
59
|
+
this.sourceBuffer.buffered.end(this.sourceBuffer.buffered.length - 1)
|
|
60
|
+
);
|
|
61
|
+
}
|
|
58
62
|
if (this.sourceBuffer) {
|
|
59
63
|
for (let i = 0; i < this.sourceBuffer.buffered.length; i++) {
|
|
60
64
|
// Start and end times of the buffered range
|