@vapi-ai/web 1.0.197 → 1.0.199
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/vapi.js +5 -5
- package/package.json +1 -1
- package/vapi.ts +5 -5
package/dist/vapi.js
CHANGED
|
@@ -38,12 +38,12 @@ function buildAudioPlayer(track, participantId) {
|
|
|
38
38
|
return player;
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
function subscribeToTracks(
|
|
42
|
-
console.log(
|
|
43
|
-
if (
|
|
41
|
+
function subscribeToTracks(e, call) {
|
|
42
|
+
console.log(e);
|
|
43
|
+
if (e.participant.user_id === "local") {
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
call.updateParticipant(
|
|
46
|
+
call.updateParticipant(e.participant.session_id, {
|
|
47
47
|
setSubscribedTracks: {
|
|
48
48
|
audio: true,
|
|
49
49
|
video: false,
|
|
@@ -103,7 +103,7 @@ class Vapi extends events_1.default {
|
|
|
103
103
|
this.call.on("participant-joined", (e) => {
|
|
104
104
|
if (!e || !this.call)
|
|
105
105
|
return;
|
|
106
|
-
subscribeToTracks(e
|
|
106
|
+
subscribeToTracks(e, this.call);
|
|
107
107
|
});
|
|
108
108
|
yield this.call.join({ url, subscribeToTracksAutomatically: false });
|
|
109
109
|
this.call.startRemoteParticipantsAudioLevelObserver();
|
package/package.json
CHANGED
package/vapi.ts
CHANGED
|
@@ -30,12 +30,12 @@ async function buildAudioPlayer(track: any, participantId: string) {
|
|
|
30
30
|
await startPlayer(player, track);
|
|
31
31
|
return player;
|
|
32
32
|
}
|
|
33
|
-
function subscribeToTracks(
|
|
34
|
-
console.log(
|
|
35
|
-
if (
|
|
33
|
+
function subscribeToTracks(e: DailyEventObjectParticipant, call: DailyCall) {
|
|
34
|
+
console.log(e);
|
|
35
|
+
if (e.participant.user_id === "local") {
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
call.updateParticipant(
|
|
38
|
+
call.updateParticipant(e.participant.session_id, {
|
|
39
39
|
setSubscribedTracks: {
|
|
40
40
|
audio: true,
|
|
41
41
|
video: false,
|
|
@@ -101,7 +101,7 @@ export default class Vapi extends EventEmitter {
|
|
|
101
101
|
|
|
102
102
|
this.call.on("participant-joined", (e) => {
|
|
103
103
|
if (!e || !this.call) return;
|
|
104
|
-
subscribeToTracks(e
|
|
104
|
+
subscribeToTracks(e, this.call);
|
|
105
105
|
});
|
|
106
106
|
|
|
107
107
|
await this.call.join({ url, subscribeToTracksAutomatically: false });
|