@vapi-ai/web 1.0.96 → 1.0.97

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.d.ts CHANGED
@@ -14,6 +14,5 @@ export declare class ContinuousPlayer extends EventEmitter {
14
14
  private appendNextChunk;
15
15
  private removeBuffer;
16
16
  private resetTimestampOffset;
17
- private abortBuffer;
18
17
  clear(): void;
19
18
  }
package/dist/player.js CHANGED
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
@@ -86,18 +77,12 @@ class ContinuousPlayer extends events_1.default {
86
77
  this.sourceBuffer.timestampOffset = 0;
87
78
  });
88
79
  }
89
- abortBuffer() {
90
- return __awaiter(this, void 0, void 0, function* () {
91
- if (!this.sourceBuffer)
92
- return;
93
- // This does not emit updateend
94
- this.sourceBuffer.abort();
95
- });
96
- }
97
80
  clear() {
81
+ if (!this.sourceBuffer)
82
+ return;
83
+ this.sourceBuffer.abort();
98
84
  this.operationsQueue.kill();
99
85
  this.operationsQueue = this.createOperationQueue();
100
- this.operationsQueue.push(() => this.abortBuffer());
101
86
  this.operationsQueue.push(() => this.removeBuffer());
102
87
  this.operationsQueue.push(() => this.resetTimestampOffset());
103
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vapi-ai/web",
3
- "version": "1.0.96",
3
+ "version": "1.0.97",
4
4
  "description": "",
5
5
  "main": "dist/vapi.js",
6
6
  "types": "dist/vapi.d.ts",
package/player.ts CHANGED
@@ -100,16 +100,13 @@ export class ContinuousPlayer extends EventEmitter {
100
100
  });
101
101
  }
102
102
 
103
- private async abortBuffer() {
103
+ clear() {
104
104
  if (!this.sourceBuffer) return;
105
- // This does not emit updateend
106
105
  this.sourceBuffer.abort();
107
- }
108
106
 
109
- clear() {
110
107
  this.operationsQueue.kill();
111
108
  this.operationsQueue = this.createOperationQueue();
112
- this.operationsQueue.push(() => this.abortBuffer());
109
+
113
110
  this.operationsQueue.push(() => this.removeBuffer());
114
111
  this.operationsQueue.push(() => this.resetTimestampOffset());
115
112
  }