@vivix-ai/ivi-frontend-sdk 0.3.11 → 0.3.12
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/index.cjs +14 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2557,7 +2557,7 @@ var IviRuntimeCoordinator = class {
|
|
|
2557
2557
|
async start() {
|
|
2558
2558
|
const telemetrySpan = startIviTelemetrySpan("sdk.runtime.start", this.config.telemetry, {
|
|
2559
2559
|
"ivi.runtime.status": this.state.status,
|
|
2560
|
-
"
|
|
2560
|
+
"session.id": this.state.session?.id
|
|
2561
2561
|
});
|
|
2562
2562
|
try {
|
|
2563
2563
|
this.setState({
|
|
@@ -2568,13 +2568,13 @@ var IviRuntimeCoordinator = class {
|
|
|
2568
2568
|
await this.client.connect();
|
|
2569
2569
|
endIviTelemetrySpan(telemetrySpan.span, {
|
|
2570
2570
|
"ivi.runtime.status": this.state.status,
|
|
2571
|
-
"
|
|
2571
|
+
"session.id": this.state.session?.id
|
|
2572
2572
|
});
|
|
2573
2573
|
} catch (error) {
|
|
2574
2574
|
this.stop();
|
|
2575
2575
|
failIviTelemetrySpan(telemetrySpan.span, error, {
|
|
2576
2576
|
"ivi.runtime.status": this.state.status,
|
|
2577
|
-
"
|
|
2577
|
+
"session.id": this.state.session?.id
|
|
2578
2578
|
});
|
|
2579
2579
|
throw error;
|
|
2580
2580
|
}
|
|
@@ -2585,7 +2585,7 @@ var IviRuntimeCoordinator = class {
|
|
|
2585
2585
|
stop() {
|
|
2586
2586
|
const telemetrySpan = startIviTelemetrySpan("sdk.runtime.stop", this.config.telemetry, {
|
|
2587
2587
|
"ivi.runtime.status": this.state.status,
|
|
2588
|
-
"
|
|
2588
|
+
"session.id": this.state.session?.id
|
|
2589
2589
|
});
|
|
2590
2590
|
try {
|
|
2591
2591
|
this.dispatcher.stop();
|
|
@@ -2597,7 +2597,7 @@ var IviRuntimeCoordinator = class {
|
|
|
2597
2597
|
} catch (error) {
|
|
2598
2598
|
failIviTelemetrySpan(telemetrySpan.span, error, {
|
|
2599
2599
|
"ivi.runtime.status": this.state.status,
|
|
2600
|
-
"
|
|
2600
|
+
"session.id": this.state.session?.id
|
|
2601
2601
|
});
|
|
2602
2602
|
throw error;
|
|
2603
2603
|
}
|
|
@@ -3209,7 +3209,7 @@ async function createIVISession(request, options) {
|
|
|
3209
3209
|
const result = normalizeCreateIVISessionResponse(responseBody, request, requestBody);
|
|
3210
3210
|
endIviTelemetrySpan(telemetrySpan.span, {
|
|
3211
3211
|
"http.response.status_code": response.status,
|
|
3212
|
-
"
|
|
3212
|
+
"session.id": result.iviSessionId,
|
|
3213
3213
|
"ivi.prebuild.playback.kind": result.prebuiltPlayback?.kind
|
|
3214
3214
|
});
|
|
3215
3215
|
return result;
|
|
@@ -3221,14 +3221,18 @@ async function createIVISession(request, options) {
|
|
|
3221
3221
|
}
|
|
3222
3222
|
}
|
|
3223
3223
|
function createRuntimeFromSession(session, options = {}) {
|
|
3224
|
+
const fastStartEnabled = options.fastStart !== false;
|
|
3225
|
+
const fastStartApplied = fastStartEnabled && Boolean(session.prebuiltPlayback);
|
|
3224
3226
|
const telemetrySpan = startIviTelemetrySpan("sdk.runtime.create", options.telemetry, {
|
|
3225
|
-
"
|
|
3226
|
-
"ivi.prebuild.playback.kind": session.prebuiltPlayback?.kind
|
|
3227
|
+
"session.id": session.iviSessionId,
|
|
3228
|
+
"ivi.prebuild.playback.kind": session.prebuiltPlayback?.kind,
|
|
3229
|
+
"ivi.fast_start.enabled": fastStartEnabled,
|
|
3230
|
+
"ivi.fast_start.applied": fastStartApplied
|
|
3227
3231
|
});
|
|
3228
3232
|
try {
|
|
3229
3233
|
const websocketUrl = buildWebSocketUrl(session.endpoint, options.websocket);
|
|
3230
3234
|
const childTelemetry = withIviTelemetryContext(options.telemetry, telemetrySpan.context, {
|
|
3231
|
-
"
|
|
3235
|
+
"session.id": session.iviSessionId
|
|
3232
3236
|
});
|
|
3233
3237
|
const clientTelemetry = mergeIviTelemetryOptions(
|
|
3234
3238
|
options.clientConfig?.telemetry,
|
|
@@ -3252,7 +3256,7 @@ function createRuntimeFromSession(session, options = {}) {
|
|
|
3252
3256
|
...options.runtimeConfig ?? {},
|
|
3253
3257
|
telemetry: runtimeTelemetry
|
|
3254
3258
|
});
|
|
3255
|
-
if (
|
|
3259
|
+
if (fastStartEnabled && session.prebuiltPlayback) {
|
|
3256
3260
|
runtime.setBootstrapSource(toBootstrapSource(session.prebuiltPlayback, options));
|
|
3257
3261
|
}
|
|
3258
3262
|
endIviTelemetrySpan(telemetrySpan.span);
|