@kaltura-sdk/avatars 1.18.0 → 1.20.0
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/README.md +1 -1
- package/index.esm.js +23 -5
- package/package.json +2 -2
- package/src/lib/avatar-client-manager/avatar-client-manager.d.ts +2 -2
- package/src/lib/avatar-client-manager/machines/avatar-connection/actions/server/send-tap-to-talk-start.d.ts +2 -4
- package/src/lib/avatar-client-manager/machines/avatar-connection/types/events.d.ts +2 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ manager.stop(); // full teardown, unsubscribes everything
|
|
|
34
34
|
- **Pause/resume**: `pause()`, `resume()`, `pauseAfterSpeaking()`, `isPaused`
|
|
35
35
|
- **Chat & content**: `askViaText()`, `chatLog`, `content`, `setLocalContent()`, `clearContent()`, `agentData`
|
|
36
36
|
- **Screen share**: `startScreenShare()`, `stopScreenShare()`, `screenShareInfo`
|
|
37
|
-
- **Tap-to-talk**: `tapToTalkStart()
|
|
37
|
+
- **Tap-to-talk**: `tapToTalkStart(options?)` (`options.enrichAudio` asks the server to analyze the recording; `options.referenceText` is the text being read, sent with `enrichAudio`), `tapToTalkEnd()`, `toggleTapToTalkMode()`, `tapToTalkInfo`
|
|
38
38
|
- **Captions**: `captions` (state + `toggle`/`setReplacements`/`setFilter`)
|
|
39
39
|
- **Kaltura context**: `kalturaContext`, `toggleKalturaContext()`, `updateDynamicVariables()`
|
|
40
40
|
- **Client tools**: `registerClientTools()`, `unregisterClientTools()`, `registeredClientTools`, `clientToolCallLog`
|
package/index.esm.js
CHANGED
|
@@ -23103,13 +23103,30 @@ const isTapToTalkEnabled = ({
|
|
|
23103
23103
|
};
|
|
23104
23104
|
|
|
23105
23105
|
const sendTapToTalkStart = ({
|
|
23106
|
-
context
|
|
23106
|
+
context,
|
|
23107
|
+
event
|
|
23107
23108
|
}) => {
|
|
23109
|
+
var _a;
|
|
23110
|
+
assertEvent(event, AvatarConnectionMachineEventTypes.RequestTapToTalkStart);
|
|
23108
23111
|
const client = websocketClientManager.getClient(context.externalInfo.serverUrl);
|
|
23109
23112
|
if (!client) {
|
|
23110
23113
|
throw new Error('WebSocket client not found');
|
|
23111
23114
|
}
|
|
23112
|
-
|
|
23115
|
+
const {
|
|
23116
|
+
enrichAudio,
|
|
23117
|
+
referenceText
|
|
23118
|
+
} = (_a = event.options) !== null && _a !== void 0 ? _a : {};
|
|
23119
|
+
// No payload without options keeps the event identical for servers that predate the flag
|
|
23120
|
+
if (enrichAudio === undefined) {
|
|
23121
|
+
client.emit('tapToTalkStart');
|
|
23122
|
+
return;
|
|
23123
|
+
}
|
|
23124
|
+
client.emit('tapToTalkStart', referenceText === undefined ? {
|
|
23125
|
+
enrichAudio
|
|
23126
|
+
} : {
|
|
23127
|
+
enrichAudio,
|
|
23128
|
+
referenceText
|
|
23129
|
+
});
|
|
23113
23130
|
};
|
|
23114
23131
|
|
|
23115
23132
|
const sendTapToTalkEnd = ({
|
|
@@ -24238,7 +24255,7 @@ class AvatarClientManager extends ActorManager {
|
|
|
24238
24255
|
pauseAvatar: () => this.pause(),
|
|
24239
24256
|
resumeAvatar: () => this.resume(),
|
|
24240
24257
|
pauseAvatarAfterSpeaking: () => this.pauseAfterSpeaking(),
|
|
24241
|
-
tapToTalkStart:
|
|
24258
|
+
tapToTalkStart: options => this.tapToTalkStart(options),
|
|
24242
24259
|
tapToTalkEnd: () => this.tapToTalkEnd(),
|
|
24243
24260
|
clearContent: () => this.clearContent(),
|
|
24244
24261
|
toggleCaptions: () => this.toggleCaptions(),
|
|
@@ -24457,10 +24474,11 @@ class AvatarClientManager extends ActorManager {
|
|
|
24457
24474
|
get tapToTalkInfo() {
|
|
24458
24475
|
return this._tapToTalkInfo.consumer;
|
|
24459
24476
|
}
|
|
24460
|
-
tapToTalkStart() {
|
|
24477
|
+
tapToTalkStart(options) {
|
|
24461
24478
|
var _a;
|
|
24462
24479
|
(_a = this._actor) === null || _a === void 0 ? void 0 : _a.send({
|
|
24463
|
-
type: AvatarConnectionMachineEventTypes.RequestTapToTalkStart
|
|
24480
|
+
type: AvatarConnectionMachineEventTypes.RequestTapToTalkStart,
|
|
24481
|
+
options
|
|
24464
24482
|
});
|
|
24465
24483
|
}
|
|
24466
24484
|
tapToTalkEnd() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaltura-sdk/avatars",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"author": "kaltura",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"repository": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@kaltura-sdk/rtc-core": "^1.26.2",
|
|
14
14
|
"@local/genie-shared-utils": "^1.0.0",
|
|
15
15
|
"@unisphere/core": "^1.99.0",
|
|
16
|
-
"@unisphere/genie-types": "^1.
|
|
16
|
+
"@unisphere/genie-types": "^1.46.0",
|
|
17
17
|
"@unisphere/notifications-core": "^1.25.0",
|
|
18
18
|
"@unisphere/runtime": "^1.98.0",
|
|
19
19
|
"@unisphere/runtime-js": "^1.98.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UnisphereLoggerType } from '@unisphere/core';
|
|
2
2
|
import { KalturaAnalyticsServiceType, PubSubServiceType } from '@unisphere/runtime';
|
|
3
|
-
import { AgentData, AgentKalturaContextData, AgentProgressBar, AgentScreenShareInfo, AgentTapToTalkInfo, AvatarClientManagerType, AvatarConnectionProxInternalType, AvatarConnectionProxyType, AvatarConnectionStatus, AvatarContentData, AvatarRuntimeSettings, CaptionConfig, Captions, ChatEntry, ClientToolCallLogEntry, DisconnectReasons } from '@unisphere/genie-types';
|
|
3
|
+
import { AgentData, AgentKalturaContextData, AgentProgressBar, AgentScreenShareInfo, AgentTapToTalkInfo, AvatarClientManagerType, AvatarConnectionProxInternalType, AvatarConnectionProxyType, AvatarConnectionStatus, AvatarContentData, AvatarRuntimeSettings, CaptionConfig, Captions, ChatEntry, ClientToolCallLogEntry, DisconnectReasons, TapToTalkStartOptions } from '@unisphere/genie-types';
|
|
4
4
|
import { type AvatarClientToolsInput, type AvatarConnectionActor } from './machines/avatar-connection';
|
|
5
5
|
import { AvatarClientManagerActions } from './types';
|
|
6
6
|
import { DeviceType } from '@kaltura-sdk/rtc-core';
|
|
@@ -128,7 +128,7 @@ export declare class AvatarClientManager extends ActorManager<AvatarConnectionAc
|
|
|
128
128
|
startScreenShare(): void;
|
|
129
129
|
stopScreenShare(): void;
|
|
130
130
|
get tapToTalkInfo(): import("@unisphere/core").TinyDataStoreConsumer<AgentTapToTalkInfo | null>;
|
|
131
|
-
tapToTalkStart(): void;
|
|
131
|
+
tapToTalkStart(options?: TapToTalkStartOptions): void;
|
|
132
132
|
tapToTalkEnd(): void;
|
|
133
133
|
toggleTapToTalkMode(enabled: boolean): void;
|
|
134
134
|
get captions(): Captions;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const sendTapToTalkStart:
|
|
3
|
-
context: AvatarConnectionMachineContext;
|
|
4
|
-
}) => void;
|
|
1
|
+
import { AvatarConnectionMachineAction } from '../../types';
|
|
2
|
+
export declare const sendTapToTalkStart: AvatarConnectionMachineAction;
|
|
@@ -2,7 +2,7 @@ import { DoneActorEvent, ErrorActorEvent } from 'xstate';
|
|
|
2
2
|
import { ChatEntry, UnisphereChatBlock } from '@unisphere/genie-types';
|
|
3
3
|
import { askPermissionsSchema, clientConfigurationSchema, conversationEndedSchema, conversationTimeWarningSchema, joinCompleteSchema, noAgentSchema, onServerConnectedSchema, showAgentSchema, showStartSpeechSchema, stvFinishedTalkingSchema, stvNewSessionSchema, stvStartedTalkingSchema } from './schemas';
|
|
4
4
|
import z from 'zod';
|
|
5
|
-
import { AgentProgressBar, CaptionState, ClientToolCallLogEntry, DisconnectReasons } from '@unisphere/genie-types';
|
|
5
|
+
import { AgentProgressBar, CaptionState, ClientToolCallLogEntry, DisconnectReasons, TapToTalkStartOptions } from '@unisphere/genie-types';
|
|
6
6
|
export declare enum AvatarConnectionMachineEventTypes {
|
|
7
7
|
Disconnect = "Disconnect",
|
|
8
8
|
WebsocketReconnected = "WebsocketReconnected",
|
|
@@ -212,6 +212,7 @@ export type SetDynamicVariablesEvent = {
|
|
|
212
212
|
};
|
|
213
213
|
export type RequestTapToTalkStartEvent = {
|
|
214
214
|
type: AvatarConnectionMachineEventTypes.RequestTapToTalkStart;
|
|
215
|
+
options?: TapToTalkStartOptions;
|
|
215
216
|
};
|
|
216
217
|
export type RequestTapToTalkEndEvent = {
|
|
217
218
|
type: AvatarConnectionMachineEventTypes.RequestTapToTalkEnd;
|