@vapi-ai/web 1.0.86 → 1.0.87

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
@@ -13,5 +13,5 @@ export declare class ContinuousPlayer extends EventEmitter {
13
13
  private removeBuffer;
14
14
  private resetTimestampOffset;
15
15
  private abortBuffer;
16
- clear(): Promise<void>;
16
+ clear(): void;
17
17
  }
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
  };
@@ -84,11 +75,9 @@ class ContinuousPlayer extends events_1.default {
84
75
  });
85
76
  }
86
77
  clear() {
87
- return __awaiter(this, void 0, void 0, function* () {
88
- yield this.removeBuffer();
89
- yield this.abortBuffer();
90
- yield this.resetTimestampOffset();
91
- });
78
+ this.operationsQueue.push(() => this.abortBuffer());
79
+ this.operationsQueue.push(() => this.removeBuffer());
80
+ this.operationsQueue.push(() => this.resetTimestampOffset());
92
81
  }
93
82
  }
94
83
  exports.ContinuousPlayer = ContinuousPlayer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vapi-ai/web",
3
- "version": "1.0.86",
3
+ "version": "1.0.87",
4
4
  "description": "",
5
5
  "main": "dist/vapi.js",
6
6
  "types": "dist/vapi.d.ts",
package/player.ts CHANGED
@@ -88,9 +88,9 @@ export class ContinuousPlayer extends EventEmitter {
88
88
  });
89
89
  }
90
90
 
91
- async clear() {
92
- await this.removeBuffer();
93
- await this.abortBuffer();
94
- await this.resetTimestampOffset();
91
+ clear() {
92
+ this.operationsQueue.push(() => this.abortBuffer());
93
+ this.operationsQueue.push(() => this.removeBuffer());
94
+ this.operationsQueue.push(() => this.resetTimestampOffset());
95
95
  }
96
96
  }