@vapi-ai/web 1.0.96 → 1.0.98
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 +0 -1
- package/dist/player.js +5 -20
- package/package.json +1 -1
- package/player.ts +4 -7
package/dist/player.d.ts
CHANGED
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,20 +77,14 @@ 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.
|
|
101
|
-
this.operationsQueue.push(() => this.
|
|
102
|
-
this.operationsQueue.push(() => this.resetTimestampOffset());
|
|
86
|
+
// this.operationsQueue.push(() => this.removeBuffer());
|
|
87
|
+
// this.operationsQueue.push(() => this.resetTimestampOffset());
|
|
103
88
|
}
|
|
104
89
|
}
|
|
105
90
|
exports.ContinuousPlayer = ContinuousPlayer;
|
package/package.json
CHANGED
package/player.ts
CHANGED
|
@@ -100,17 +100,14 @@ export class ContinuousPlayer extends EventEmitter {
|
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
|
|
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
|
-
|
|
113
|
-
this.operationsQueue.push(() => this.removeBuffer());
|
|
114
|
-
this.operationsQueue.push(() => this.resetTimestampOffset());
|
|
109
|
+
|
|
110
|
+
// this.operationsQueue.push(() => this.removeBuffer());
|
|
111
|
+
// this.operationsQueue.push(() => this.resetTimestampOffset());
|
|
115
112
|
}
|
|
116
113
|
}
|