@testgorilla/tgo-ai-interview-test 2.0.0 → 2.0.2
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/fesm2022/testgorilla-tgo-ai-interview-test.mjs +478 -0
- package/fesm2022/testgorilla-tgo-ai-interview-test.mjs.map +1 -0
- package/lib/components/ai-interview-test/ai-interview-test.component.d.ts +44 -0
- package/lib/components/interview-stream/interview-stream.component.d.ts +46 -0
- package/lib/components/interview-video/interview-video.component.d.ts +16 -0
- package/lib/models/index.d.ts +3 -0
- package/lib/models/question-component.d.ts +5 -0
- package/lib/models/translations.d.ts +1 -0
- package/package.json +29 -12
- package/.eslintrc.json +0 -46
- package/jest.config.ts +0 -29
- package/ng-package.json +0 -16
- package/project.json +0 -48
- package/src/lib/components/ai-interview-test/ai-interview-test.component.html +0 -42
- package/src/lib/components/ai-interview-test/ai-interview-test.component.scss +0 -167
- package/src/lib/components/ai-interview-test/ai-interview-test.component.spec.ts +0 -212
- package/src/lib/components/ai-interview-test/ai-interview-test.component.ts +0 -192
- package/src/lib/components/interview-stream/interview-stream.component.html +0 -9
- package/src/lib/components/interview-stream/interview-stream.component.scss +0 -5
- package/src/lib/components/interview-stream/interview-stream.component.spec.ts +0 -259
- package/src/lib/components/interview-stream/interview-stream.component.ts +0 -320
- package/src/lib/components/interview-video/interview-video.component.html +0 -8
- package/src/lib/components/interview-video/interview-video.component.scss +0 -7
- package/src/lib/components/interview-video/interview-video.component.spec.ts +0 -140
- package/src/lib/components/interview-video/interview-video.component.ts +0 -67
- package/src/lib/models/index.ts +0 -13
- package/src/lib/models/question-component.ts +0 -13
- package/src/lib/models/translations.ts +0 -3
- package/src/test-setup.ts +0 -76
- package/tsconfig.json +0 -20
- package/tsconfig.lib.json +0 -20
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -17
- /package/{src/assets → assets}/i18n/en.json +0 -0
- /package/{src/index.ts → index.d.ts} +0 -0
- /package/{src/lib/components/index.ts → lib/components/index.d.ts} +0 -0
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Input, Component, EventEmitter, signal, inject, ChangeDetectorRef, Output, ViewChild, Inject } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import DailyIframe from '@daily-co/daily-js';
|
|
6
|
+
import { Subject, firstValueFrom, takeUntil } from 'rxjs';
|
|
7
|
+
import { trigger, transition, style, animate } from '@angular/animations';
|
|
8
|
+
import * as i1 from '@testgorilla/tgo-ui';
|
|
9
|
+
import { ButtonComponentModule, IconComponentModule, DialogService } from '@testgorilla/tgo-ui';
|
|
10
|
+
import { TranslocoService, TRANSLOCO_SCOPE, TranslocoModule } from '@ngneat/transloco';
|
|
11
|
+
import { MediaService, ThemeService, AudioAnimationComponent, TranslocoLazyModuleUtils, getAvailableLangs, ROOT_TRANSLATIONS_SCOPE } from '@testgorilla/tgo-shared-lib';
|
|
12
|
+
export { ROOT_TRANSLATIONS_SCOPE } from '@testgorilla/tgo-shared-lib';
|
|
13
|
+
|
|
14
|
+
class InterviewVideoComponent {
|
|
15
|
+
videoTrack;
|
|
16
|
+
audioTrack;
|
|
17
|
+
videoStream;
|
|
18
|
+
audioStream;
|
|
19
|
+
ngOnInit() {
|
|
20
|
+
if (this.videoTrack) {
|
|
21
|
+
this.addVideoStream(this.videoTrack);
|
|
22
|
+
}
|
|
23
|
+
if (this.audioTrack) {
|
|
24
|
+
this.addAudioStream(this.audioTrack);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
ngOnChanges(changes) {
|
|
28
|
+
const { videoTrack, audioTrack } = changes;
|
|
29
|
+
if (videoTrack?.currentValue && !this.videoStream) {
|
|
30
|
+
this.addVideoStream(videoTrack.currentValue);
|
|
31
|
+
}
|
|
32
|
+
if (audioTrack?.currentValue && !this.audioStream) {
|
|
33
|
+
this.addAudioStream(audioTrack.currentValue);
|
|
34
|
+
}
|
|
35
|
+
if (videoTrack?.currentValue && this.videoStream) {
|
|
36
|
+
this.updateVideoTrack(videoTrack.previousValue, videoTrack.currentValue);
|
|
37
|
+
}
|
|
38
|
+
if (audioTrack?.currentValue && this.audioStream) {
|
|
39
|
+
this.updateAudioTrack(audioTrack.previousValue, audioTrack.currentValue);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
addVideoStream(track) {
|
|
43
|
+
this.videoStream = new MediaStream([track]);
|
|
44
|
+
}
|
|
45
|
+
addAudioStream(track) {
|
|
46
|
+
this.audioStream = new MediaStream([track]);
|
|
47
|
+
}
|
|
48
|
+
updateVideoTrack(oldTrack, track) {
|
|
49
|
+
if (oldTrack) {
|
|
50
|
+
this.videoStream?.removeTrack(oldTrack);
|
|
51
|
+
}
|
|
52
|
+
this.videoStream?.addTrack(track);
|
|
53
|
+
}
|
|
54
|
+
updateAudioTrack(oldTrack, track) {
|
|
55
|
+
if (oldTrack) {
|
|
56
|
+
this.audioStream?.removeTrack(oldTrack);
|
|
57
|
+
}
|
|
58
|
+
this.audioStream?.addTrack(track);
|
|
59
|
+
}
|
|
60
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: InterviewVideoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
61
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: InterviewVideoComponent, isStandalone: true, selector: "tgo-interview-video", inputs: { videoTrack: "videoTrack", audioTrack: "audioTrack" }, usesOnChanges: true, ngImport: i0, template: "@if (videoStream) {\n<video autoPlay muted playsInline [srcObject]=\"videoStream\"></video>\n} @if (audioStream) {\n<audio autoPlay playsInline [srcObject]=\"audioStream\">\n <track kind=\"captions\" />\n</audio>\n}\n\n", styles: [":host video{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
62
|
+
}
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: InterviewVideoComponent, decorators: [{
|
|
64
|
+
type: Component,
|
|
65
|
+
args: [{ selector: 'tgo-interview-video', imports: [CommonModule], template: "@if (videoStream) {\n<video autoPlay muted playsInline [srcObject]=\"videoStream\"></video>\n} @if (audioStream) {\n<audio autoPlay playsInline [srcObject]=\"audioStream\">\n <track kind=\"captions\" />\n</audio>\n}\n\n", styles: [":host video{width:100%;height:100%}\n"] }]
|
|
66
|
+
}], propDecorators: { videoTrack: [{
|
|
67
|
+
type: Input
|
|
68
|
+
}], audioTrack: [{
|
|
69
|
+
type: Input
|
|
70
|
+
}] } });
|
|
71
|
+
|
|
72
|
+
const PLAYABLE_STATE = 'playable';
|
|
73
|
+
const LOADING_STATE = 'loading';
|
|
74
|
+
class InterviewStreamComponent {
|
|
75
|
+
conversationUrl;
|
|
76
|
+
selectedMediaDevices;
|
|
77
|
+
translations = {};
|
|
78
|
+
streamStart = new EventEmitter();
|
|
79
|
+
streamEnd = new EventEmitter();
|
|
80
|
+
checkMediaPermissions = new EventEmitter();
|
|
81
|
+
callObject;
|
|
82
|
+
avatarParticipant;
|
|
83
|
+
candidateJoined = signal(false);
|
|
84
|
+
cdr = inject(ChangeDetectorRef);
|
|
85
|
+
ngOnInit() {
|
|
86
|
+
void this.setupCall();
|
|
87
|
+
}
|
|
88
|
+
ngOnDestroy() {
|
|
89
|
+
if (!this.callObject)
|
|
90
|
+
return;
|
|
91
|
+
this.leaveCall();
|
|
92
|
+
this.callObject
|
|
93
|
+
.off('joined-meeting', this.candidateJoinMeeting)
|
|
94
|
+
.off('participant-joined', this.participantJoined)
|
|
95
|
+
.off('app-message', this.handleNewMessage)
|
|
96
|
+
.off('track-started', this.handleTrackStartedStopped)
|
|
97
|
+
.off('track-stopped', this.handleTrackStartedStopped)
|
|
98
|
+
.off('participant-left', this.handleParticipantLeft)
|
|
99
|
+
.off('left-meeting', this.handleLeftMeeting)
|
|
100
|
+
.off('error', this.handleError);
|
|
101
|
+
}
|
|
102
|
+
async setupCall() {
|
|
103
|
+
this.callObject = DailyIframe.getCallInstance();
|
|
104
|
+
if (!this.callObject) {
|
|
105
|
+
this.callObject = DailyIframe.createCallObject();
|
|
106
|
+
}
|
|
107
|
+
if (this.selectedMediaDevices) {
|
|
108
|
+
await this.callObject.setInputDevicesAsync({
|
|
109
|
+
videoDeviceId: this.selectedMediaDevices.videoDeviceId,
|
|
110
|
+
audioDeviceId: this.selectedMediaDevices.audioDeviceId,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
this.callObject.startRecording({
|
|
114
|
+
type: 'cloud',
|
|
115
|
+
});
|
|
116
|
+
this.callObject
|
|
117
|
+
.on('joined-meeting', this.candidateJoinMeeting)
|
|
118
|
+
.on('participant-joined', this.participantJoined)
|
|
119
|
+
.on('app-message', this.handleNewMessage)
|
|
120
|
+
.on('track-started', this.handleTrackStartedStopped)
|
|
121
|
+
.on('track-stopped', this.handleTrackStartedStopped)
|
|
122
|
+
.on('participant-left', this.handleParticipantLeft)
|
|
123
|
+
.on('left-meeting', this.handleLeftMeeting)
|
|
124
|
+
.on('error', this.handleError);
|
|
125
|
+
await this.callObject.join({
|
|
126
|
+
userName: 'Candidate',
|
|
127
|
+
url: this.conversationUrl,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
formatParticipantObj(participant) {
|
|
131
|
+
const { video, audio } = participant.tracks;
|
|
132
|
+
const videoTrack = video?.persistentTrack;
|
|
133
|
+
const audioTrack = audio?.persistentTrack;
|
|
134
|
+
return {
|
|
135
|
+
videoTrack: videoTrack,
|
|
136
|
+
audioTrack: audioTrack,
|
|
137
|
+
videoReady: !!(videoTrack &&
|
|
138
|
+
(video.state === PLAYABLE_STATE || video.state === LOADING_STATE)),
|
|
139
|
+
audioReady: !!(audioTrack &&
|
|
140
|
+
(audio.state === PLAYABLE_STATE || audio.state === LOADING_STATE)),
|
|
141
|
+
userName: participant.user_name,
|
|
142
|
+
local: participant.local,
|
|
143
|
+
sessionId: participant.session_id,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
updateTrack(participant, newTrackType) {
|
|
147
|
+
if (!this.avatarParticipant ||
|
|
148
|
+
this.avatarParticipant.sessionId !== participant.session_id) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
const existingParticipant = this.avatarParticipant;
|
|
152
|
+
const currentParticipantCopy = this.formatParticipantObj(participant);
|
|
153
|
+
if (newTrackType === 'video') {
|
|
154
|
+
if (existingParticipant.videoReady !== currentParticipantCopy.videoReady) {
|
|
155
|
+
existingParticipant.videoReady = currentParticipantCopy.videoReady;
|
|
156
|
+
}
|
|
157
|
+
if (currentParticipantCopy.videoReady &&
|
|
158
|
+
existingParticipant.videoTrack?.id !==
|
|
159
|
+
currentParticipantCopy.videoTrack?.id) {
|
|
160
|
+
existingParticipant.videoTrack = currentParticipantCopy.videoTrack;
|
|
161
|
+
}
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (newTrackType === 'audio') {
|
|
165
|
+
if (existingParticipant.audioReady !== currentParticipantCopy.audioReady) {
|
|
166
|
+
existingParticipant.audioReady = currentParticipantCopy.audioReady;
|
|
167
|
+
}
|
|
168
|
+
if (currentParticipantCopy.audioReady &&
|
|
169
|
+
existingParticipant.audioTrack?.id !==
|
|
170
|
+
currentParticipantCopy.audioTrack?.id) {
|
|
171
|
+
existingParticipant.audioTrack = currentParticipantCopy.audioTrack;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
candidateJoinMeeting = (event) => {
|
|
176
|
+
if (!event || !this.callObject)
|
|
177
|
+
return;
|
|
178
|
+
this.candidateJoined.set(true);
|
|
179
|
+
this.streamStart.emit();
|
|
180
|
+
};
|
|
181
|
+
participantJoined = (event) => {
|
|
182
|
+
if (!event)
|
|
183
|
+
return;
|
|
184
|
+
this.avatarParticipant = this.formatParticipantObj(event.participant);
|
|
185
|
+
};
|
|
186
|
+
handleTrackStartedStopped = (event) => {
|
|
187
|
+
if (!event || !event.participant || !this.candidateJoined())
|
|
188
|
+
return;
|
|
189
|
+
if (event.action === 'track-stopped') {
|
|
190
|
+
this.checkMediaPermissions.emit();
|
|
191
|
+
}
|
|
192
|
+
this.updateTrack(event.participant, event.type);
|
|
193
|
+
this.cdr.detectChanges();
|
|
194
|
+
};
|
|
195
|
+
handleParticipantLeft = (event) => {
|
|
196
|
+
if (!event)
|
|
197
|
+
return;
|
|
198
|
+
this.leaveCall();
|
|
199
|
+
};
|
|
200
|
+
handleError = (event) => {
|
|
201
|
+
if (!event)
|
|
202
|
+
return;
|
|
203
|
+
console.error('Interview stream error', event);
|
|
204
|
+
this.leaveCall();
|
|
205
|
+
};
|
|
206
|
+
handleLeftMeeting = (event) => {
|
|
207
|
+
this.callObject?.stopRecording();
|
|
208
|
+
if (!event || !this.callObject)
|
|
209
|
+
return;
|
|
210
|
+
this.candidateJoined.set(false);
|
|
211
|
+
this.callObject.destroy();
|
|
212
|
+
this.streamEnd.emit();
|
|
213
|
+
};
|
|
214
|
+
leaveCall() {
|
|
215
|
+
if (!this.callObject)
|
|
216
|
+
return;
|
|
217
|
+
this.callObject.leave();
|
|
218
|
+
}
|
|
219
|
+
handleNewMessage = (event) => {
|
|
220
|
+
if (!event)
|
|
221
|
+
return;
|
|
222
|
+
if (event.data.event_type === 'conversation.tool_call') {
|
|
223
|
+
this.handleToolCall(event.data.properties);
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
getConversationId() {
|
|
227
|
+
return this.conversationUrl?.replace('https://tavus.daily.co/', '');
|
|
228
|
+
}
|
|
229
|
+
/*
|
|
230
|
+
This is a test implementation of tool calling.
|
|
231
|
+
These events will only be triggered if configured with a Tavus persona. The message content will be further refined by the IP Team.
|
|
232
|
+
https://docs.tavus.io/sections/event-schemas/conversation-toolcall
|
|
233
|
+
*/
|
|
234
|
+
handleToolCall = (properties) => {
|
|
235
|
+
switch (properties.name) {
|
|
236
|
+
case 'next_question':
|
|
237
|
+
try {
|
|
238
|
+
const args = JSON.parse(properties.arguments);
|
|
239
|
+
if (args?.questionsLeft > 0) {
|
|
240
|
+
this.sendMessage(this.getToolCallTranslation('NEXT_QUESTION'));
|
|
241
|
+
window.setTimeout(() => {
|
|
242
|
+
this.sendMessage('Read next question', 'respond');
|
|
243
|
+
}, 1000);
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
throw new Error('No more questions left');
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
catch (err) {
|
|
250
|
+
console.error('Failed to parse arguments for next_question tool call', err);
|
|
251
|
+
this.sendMessage(this.getToolCallTranslation('ALL_FOR_TODAY'));
|
|
252
|
+
window.setTimeout(() => {
|
|
253
|
+
this.leaveCall();
|
|
254
|
+
}, 5000);
|
|
255
|
+
}
|
|
256
|
+
break;
|
|
257
|
+
case 'end_conversation':
|
|
258
|
+
window.setTimeout(() => {
|
|
259
|
+
this.leaveCall();
|
|
260
|
+
}, 5000);
|
|
261
|
+
break;
|
|
262
|
+
default:
|
|
263
|
+
console.warn('Unknown tool call code:', properties);
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
/*
|
|
268
|
+
Echo message is a message that avatar reads and candidate can hear
|
|
269
|
+
Respond message is a message that avatar reads and candidate cannot hear
|
|
270
|
+
*/
|
|
271
|
+
sendMessage(text, type = 'echo') {
|
|
272
|
+
if (!this.callObject)
|
|
273
|
+
return;
|
|
274
|
+
this.callObject.sendAppMessage({
|
|
275
|
+
message_type: 'conversation',
|
|
276
|
+
event_type: 'conversation.' + type,
|
|
277
|
+
conversation_id: this.getConversationId(),
|
|
278
|
+
properties: {
|
|
279
|
+
text,
|
|
280
|
+
},
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
getToolCallTranslation(key) {
|
|
284
|
+
const toolCallTranslations = this.translations['TOOL_CALL'];
|
|
285
|
+
return toolCallTranslations[key];
|
|
286
|
+
}
|
|
287
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: InterviewStreamComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
288
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: InterviewStreamComponent, isStandalone: true, selector: "tgo-interview-stream", inputs: { conversationUrl: "conversationUrl", selectedMediaDevices: "selectedMediaDevices", translations: "translations" }, outputs: { streamStart: "streamStart", streamEnd: "streamEnd", checkMediaPermissions: "checkMediaPermissions" }, ngImport: i0, template: "<div class=\"interview-stream\">\n @if (avatarParticipant) {\n <tgo-interview-video\n [videoTrack]=\"avatarParticipant.videoTrack\"\n [audioTrack]=\"avatarParticipant.audioTrack\"\n ></tgo-interview-video>\n }\n</div>\n\n", styles: [".interview-stream{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: InterviewVideoComponent, selector: "tgo-interview-video", inputs: ["videoTrack", "audioTrack"] }] });
|
|
289
|
+
}
|
|
290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: InterviewStreamComponent, decorators: [{
|
|
291
|
+
type: Component,
|
|
292
|
+
args: [{ selector: 'tgo-interview-stream', imports: [CommonModule, InterviewVideoComponent], template: "<div class=\"interview-stream\">\n @if (avatarParticipant) {\n <tgo-interview-video\n [videoTrack]=\"avatarParticipant.videoTrack\"\n [audioTrack]=\"avatarParticipant.audioTrack\"\n ></tgo-interview-video>\n }\n</div>\n\n", styles: [".interview-stream{width:100%;height:100%}\n"] }]
|
|
293
|
+
}], propDecorators: { conversationUrl: [{
|
|
294
|
+
type: Input
|
|
295
|
+
}], selectedMediaDevices: [{
|
|
296
|
+
type: Input
|
|
297
|
+
}], translations: [{
|
|
298
|
+
type: Input
|
|
299
|
+
}], streamStart: [{
|
|
300
|
+
type: Output
|
|
301
|
+
}], streamEnd: [{
|
|
302
|
+
type: Output
|
|
303
|
+
}], checkMediaPermissions: [{
|
|
304
|
+
type: Output
|
|
305
|
+
}] } });
|
|
306
|
+
|
|
307
|
+
class AiInterviewTestComponent {
|
|
308
|
+
translationScope;
|
|
309
|
+
videoElement;
|
|
310
|
+
audioElement;
|
|
311
|
+
question;
|
|
312
|
+
test;
|
|
313
|
+
isFirstQuestion = false;
|
|
314
|
+
selectedMediaDevices;
|
|
315
|
+
conversationUrl;
|
|
316
|
+
mediaAccessChanged;
|
|
317
|
+
submissionStateChanged = new EventEmitter();
|
|
318
|
+
loadingStateChanged = new EventEmitter();
|
|
319
|
+
requestMediaAccess = new EventEmitter();
|
|
320
|
+
isInterviewInProgress = signal(false);
|
|
321
|
+
candidateVideoStreamReady = signal(false);
|
|
322
|
+
translations = {};
|
|
323
|
+
hasMediaPermissions = signal(false);
|
|
324
|
+
unsubscribe$ = new Subject();
|
|
325
|
+
mediaService = inject(MediaService);
|
|
326
|
+
translocoService = inject(TranslocoService);
|
|
327
|
+
cdr = inject(ChangeDetectorRef);
|
|
328
|
+
themeService = inject(ThemeService);
|
|
329
|
+
companyColor = this.themeService.getCompanyColor();
|
|
330
|
+
constructor(translationScope) {
|
|
331
|
+
this.translationScope = translationScope;
|
|
332
|
+
}
|
|
333
|
+
ngOnInit() {
|
|
334
|
+
this.initMediaAccessSubscription();
|
|
335
|
+
this.loadingStateChanged.emit(true);
|
|
336
|
+
this.mediaService.setSelectedMediaDevices(this.selectedMediaDevices);
|
|
337
|
+
void this.checkMediaPermissions();
|
|
338
|
+
void this.setTranslations();
|
|
339
|
+
void this.initVideoStream();
|
|
340
|
+
}
|
|
341
|
+
ngOnDestroy() {
|
|
342
|
+
this.unsubscribe$.next();
|
|
343
|
+
this.unsubscribe$.complete();
|
|
344
|
+
}
|
|
345
|
+
onVideoLoad() {
|
|
346
|
+
this.candidateVideoStreamReady.set(true);
|
|
347
|
+
}
|
|
348
|
+
interviewStarted() {
|
|
349
|
+
this.isInterviewInProgress.set(true);
|
|
350
|
+
this.loadingStateChanged.emit(false);
|
|
351
|
+
}
|
|
352
|
+
interviewEnded() {
|
|
353
|
+
this.isInterviewInProgress.set(false);
|
|
354
|
+
this.submissionStateChanged.emit({
|
|
355
|
+
text: '',
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
async checkMediaPermissions() {
|
|
359
|
+
if (!(await this.mediaService.checkPermission({ audio: true, video: false }))) {
|
|
360
|
+
this.hasMediaPermissions.set(false);
|
|
361
|
+
this.requestMediaAccess.emit();
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
this.hasMediaPermissions.set(true);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
async initVideoStream() {
|
|
369
|
+
try {
|
|
370
|
+
const stream = await this.mediaService.getMediaStream({
|
|
371
|
+
video: true,
|
|
372
|
+
audio: false,
|
|
373
|
+
});
|
|
374
|
+
if (this.videoElement) {
|
|
375
|
+
this.videoElement.nativeElement.srcObject = stream;
|
|
376
|
+
await this.videoElement?.nativeElement.play();
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
catch (error) {
|
|
380
|
+
console.error('Error initializing video stream:', error);
|
|
381
|
+
this.candidateVideoStreamReady.set(false);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
async setTranslations() {
|
|
385
|
+
this.translations = await firstValueFrom(this.translocoService.selectTranslateObject(`TEST`, {}, this.translationScope));
|
|
386
|
+
this.cdr.markForCheck();
|
|
387
|
+
}
|
|
388
|
+
initMediaAccessSubscription() {
|
|
389
|
+
this.mediaAccessChanged?.pipe(takeUntil(this.unsubscribe$)).subscribe(selectedMediaDevices => {
|
|
390
|
+
this.mediaService.setSelectedMediaDevices(selectedMediaDevices);
|
|
391
|
+
this.checkMediaPermissions();
|
|
392
|
+
void this.initVideoStream();
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AiInterviewTestComponent, deps: [{ token: TRANSLOCO_SCOPE }], target: i0.ɵɵFactoryTarget.Component });
|
|
396
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: AiInterviewTestComponent, isStandalone: true, selector: "tgo-ai-interview-test", inputs: { question: "question", test: "test", isFirstQuestion: "isFirstQuestion", selectedMediaDevices: "selectedMediaDevices", conversationUrl: "conversationUrl", mediaAccessChanged: "mediaAccessChanged" }, outputs: { submissionStateChanged: "submissionStateChanged", loadingStateChanged: "loadingStateChanged", requestMediaAccess: "requestMediaAccess" }, providers: [
|
|
397
|
+
TranslocoLazyModuleUtils.getScopeProvider('tgo-ai-interview-test', getAvailableLangs(), ROOT_TRANSLATIONS_SCOPE, (lang) => {
|
|
398
|
+
// Fetch from app assets; demo app copies the library assets to
|
|
399
|
+
// /assets/tgo-ai-interview-test via project.json.
|
|
400
|
+
const url = new URL(`assets/tgo-ai-interview-test/i18n/${lang}.json`, document.baseURI)
|
|
401
|
+
.href;
|
|
402
|
+
return fetch(url).then(res => res.json());
|
|
403
|
+
}),
|
|
404
|
+
DialogService,
|
|
405
|
+
ThemeService,
|
|
406
|
+
], viewQueries: [{ propertyName: "videoElement", first: true, predicate: ["video"], descendants: true }, { propertyName: "audioElement", first: true, predicate: ["audio"], descendants: true }], ngImport: i0, template: "<div class=\"ai-interview-test\">\n <div class=\"test-container\">\n <div\n class=\"media-container\"\n [class.is-video-visible]=\"isInterviewInProgress()\"\n >\n <div class=\"candidate-no-camera\" *ngIf=\"!candidateVideoStreamReady()\">\n <h3> </h3>\n <ui-icon name=\"User-profile-in-line\" color=\"white\" size=\"24\"></ui-icon>\n <h3 class=\"bold\">{{ translations['YOU'] }}</h3>\n </div>\n <div class=\"candidate-camera\" [hidden]=\"!candidateVideoStreamReady()\">\n <video\n height\n #video\n id=\"video\"\n playsinline\n (loadedmetadata)=\"onVideoLoad()\"\n ></video>\n <h3 class=\"bold\" *ngIf=\"candidateVideoStreamReady()\">\n {{ translations['YOU'] }}\n </h3>\n </div>\n <tgo-audio-animation\n *ngIf=\"isInterviewInProgress()\"\n [fakeData]=\"true\"\n ></tgo-audio-animation>\n <div class=\"interview-stream-container\">\n <tgo-interview-stream\n *ngIf=\"conversationUrl && hasMediaPermissions()\"\n [selectedMediaDevices]=\"selectedMediaDevices\"\n [conversationUrl]=\"conversationUrl\"\n (streamStart)=\"interviewStarted()\"\n (streamEnd)=\"interviewEnded()\"\n (checkMediaPermissions)=\"checkMediaPermissions()\"\n [translations]=\"translations\"\n ></tgo-interview-stream>\n </div>\n </div>\n </div>\n</div>\n\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.ai-interview-test{background-color:#242424;padding:24px;display:flex;justify-content:center;min-height:calc(100vh - 80px)}.ai-interview-test h3{color:#fff}.ai-interview-test .test-container{min-width:360px;width:100%;min-height:300px;height:min(725px,100%,max(100vw,100vh,200px));max-width:calc(177.7777777778vh - 80px - 48px);display:flex;flex-direction:column;justify-content:space-between;position:relative;background-color:#242424}.ai-interview-test .media-container{position:relative;color:#fff;flex-grow:1}.ai-interview-test .media-container .interview-stream-container{border-radius:10px;aspect-ratio:16/9;border:4px solid #0165FC;margin:0 auto}.ai-interview-test .media-container .candidate-no-camera{position:absolute;width:200px;aspect-ratio:16/9;z-index:3;top:32px;left:32px;border-radius:10px;background-color:#1a47aa;display:flex;justify-content:space-between;flex-direction:column;padding:16px}.ai-interview-test .media-container .candidate-no-camera ui-icon{margin:auto}.ai-interview-test .media-container .candidate-camera{position:absolute;width:200px;top:32px;left:32px;z-index:3}.ai-interview-test .media-container .candidate-camera video{width:200px;border-radius:10px}.ai-interview-test .media-container .candidate-camera h3{position:absolute;bottom:16px;left:16px}.ai-interview-test .media-container tgo-audio-animation{position:absolute;top:32px;right:32px;z-index:1}.ai-interview-test .media-container tgo-vimeo-video{display:none;position:absolute;height:100%;width:100%}.ai-interview-test .media-container.is-video-visible tgo-vimeo-video{display:block}.ai-interview-test .media-container.is-playing{border:4px solid #0165FC;border-bottom-width:3px}.ai-interview-test .media-container.is-answering .candidate-camera tgo-audio-animation,.ai-interview-test .media-container.is-answering .candidate-no-camera tgo-audio-animation{position:absolute;top:16px;right:16px}.ai-interview-test .media-container.is-answering .candidate-camera video,.ai-interview-test .media-container.is-answering .candidate-no-camera{border:3px solid #0165FC;border-radius:10px}.ai-interview-test .media-container.is-answering tgo-vimeo-video{display:block}.ai-interview-test .media-container .start,.ai-interview-test .media-container .audio-info,.ai-interview-test .media-container .overlay,.ai-interview-test .media-container .answer{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:40px;height:100%}.ai-interview-test .media-container .preview{height:100%;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;padding:24px}.ai-interview-test .media-container .preview p{color:#d3d3d3;margin:8px 0}.ai-interview-test .media-container .preview audio{margin:16px 0}.ai-interview-test .media-container .preview.hidden{display:none}@media screen and (max-width: 600px){.ai-interview-test{padding:0 24px;margin-top:16px}}\n"], dependencies: [{ kind: "ngmodule", type: TranslocoModule }, { kind: "ngmodule", type: ButtonComponentModule }, { kind: "ngmodule", type: IconComponentModule }, { kind: "component", type: i1.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AudioAnimationComponent, selector: "tgo-audio-animation", inputs: ["volume", "fakeData"] }, { kind: "component", type: InterviewStreamComponent, selector: "tgo-interview-stream", inputs: ["conversationUrl", "selectedMediaDevices", "translations"], outputs: ["streamStart", "streamEnd", "checkMediaPermissions"] }], animations: [
|
|
407
|
+
trigger('fadeInFadeOut', [
|
|
408
|
+
transition(':enter', [style({ opacity: 0 }), animate('600ms', style({ opacity: 1 }))]),
|
|
409
|
+
transition(':leave', [animate('600ms', style({ opacity: 0 }))]),
|
|
410
|
+
]),
|
|
411
|
+
] });
|
|
412
|
+
}
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AiInterviewTestComponent, decorators: [{
|
|
414
|
+
type: Component,
|
|
415
|
+
args: [{ selector: 'tgo-ai-interview-test', animations: [
|
|
416
|
+
trigger('fadeInFadeOut', [
|
|
417
|
+
transition(':enter', [style({ opacity: 0 }), animate('600ms', style({ opacity: 1 }))]),
|
|
418
|
+
transition(':leave', [animate('600ms', style({ opacity: 0 }))]),
|
|
419
|
+
]),
|
|
420
|
+
], imports: [
|
|
421
|
+
TranslocoModule,
|
|
422
|
+
ButtonComponentModule,
|
|
423
|
+
IconComponentModule,
|
|
424
|
+
CommonModule,
|
|
425
|
+
AudioAnimationComponent,
|
|
426
|
+
InterviewStreamComponent,
|
|
427
|
+
], providers: [
|
|
428
|
+
TranslocoLazyModuleUtils.getScopeProvider('tgo-ai-interview-test', getAvailableLangs(), ROOT_TRANSLATIONS_SCOPE, (lang) => {
|
|
429
|
+
// Fetch from app assets; demo app copies the library assets to
|
|
430
|
+
// /assets/tgo-ai-interview-test via project.json.
|
|
431
|
+
const url = new URL(`assets/tgo-ai-interview-test/i18n/${lang}.json`, document.baseURI)
|
|
432
|
+
.href;
|
|
433
|
+
return fetch(url).then(res => res.json());
|
|
434
|
+
}),
|
|
435
|
+
DialogService,
|
|
436
|
+
ThemeService,
|
|
437
|
+
], template: "<div class=\"ai-interview-test\">\n <div class=\"test-container\">\n <div\n class=\"media-container\"\n [class.is-video-visible]=\"isInterviewInProgress()\"\n >\n <div class=\"candidate-no-camera\" *ngIf=\"!candidateVideoStreamReady()\">\n <h3> </h3>\n <ui-icon name=\"User-profile-in-line\" color=\"white\" size=\"24\"></ui-icon>\n <h3 class=\"bold\">{{ translations['YOU'] }}</h3>\n </div>\n <div class=\"candidate-camera\" [hidden]=\"!candidateVideoStreamReady()\">\n <video\n height\n #video\n id=\"video\"\n playsinline\n (loadedmetadata)=\"onVideoLoad()\"\n ></video>\n <h3 class=\"bold\" *ngIf=\"candidateVideoStreamReady()\">\n {{ translations['YOU'] }}\n </h3>\n </div>\n <tgo-audio-animation\n *ngIf=\"isInterviewInProgress()\"\n [fakeData]=\"true\"\n ></tgo-audio-animation>\n <div class=\"interview-stream-container\">\n <tgo-interview-stream\n *ngIf=\"conversationUrl && hasMediaPermissions()\"\n [selectedMediaDevices]=\"selectedMediaDevices\"\n [conversationUrl]=\"conversationUrl\"\n (streamStart)=\"interviewStarted()\"\n (streamEnd)=\"interviewEnded()\"\n (checkMediaPermissions)=\"checkMediaPermissions()\"\n [translations]=\"translations\"\n ></tgo-interview-stream>\n </div>\n </div>\n </div>\n</div>\n\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.ai-interview-test{background-color:#242424;padding:24px;display:flex;justify-content:center;min-height:calc(100vh - 80px)}.ai-interview-test h3{color:#fff}.ai-interview-test .test-container{min-width:360px;width:100%;min-height:300px;height:min(725px,100%,max(100vw,100vh,200px));max-width:calc(177.7777777778vh - 80px - 48px);display:flex;flex-direction:column;justify-content:space-between;position:relative;background-color:#242424}.ai-interview-test .media-container{position:relative;color:#fff;flex-grow:1}.ai-interview-test .media-container .interview-stream-container{border-radius:10px;aspect-ratio:16/9;border:4px solid #0165FC;margin:0 auto}.ai-interview-test .media-container .candidate-no-camera{position:absolute;width:200px;aspect-ratio:16/9;z-index:3;top:32px;left:32px;border-radius:10px;background-color:#1a47aa;display:flex;justify-content:space-between;flex-direction:column;padding:16px}.ai-interview-test .media-container .candidate-no-camera ui-icon{margin:auto}.ai-interview-test .media-container .candidate-camera{position:absolute;width:200px;top:32px;left:32px;z-index:3}.ai-interview-test .media-container .candidate-camera video{width:200px;border-radius:10px}.ai-interview-test .media-container .candidate-camera h3{position:absolute;bottom:16px;left:16px}.ai-interview-test .media-container tgo-audio-animation{position:absolute;top:32px;right:32px;z-index:1}.ai-interview-test .media-container tgo-vimeo-video{display:none;position:absolute;height:100%;width:100%}.ai-interview-test .media-container.is-video-visible tgo-vimeo-video{display:block}.ai-interview-test .media-container.is-playing{border:4px solid #0165FC;border-bottom-width:3px}.ai-interview-test .media-container.is-answering .candidate-camera tgo-audio-animation,.ai-interview-test .media-container.is-answering .candidate-no-camera tgo-audio-animation{position:absolute;top:16px;right:16px}.ai-interview-test .media-container.is-answering .candidate-camera video,.ai-interview-test .media-container.is-answering .candidate-no-camera{border:3px solid #0165FC;border-radius:10px}.ai-interview-test .media-container.is-answering tgo-vimeo-video{display:block}.ai-interview-test .media-container .start,.ai-interview-test .media-container .audio-info,.ai-interview-test .media-container .overlay,.ai-interview-test .media-container .answer{display:flex;justify-content:center;align-items:center;flex-direction:column;gap:40px;height:100%}.ai-interview-test .media-container .preview{height:100%;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;padding:24px}.ai-interview-test .media-container .preview p{color:#d3d3d3;margin:8px 0}.ai-interview-test .media-container .preview audio{margin:16px 0}.ai-interview-test .media-container .preview.hidden{display:none}@media screen and (max-width: 600px){.ai-interview-test{padding:0 24px;margin-top:16px}}\n"] }]
|
|
438
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
439
|
+
type: Inject,
|
|
440
|
+
args: [TRANSLOCO_SCOPE]
|
|
441
|
+
}] }], propDecorators: { videoElement: [{
|
|
442
|
+
type: ViewChild,
|
|
443
|
+
args: ['video']
|
|
444
|
+
}], audioElement: [{
|
|
445
|
+
type: ViewChild,
|
|
446
|
+
args: ['audio']
|
|
447
|
+
}], question: [{
|
|
448
|
+
type: Input,
|
|
449
|
+
args: [{ required: true }]
|
|
450
|
+
}], test: [{
|
|
451
|
+
type: Input,
|
|
452
|
+
args: [{ required: true }]
|
|
453
|
+
}], isFirstQuestion: [{
|
|
454
|
+
type: Input
|
|
455
|
+
}], selectedMediaDevices: [{
|
|
456
|
+
type: Input
|
|
457
|
+
}], conversationUrl: [{
|
|
458
|
+
type: Input
|
|
459
|
+
}], mediaAccessChanged: [{
|
|
460
|
+
type: Input
|
|
461
|
+
}], submissionStateChanged: [{
|
|
462
|
+
type: Output
|
|
463
|
+
}], loadingStateChanged: [{
|
|
464
|
+
type: Output
|
|
465
|
+
}], requestMediaAccess: [{
|
|
466
|
+
type: Output
|
|
467
|
+
}] } });
|
|
468
|
+
|
|
469
|
+
// Re-export from shared
|
|
470
|
+
|
|
471
|
+
// Re-export shared models
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Generated bundle index. Do not edit.
|
|
475
|
+
*/
|
|
476
|
+
|
|
477
|
+
export { AiInterviewTestComponent, InterviewStreamComponent, InterviewVideoComponent };
|
|
478
|
+
//# sourceMappingURL=testgorilla-tgo-ai-interview-test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ai-interview-test.mjs","sources":["../../../../packages/tgo-ai-interview-test/src/lib/components/interview-video/interview-video.component.ts","../../../../packages/tgo-ai-interview-test/src/lib/components/interview-video/interview-video.component.html","../../../../packages/tgo-ai-interview-test/src/lib/components/interview-stream/interview-stream.component.ts","../../../../packages/tgo-ai-interview-test/src/lib/components/interview-stream/interview-stream.component.html","../../../../packages/tgo-ai-interview-test/src/lib/components/ai-interview-test/ai-interview-test.component.ts","../../../../packages/tgo-ai-interview-test/src/lib/components/ai-interview-test/ai-interview-test.component.html","../../../../packages/tgo-ai-interview-test/src/lib/models/translations.ts","../../../../packages/tgo-ai-interview-test/src/lib/models/index.ts","../../../../packages/tgo-ai-interview-test/src/testgorilla-tgo-ai-interview-test.ts"],"sourcesContent":["import { Component, Input, OnInit, SimpleChanges, OnChanges } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@Component({\n selector: 'tgo-interview-video',\n templateUrl: './interview-video.component.html',\n styleUrls: ['./interview-video.component.scss'],\n imports: [CommonModule]\n})\nexport class InterviewVideoComponent implements OnInit, OnChanges {\n @Input() videoTrack: MediaStreamTrack | undefined;\n @Input() audioTrack: MediaStreamTrack | undefined;\n videoStream: MediaStream | undefined;\n audioStream: MediaStream | undefined;\n\n ngOnInit(): void {\n if (this.videoTrack) {\n this.addVideoStream(this.videoTrack);\n }\n if (this.audioTrack) {\n this.addAudioStream(this.audioTrack);\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { videoTrack, audioTrack } = changes;\n\n if (videoTrack?.currentValue && !this.videoStream) {\n this.addVideoStream(videoTrack.currentValue);\n }\n\n if (audioTrack?.currentValue && !this.audioStream) {\n this.addAudioStream(audioTrack.currentValue);\n }\n\n if (videoTrack?.currentValue && this.videoStream) {\n this.updateVideoTrack(videoTrack.previousValue, videoTrack.currentValue);\n }\n\n if (audioTrack?.currentValue && this.audioStream) {\n this.updateAudioTrack(audioTrack.previousValue, audioTrack.currentValue);\n }\n }\n\n addVideoStream(track: MediaStreamTrack) {\n this.videoStream = new MediaStream([track]);\n }\n\n addAudioStream(track: MediaStreamTrack) {\n this.audioStream = new MediaStream([track]);\n }\n\n updateVideoTrack(oldTrack: MediaStreamTrack, track: MediaStreamTrack) {\n if (oldTrack) {\n this.videoStream?.removeTrack(oldTrack);\n }\n this.videoStream?.addTrack(track);\n }\n\n updateAudioTrack(oldTrack: MediaStreamTrack, track: MediaStreamTrack) {\n if (oldTrack) {\n this.audioStream?.removeTrack(oldTrack);\n }\n this.audioStream?.addTrack(track);\n }\n}\n\n","@if (videoStream) {\n<video autoPlay muted playsInline [srcObject]=\"videoStream\"></video>\n} @if (audioStream) {\n<audio autoPlay playsInline [srcObject]=\"audioStream\">\n <track kind=\"captions\" />\n</audio>\n}\n\n","import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n signal,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport DailyIframe, {\n DailyCall,\n DailyEventObjectParticipant,\n DailyParticipant,\n DailyEventObjectFatalError,\n DailyEventObjectParticipants,\n DailyEventObjectNoPayload,\n DailyEventObjectParticipantLeft,\n DailyEventObjectTrack,\n DailyEventObjectAppMessage,\n} from '@daily-co/daily-js';\nimport { SelectedMediaDevices } from '@testgorilla/tgo-shared-lib';\nimport { InterviewVideoComponent } from '../interview-video/interview-video.component';\n\nexport type Participant = {\n videoTrack?: MediaStreamTrack | undefined;\n audioTrack?: MediaStreamTrack | undefined;\n videoReady: boolean;\n audioReady: boolean;\n userName: string;\n local: boolean;\n sessionId: string;\n};\n\nconst PLAYABLE_STATE = 'playable';\nconst LOADING_STATE = 'loading';\n\ninterface EventData {\n event_type: string;\n properties: {\n name: string;\n arguments: string;\n };\n}\n\n@Component({\n selector: 'tgo-interview-stream',\n templateUrl: './interview-stream.component.html',\n styleUrls: ['./interview-stream.component.scss'],\n imports: [CommonModule, InterviewVideoComponent]\n})\nexport class InterviewStreamComponent implements OnInit, OnDestroy {\n @Input() conversationUrl: string | undefined;\n @Input() selectedMediaDevices: SelectedMediaDevices | undefined;\n @Input() translations: { [key: string]: string } = {};\n @Output() streamStart: EventEmitter<null> = new EventEmitter();\n @Output() streamEnd: EventEmitter<null> = new EventEmitter();\n @Output() checkMediaPermissions: EventEmitter<null> = new EventEmitter();\n\n callObject: DailyCall | undefined;\n avatarParticipant: Participant | undefined;\n candidateJoined = signal(false);\n private cdr = inject(ChangeDetectorRef);\n\n ngOnInit(): void {\n void this.setupCall();\n }\n\n ngOnDestroy(): void {\n if (!this.callObject) return;\n this.leaveCall();\n this.callObject\n .off('joined-meeting', this.candidateJoinMeeting)\n .off('participant-joined', this.participantJoined)\n .off('app-message', this.handleNewMessage)\n .off('track-started', this.handleTrackStartedStopped)\n .off('track-stopped', this.handleTrackStartedStopped)\n .off('participant-left', this.handleParticipantLeft)\n .off('left-meeting', this.handleLeftMeeting)\n .off('error', this.handleError);\n }\n\n private async setupCall() {\n this.callObject = DailyIframe.getCallInstance();\n if (!this.callObject) {\n this.callObject = DailyIframe.createCallObject();\n }\n if (this.selectedMediaDevices) {\n await this.callObject.setInputDevicesAsync({\n videoDeviceId: this.selectedMediaDevices.videoDeviceId,\n audioDeviceId: this.selectedMediaDevices.audioDeviceId,\n });\n }\n this.callObject.startRecording({\n type: 'cloud',\n });\n\n this.callObject\n .on('joined-meeting', this.candidateJoinMeeting)\n .on('participant-joined', this.participantJoined)\n .on('app-message', this.handleNewMessage)\n .on('track-started', this.handleTrackStartedStopped)\n .on('track-stopped', this.handleTrackStartedStopped)\n .on('participant-left', this.handleParticipantLeft)\n .on('left-meeting', this.handleLeftMeeting)\n .on('error', this.handleError);\n\n await this.callObject.join({\n userName: 'Candidate',\n url: this.conversationUrl,\n });\n }\n\n formatParticipantObj(participant: DailyParticipant): Participant {\n const { video, audio } = participant.tracks;\n\n const videoTrack = video?.persistentTrack;\n const audioTrack = audio?.persistentTrack;\n return {\n videoTrack: videoTrack,\n audioTrack: audioTrack,\n videoReady: !!(\n videoTrack &&\n (video.state === PLAYABLE_STATE || video.state === LOADING_STATE)\n ),\n audioReady: !!(\n audioTrack &&\n (audio.state === PLAYABLE_STATE || audio.state === LOADING_STATE)\n ),\n userName: participant.user_name,\n local: participant.local,\n sessionId: participant.session_id,\n };\n }\n\n updateTrack(participant: DailyParticipant, newTrackType: string): void {\n if (\n !this.avatarParticipant ||\n this.avatarParticipant.sessionId !== participant.session_id\n ) {\n return;\n }\n const existingParticipant = this.avatarParticipant as Participant;\n const currentParticipantCopy = this.formatParticipantObj(participant);\n\n if (newTrackType === 'video') {\n if (\n existingParticipant.videoReady !== currentParticipantCopy.videoReady\n ) {\n existingParticipant.videoReady = currentParticipantCopy.videoReady;\n }\n\n if (\n currentParticipantCopy.videoReady &&\n existingParticipant.videoTrack?.id !==\n currentParticipantCopy.videoTrack?.id\n ) {\n existingParticipant.videoTrack = currentParticipantCopy.videoTrack;\n }\n return;\n }\n\n if (newTrackType === 'audio') {\n if (\n existingParticipant.audioReady !== currentParticipantCopy.audioReady\n ) {\n existingParticipant.audioReady = currentParticipantCopy.audioReady;\n }\n\n if (\n currentParticipantCopy.audioReady &&\n existingParticipant.audioTrack?.id !==\n currentParticipantCopy.audioTrack?.id\n ) {\n existingParticipant.audioTrack = currentParticipantCopy.audioTrack;\n }\n }\n }\n\n private candidateJoinMeeting = (\n event: DailyEventObjectParticipants | undefined\n ): void => {\n if (!event || !this.callObject) return;\n this.candidateJoined.set(true);\n this.streamStart.emit();\n };\n\n private participantJoined = (\n event: DailyEventObjectParticipant | undefined\n ) => {\n if (!event) return;\n this.avatarParticipant = this.formatParticipantObj(event.participant);\n };\n\n private handleTrackStartedStopped = (\n event: DailyEventObjectTrack | undefined\n ): void => {\n if (!event || !event.participant || !this.candidateJoined()) return;\n if (event.action === 'track-stopped') {\n this.checkMediaPermissions.emit();\n }\n this.updateTrack(event.participant, event.type);\n this.cdr.detectChanges();\n };\n\n private handleParticipantLeft = (\n event: DailyEventObjectParticipantLeft | undefined\n ): void => {\n if (!event) return;\n this.leaveCall();\n };\n\n private handleError = (\n event: DailyEventObjectFatalError | undefined\n ): void => {\n if (!event) return;\n console.error('Interview stream error', event);\n this.leaveCall();\n };\n\n private handleLeftMeeting = (\n event: DailyEventObjectNoPayload | undefined\n ): void => {\n this.callObject?.stopRecording();\n if (!event || !this.callObject) return;\n this.candidateJoined.set(false);\n this.callObject.destroy();\n this.streamEnd.emit();\n };\n\n private leaveCall(): void {\n if (!this.callObject) return;\n this.callObject.leave();\n }\n\n private handleNewMessage = (\n event: DailyEventObjectAppMessage<EventData> | undefined\n ): void => {\n if (!event) return;\n if (event.data.event_type === 'conversation.tool_call') {\n this.handleToolCall(event.data.properties);\n }\n };\n\n private getConversationId(): string | undefined {\n return this.conversationUrl?.replace('https://tavus.daily.co/', '');\n }\n\n /*\n This is a test implementation of tool calling.\n These events will only be triggered if configured with a Tavus persona. The message content will be further refined by the IP Team.\n https://docs.tavus.io/sections/event-schemas/conversation-toolcall\n */\n private handleToolCall = (properties: {\n name: string;\n arguments: string;\n }): void => {\n switch (properties.name) {\n case 'next_question':\n try {\n const args = JSON.parse(properties.arguments);\n if (args?.questionsLeft > 0) {\n this.sendMessage(this.getToolCallTranslation('NEXT_QUESTION'));\n window.setTimeout(() => {\n this.sendMessage('Read next question', 'respond');\n }, 1000);\n } else {\n throw new Error('No more questions left');\n }\n } catch (err) {\n console.error(\n 'Failed to parse arguments for next_question tool call',\n err\n );\n\n this.sendMessage(this.getToolCallTranslation('ALL_FOR_TODAY'));\n window.setTimeout(() => {\n this.leaveCall();\n }, 5000);\n }\n break;\n case 'end_conversation':\n window.setTimeout(() => {\n this.leaveCall();\n }, 5000);\n break;\n default:\n console.warn('Unknown tool call code:', properties);\n break;\n }\n };\n\n /*\n Echo message is a message that avatar reads and candidate can hear\n Respond message is a message that avatar reads and candidate cannot hear\n */\n\n private sendMessage(text: string, type: 'echo' | 'respond' = 'echo'): void {\n if (!this.callObject) return;\n\n this.callObject.sendAppMessage({\n message_type: 'conversation',\n event_type: 'conversation.' + type,\n conversation_id: this.getConversationId(),\n properties: {\n text,\n },\n });\n }\n\n private getToolCallTranslation(key: string) {\n const toolCallTranslations = this.translations['TOOL_CALL'] as unknown as {\n [key: string]: string;\n };\n return toolCallTranslations[key];\n }\n}\n\n","<div class=\"interview-stream\">\n @if (avatarParticipant) {\n <tgo-interview-video\n [videoTrack]=\"avatarParticipant.videoTrack\"\n [audioTrack]=\"avatarParticipant.audioTrack\"\n ></tgo-interview-video>\n }\n</div>\n\n","import { InterviewStreamComponent } from '../interview-stream/interview-stream.component';\nimport { firstValueFrom, Observable, takeUntil } from 'rxjs';\nimport { transition, style, animate, trigger } from '@angular/animations';\nimport {\n ElementRef,\n OnDestroy,\n signal,\n ViewChild,\n Component,\n EventEmitter,\n Input,\n Output,\n inject,\n OnInit,\n Inject,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { ButtonComponentModule, DialogService, IconComponentModule } from '@testgorilla/tgo-ui';\nimport { CommonModule } from '@angular/common';\nimport {\n TRANSLOCO_SCOPE,\n TranslocoModule,\n TranslocoScope,\n TranslocoService,\n} from '@ngneat/transloco';\nimport {\n AudioAnimationComponent,\n Question,\n TestResultRead,\n SelectedMediaDevices,\n ISubmissionState,\n ROOT_TRANSLATIONS_SCOPE,\n MediaService,\n ThemeService,\n TranslocoLazyModuleUtils,\n getAvailableLangs,\n} from '@testgorilla/tgo-shared-lib';\nimport { IQuestionDataContract } from '../../models';\n\n@Component({\n selector: 'tgo-ai-interview-test',\n templateUrl: './ai-interview-test.component.html',\n styleUrl: './ai-interview-test.component.scss',\n animations: [\n trigger('fadeInFadeOut', [\n transition(':enter', [style({ opacity: 0 }), animate('600ms', style({ opacity: 1 }))]),\n transition(':leave', [animate('600ms', style({ opacity: 0 }))]),\n ]),\n ],\n imports: [\n TranslocoModule,\n ButtonComponentModule,\n IconComponentModule,\n CommonModule,\n AudioAnimationComponent,\n InterviewStreamComponent,\n ],\n providers: [\n TranslocoLazyModuleUtils.getScopeProvider(\n 'tgo-ai-interview-test',\n getAvailableLangs(),\n ROOT_TRANSLATIONS_SCOPE,\n (lang: string) => {\n // Fetch from app assets; demo app copies the library assets to\n // /assets/tgo-ai-interview-test via project.json.\n const url = new URL(`assets/tgo-ai-interview-test/i18n/${lang}.json`, document.baseURI)\n .href;\n return fetch(url).then(res => res.json());\n }\n ),\n DialogService,\n ThemeService,\n ],\n})\nexport class AiInterviewTestComponent implements OnInit, OnDestroy, IQuestionDataContract {\n @ViewChild('video') videoElement?: ElementRef<HTMLVideoElement>;\n @ViewChild('audio') audioElement?: ElementRef<HTMLAudioElement>;\n @Input({ required: true }) question!: Question;\n @Input({ required: true }) test!: TestResultRead;\n @Input() isFirstQuestion?: boolean = false;\n @Input() selectedMediaDevices?: SelectedMediaDevices;\n @Input() conversationUrl?: string;\n @Input() mediaAccessChanged?: Observable<SelectedMediaDevices> | undefined;\n\n @Output() submissionStateChanged = new EventEmitter<ISubmissionState | null>();\n @Output() loadingStateChanged: EventEmitter<boolean> = new EventEmitter<boolean>();\n @Output() requestMediaAccess: EventEmitter<void> = new EventEmitter<void>();\n\n isInterviewInProgress = signal(false);\n candidateVideoStreamReady = signal(false);\n translations: { [key: string]: string } = {};\n hasMediaPermissions = signal(false);\n\n private unsubscribe$ = new Subject<void>();\n private mediaService = inject(MediaService);\n private translocoService = inject(TranslocoService);\n private cdr = inject(ChangeDetectorRef);\n private themeService = inject(ThemeService);\n\n companyColor = this.themeService.getCompanyColor();\n\n constructor(@Inject(TRANSLOCO_SCOPE) private translationScope: TranslocoScope) {}\n\n ngOnInit(): void {\n this.initMediaAccessSubscription();\n this.loadingStateChanged.emit(true);\n this.mediaService.setSelectedMediaDevices(this.selectedMediaDevices);\n void this.checkMediaPermissions();\n\n void this.setTranslations();\n void this.initVideoStream();\n }\n\n ngOnDestroy() {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n\n onVideoLoad() {\n this.candidateVideoStreamReady.set(true);\n }\n\n interviewStarted() {\n this.isInterviewInProgress.set(true);\n this.loadingStateChanged.emit(false);\n }\n\n interviewEnded() {\n this.isInterviewInProgress.set(false);\n this.submissionStateChanged.emit({\n text: '',\n });\n }\n\n async checkMediaPermissions() {\n if (!(await this.mediaService.checkPermission({ audio: true, video: false }))) {\n this.hasMediaPermissions.set(false);\n this.requestMediaAccess.emit();\n return;\n } else {\n this.hasMediaPermissions.set(true);\n }\n }\n\n private async initVideoStream() {\n try {\n const stream = await this.mediaService.getMediaStream({\n video: true,\n audio: false,\n });\n if (this.videoElement) {\n this.videoElement.nativeElement.srcObject = stream;\n await this.videoElement?.nativeElement.play();\n }\n } catch (error) {\n console.error('Error initializing video stream:', error);\n this.candidateVideoStreamReady.set(false);\n }\n }\n\n private async setTranslations() {\n this.translations = await firstValueFrom(\n this.translocoService.selectTranslateObject(`TEST`, {}, this.translationScope as string)\n );\n this.cdr.markForCheck();\n }\n\n private initMediaAccessSubscription() {\n this.mediaAccessChanged?.pipe(takeUntil(this.unsubscribe$)).subscribe(selectedMediaDevices => {\n this.mediaService.setSelectedMediaDevices(selectedMediaDevices);\n this.checkMediaPermissions();\n void this.initVideoStream();\n });\n }\n}\n","<div class=\"ai-interview-test\">\n <div class=\"test-container\">\n <div\n class=\"media-container\"\n [class.is-video-visible]=\"isInterviewInProgress()\"\n >\n <div class=\"candidate-no-camera\" *ngIf=\"!candidateVideoStreamReady()\">\n <h3> </h3>\n <ui-icon name=\"User-profile-in-line\" color=\"white\" size=\"24\"></ui-icon>\n <h3 class=\"bold\">{{ translations['YOU'] }}</h3>\n </div>\n <div class=\"candidate-camera\" [hidden]=\"!candidateVideoStreamReady()\">\n <video\n height\n #video\n id=\"video\"\n playsinline\n (loadedmetadata)=\"onVideoLoad()\"\n ></video>\n <h3 class=\"bold\" *ngIf=\"candidateVideoStreamReady()\">\n {{ translations['YOU'] }}\n </h3>\n </div>\n <tgo-audio-animation\n *ngIf=\"isInterviewInProgress()\"\n [fakeData]=\"true\"\n ></tgo-audio-animation>\n <div class=\"interview-stream-container\">\n <tgo-interview-stream\n *ngIf=\"conversationUrl && hasMediaPermissions()\"\n [selectedMediaDevices]=\"selectedMediaDevices\"\n [conversationUrl]=\"conversationUrl\"\n (streamStart)=\"interviewStarted()\"\n (streamEnd)=\"interviewEnded()\"\n (checkMediaPermissions)=\"checkMediaPermissions()\"\n [translations]=\"translations\"\n ></tgo-interview-stream>\n </div>\n </div>\n </div>\n</div>\n\n","// Re-export from shared\nexport { ROOT_TRANSLATIONS_SCOPE } from '@testgorilla/tgo-shared-lib';\n\n","// Re-export shared models\nexport {\n Question,\n TestResultRead,\n SelectedMediaDevices,\n ISubmissionState,\n ROOT_TRANSLATIONS_SCOPE,\n} from '@testgorilla/tgo-shared-lib';\n\n// Export library-specific extensions\nexport * from './question-component';\nexport * from './translations';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MASa,u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0,0 +1,44 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ElementRef, OnDestroy, EventEmitter, OnInit } from '@angular/core';
|
|
3
|
+
import { TranslocoScope } from '@ngneat/transloco';
|
|
4
|
+
import { Question, TestResultRead, SelectedMediaDevices, ISubmissionState } from '@testgorilla/tgo-shared-lib';
|
|
5
|
+
import { IQuestionDataContract } from '../../models';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class AiInterviewTestComponent implements OnInit, OnDestroy, IQuestionDataContract {
|
|
8
|
+
private translationScope;
|
|
9
|
+
videoElement?: ElementRef<HTMLVideoElement>;
|
|
10
|
+
audioElement?: ElementRef<HTMLAudioElement>;
|
|
11
|
+
question: Question;
|
|
12
|
+
test: TestResultRead;
|
|
13
|
+
isFirstQuestion?: boolean;
|
|
14
|
+
selectedMediaDevices?: SelectedMediaDevices;
|
|
15
|
+
conversationUrl?: string;
|
|
16
|
+
mediaAccessChanged?: Observable<SelectedMediaDevices> | undefined;
|
|
17
|
+
submissionStateChanged: EventEmitter<ISubmissionState>;
|
|
18
|
+
loadingStateChanged: EventEmitter<boolean>;
|
|
19
|
+
requestMediaAccess: EventEmitter<void>;
|
|
20
|
+
isInterviewInProgress: import("@angular/core").WritableSignal<boolean>;
|
|
21
|
+
candidateVideoStreamReady: import("@angular/core").WritableSignal<boolean>;
|
|
22
|
+
translations: {
|
|
23
|
+
[key: string]: string;
|
|
24
|
+
};
|
|
25
|
+
hasMediaPermissions: import("@angular/core").WritableSignal<boolean>;
|
|
26
|
+
private unsubscribe$;
|
|
27
|
+
private mediaService;
|
|
28
|
+
private translocoService;
|
|
29
|
+
private cdr;
|
|
30
|
+
private themeService;
|
|
31
|
+
companyColor: string;
|
|
32
|
+
constructor(translationScope: TranslocoScope);
|
|
33
|
+
ngOnInit(): void;
|
|
34
|
+
ngOnDestroy(): void;
|
|
35
|
+
onVideoLoad(): void;
|
|
36
|
+
interviewStarted(): void;
|
|
37
|
+
interviewEnded(): void;
|
|
38
|
+
checkMediaPermissions(): Promise<void>;
|
|
39
|
+
private initVideoStream;
|
|
40
|
+
private setTranslations;
|
|
41
|
+
private initMediaAccessSubscription;
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AiInterviewTestComponent, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AiInterviewTestComponent, "tgo-ai-interview-test", never, { "question": { "alias": "question"; "required": true; }; "test": { "alias": "test"; "required": true; }; "isFirstQuestion": { "alias": "isFirstQuestion"; "required": false; }; "selectedMediaDevices": { "alias": "selectedMediaDevices"; "required": false; }; "conversationUrl": { "alias": "conversationUrl"; "required": false; }; "mediaAccessChanged": { "alias": "mediaAccessChanged"; "required": false; }; }, { "submissionStateChanged": "submissionStateChanged"; "loadingStateChanged": "loadingStateChanged"; "requestMediaAccess": "requestMediaAccess"; }, never, never, true, never>;
|
|
44
|
+
}
|