@zeewain/3d-avatar-sdk 1.2.4-0 → 1.2.4
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/assets/Build/webgl.data.unityweb +0 -0
- package/dist/assets/Build/webgl.framework.js.unityweb +0 -0
- package/dist/assets/Build/webgl.wasm.unityweb +0 -0
- package/dist/examples/test-vue2/package.json +1 -1
- package/dist/examples/test-vue2/pnpm-lock.yaml +4 -4
- package/dist/examples/test-vue3/package.json +2 -2
- package/dist/examples/test-vue3/src/App.vue +1 -1
- package/dist/examples/test-vue3/src/components/BroadcastAPI.vue +1 -0
- package/dist/index.es5.js +12 -21
- package/dist/index.es5.umd.js +12 -21
- package/dist/index.esm.js +9 -18
- package/dist/index.umd.cjs +9 -18
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -6,8 +6,8 @@ settings:
|
|
|
6
6
|
|
|
7
7
|
dependencies:
|
|
8
8
|
'@zeewain/3d-avatar-sdk':
|
|
9
|
-
specifier: ^1.1
|
|
10
|
-
version: 1.1
|
|
9
|
+
specifier: ^1.2.1
|
|
10
|
+
version: 1.2.1
|
|
11
11
|
core-js:
|
|
12
12
|
specifier: ^3.8.3
|
|
13
13
|
version: 3.43.0
|
|
@@ -2479,8 +2479,8 @@ packages:
|
|
|
2479
2479
|
resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==}
|
|
2480
2480
|
dev: true
|
|
2481
2481
|
|
|
2482
|
-
/@zeewain/3d-avatar-sdk@1.1
|
|
2483
|
-
resolution: {integrity: sha512-
|
|
2482
|
+
/@zeewain/3d-avatar-sdk@1.2.1:
|
|
2483
|
+
resolution: {integrity: sha512-qUcSflPO6C0G3aHlSLx3YM+ze2gzPkqujYsdcO9d73HzdvSOMTcaCeDQrpiuai5tKpcQ+vXX4+v1kTu3bd91qg==}
|
|
2484
2484
|
dependencies:
|
|
2485
2485
|
'@microsoft/fetch-event-source': 2.0.1
|
|
2486
2486
|
core-js: 3.43.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zee-avatar-sdk-vue3-test",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "ZEEAvatarSDK Vue3 + TypeScript + Vite 测试项目",
|
|
5
5
|
"private": true,
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@element-plus/icons-vue": "^2.3.1",
|
|
25
25
|
"@vueuse/core": "^13.5.0",
|
|
26
26
|
"@vueuse/integrations": "^13.5.0",
|
|
27
|
-
"@zeewain/3d-avatar-sdk": "^1.2.4
|
|
27
|
+
"@zeewain/3d-avatar-sdk": "^1.2.4",
|
|
28
28
|
"dayjs": "^1.11.13",
|
|
29
29
|
"element-plus": "^2.10.4",
|
|
30
30
|
"vite-plugin-html": "^3.2.2",
|
|
@@ -299,7 +299,7 @@ function initializeSDKConfig(): ZEEAvatarSDK | null {
|
|
|
299
299
|
env: globalConfig.env,
|
|
300
300
|
apiUrl: globalConfig.apiBaseUrl,
|
|
301
301
|
resourcesUrl: globalConfig.resourcesUrl || undefined,
|
|
302
|
-
|
|
302
|
+
enableDebugLog: true,
|
|
303
303
|
// 待机动作列表:比心,左手指示(低)
|
|
304
304
|
idleMotionList: globalConfig.idleMotionListString?.split(',').filter(item => item.trim()) || [],
|
|
305
305
|
|
package/dist/index.es5.js
CHANGED
|
@@ -14270,7 +14270,7 @@ var ZEEAvatarSDKLib = (function (exports) {
|
|
|
14270
14270
|
return;
|
|
14271
14271
|
}
|
|
14272
14272
|
// 处理音频数据
|
|
14273
|
-
if (response.data
|
|
14273
|
+
if (response.data) {
|
|
14274
14274
|
// 自定义音频播报时,如果服务器未返回音频URL,使用传入的audioUrl
|
|
14275
14275
|
if (task.params.type === exports.BroadcastType.AUDIO && task.params.audioUrl && !response.data.voiceUrl) {
|
|
14276
14276
|
response.data.voiceUrl = task.params.audioUrl;
|
|
@@ -14281,15 +14281,14 @@ var ZEEAvatarSDKLib = (function (exports) {
|
|
|
14281
14281
|
taskId: task.id,
|
|
14282
14282
|
pendingCount: task.pendingResponses.length
|
|
14283
14283
|
});
|
|
14284
|
-
|
|
14285
|
-
|
|
14286
|
-
|
|
14287
|
-
|
|
14288
|
-
|
|
14289
|
-
|
|
14290
|
-
|
|
14291
|
-
}
|
|
14292
|
-
// 任务完成生成,保持REQUESTING状态直到所有响应发送完毕
|
|
14284
|
+
// 检查是否完成
|
|
14285
|
+
if (response.data.done) {
|
|
14286
|
+
task.isGenerationComplete = true;
|
|
14287
|
+
this.logger.debug('Task generation completed', {
|
|
14288
|
+
taskId: task.id,
|
|
14289
|
+
totalResponses: task.pendingResponses.length
|
|
14290
|
+
});
|
|
14291
|
+
}
|
|
14293
14292
|
}
|
|
14294
14293
|
} catch (error) {
|
|
14295
14294
|
this.handleTaskError(task, error);
|
|
@@ -14424,20 +14423,12 @@ var ZEEAvatarSDKLib = (function (exports) {
|
|
|
14424
14423
|
* @private
|
|
14425
14424
|
*/
|
|
14426
14425
|
BroadcastService.prototype.getBroadcastApiPath = function (type) {
|
|
14427
|
-
|
|
14426
|
+
ConfigManager.getInstance().getEnv();
|
|
14428
14427
|
switch (type) {
|
|
14429
14428
|
case exports.BroadcastType.TEXT:
|
|
14430
|
-
|
|
14431
|
-
if (env === 'dev' || env === 'test') {
|
|
14432
|
-
return '/aiep-openapi/avatar-interaction/v1/broadcast/text';
|
|
14433
|
-
}
|
|
14434
|
-
return '/dh-talker/user/agent/broadcast/text';
|
|
14429
|
+
return '/aiep-openapi/avatar-interaction/v1/broadcast/text';
|
|
14435
14430
|
case exports.BroadcastType.AUDIO:
|
|
14436
|
-
|
|
14437
|
-
if (env === 'dev' || env === 'test') {
|
|
14438
|
-
return '/aiep-openapi/avatar-interaction/v1/broadcast/audio';
|
|
14439
|
-
}
|
|
14440
|
-
return '/dh-talker/user/agent/broadcast/customAudio';
|
|
14431
|
+
return '/aiep-openapi/avatar-interaction/v1/broadcast/audio';
|
|
14441
14432
|
default:
|
|
14442
14433
|
throw new SDKError(exports.ConfigErrorCode.INVALID_CONFIG, "\u672A\u77E5\u7684\u64AD\u62A5\u7C7B\u578B: ".concat(type));
|
|
14443
14434
|
}
|
package/dist/index.es5.umd.js
CHANGED
|
@@ -14273,7 +14273,7 @@
|
|
|
14273
14273
|
return;
|
|
14274
14274
|
}
|
|
14275
14275
|
// 处理音频数据
|
|
14276
|
-
if (response.data
|
|
14276
|
+
if (response.data) {
|
|
14277
14277
|
// 自定义音频播报时,如果服务器未返回音频URL,使用传入的audioUrl
|
|
14278
14278
|
if (task.params.type === exports.BroadcastType.AUDIO && task.params.audioUrl && !response.data.voiceUrl) {
|
|
14279
14279
|
response.data.voiceUrl = task.params.audioUrl;
|
|
@@ -14284,15 +14284,14 @@
|
|
|
14284
14284
|
taskId: task.id,
|
|
14285
14285
|
pendingCount: task.pendingResponses.length
|
|
14286
14286
|
});
|
|
14287
|
-
|
|
14288
|
-
|
|
14289
|
-
|
|
14290
|
-
|
|
14291
|
-
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
}
|
|
14295
|
-
// 任务完成生成,保持REQUESTING状态直到所有响应发送完毕
|
|
14287
|
+
// 检查是否完成
|
|
14288
|
+
if (response.data.done) {
|
|
14289
|
+
task.isGenerationComplete = true;
|
|
14290
|
+
this.logger.debug('Task generation completed', {
|
|
14291
|
+
taskId: task.id,
|
|
14292
|
+
totalResponses: task.pendingResponses.length
|
|
14293
|
+
});
|
|
14294
|
+
}
|
|
14296
14295
|
}
|
|
14297
14296
|
} catch (error) {
|
|
14298
14297
|
this.handleTaskError(task, error);
|
|
@@ -14427,20 +14426,12 @@
|
|
|
14427
14426
|
* @private
|
|
14428
14427
|
*/
|
|
14429
14428
|
BroadcastService.prototype.getBroadcastApiPath = function (type) {
|
|
14430
|
-
|
|
14429
|
+
ConfigManager.getInstance().getEnv();
|
|
14431
14430
|
switch (type) {
|
|
14432
14431
|
case exports.BroadcastType.TEXT:
|
|
14433
|
-
|
|
14434
|
-
if (env === 'dev' || env === 'test') {
|
|
14435
|
-
return '/aiep-openapi/avatar-interaction/v1/broadcast/text';
|
|
14436
|
-
}
|
|
14437
|
-
return '/dh-talker/user/agent/broadcast/text';
|
|
14432
|
+
return '/aiep-openapi/avatar-interaction/v1/broadcast/text';
|
|
14438
14433
|
case exports.BroadcastType.AUDIO:
|
|
14439
|
-
|
|
14440
|
-
if (env === 'dev' || env === 'test') {
|
|
14441
|
-
return '/aiep-openapi/avatar-interaction/v1/broadcast/audio';
|
|
14442
|
-
}
|
|
14443
|
-
return '/dh-talker/user/agent/broadcast/customAudio';
|
|
14434
|
+
return '/aiep-openapi/avatar-interaction/v1/broadcast/audio';
|
|
14444
14435
|
default:
|
|
14445
14436
|
throw new SDKError(exports.ConfigErrorCode.INVALID_CONFIG, "\u672A\u77E5\u7684\u64AD\u62A5\u7C7B\u578B: ".concat(type));
|
|
14446
14437
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -1939,7 +1939,7 @@ class BroadcastService extends UnityBaseService {
|
|
|
1939
1939
|
return;
|
|
1940
1940
|
}
|
|
1941
1941
|
// 处理音频数据
|
|
1942
|
-
if (response.data
|
|
1942
|
+
if (response.data) {
|
|
1943
1943
|
// 自定义音频播报时,如果服务器未返回音频URL,使用传入的audioUrl
|
|
1944
1944
|
if (task.params.type === BroadcastType.AUDIO && task.params.audioUrl && !response.data.voiceUrl) {
|
|
1945
1945
|
response.data.voiceUrl = task.params.audioUrl;
|
|
@@ -1947,12 +1947,11 @@ class BroadcastService extends UnityBaseService {
|
|
|
1947
1947
|
// 添加处理后的响应对象到待发送队列
|
|
1948
1948
|
task.pendingResponses.push(response);
|
|
1949
1949
|
this.logger.debug('Response added to task', { taskId: task.id, pendingCount: task.pendingResponses.length });
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
// 任务完成生成,保持REQUESTING状态直到所有响应发送完毕
|
|
1950
|
+
// 检查是否完成
|
|
1951
|
+
if (response.data.done) {
|
|
1952
|
+
task.isGenerationComplete = true;
|
|
1953
|
+
this.logger.debug('Task generation completed', { taskId: task.id, totalResponses: task.pendingResponses.length });
|
|
1954
|
+
}
|
|
1956
1955
|
}
|
|
1957
1956
|
}
|
|
1958
1957
|
catch (error) {
|
|
@@ -2063,20 +2062,12 @@ class BroadcastService extends UnityBaseService {
|
|
|
2063
2062
|
* @private
|
|
2064
2063
|
*/
|
|
2065
2064
|
getBroadcastApiPath(type) {
|
|
2066
|
-
|
|
2065
|
+
ConfigManager.getInstance().getEnv();
|
|
2067
2066
|
switch (type) {
|
|
2068
2067
|
case BroadcastType.TEXT:
|
|
2069
|
-
|
|
2070
|
-
if (env === 'dev' || env === 'test') {
|
|
2071
|
-
return '/aiep-openapi/avatar-interaction/v1/broadcast/text';
|
|
2072
|
-
}
|
|
2073
|
-
return '/dh-talker/user/agent/broadcast/text';
|
|
2068
|
+
return '/aiep-openapi/avatar-interaction/v1/broadcast/text';
|
|
2074
2069
|
case BroadcastType.AUDIO:
|
|
2075
|
-
|
|
2076
|
-
if (env === 'dev' || env === 'test') {
|
|
2077
|
-
return '/aiep-openapi/avatar-interaction/v1/broadcast/audio';
|
|
2078
|
-
}
|
|
2079
|
-
return '/dh-talker/user/agent/broadcast/customAudio';
|
|
2070
|
+
return '/aiep-openapi/avatar-interaction/v1/broadcast/audio';
|
|
2080
2071
|
default:
|
|
2081
2072
|
throw new SDKError(ConfigErrorCode.INVALID_CONFIG, `未知的播报类型: ${type}`);
|
|
2082
2073
|
}
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1945,7 +1945,7 @@
|
|
|
1945
1945
|
return;
|
|
1946
1946
|
}
|
|
1947
1947
|
// 处理音频数据
|
|
1948
|
-
if (response.data
|
|
1948
|
+
if (response.data) {
|
|
1949
1949
|
// 自定义音频播报时,如果服务器未返回音频URL,使用传入的audioUrl
|
|
1950
1950
|
if (task.params.type === exports.BroadcastType.AUDIO && task.params.audioUrl && !response.data.voiceUrl) {
|
|
1951
1951
|
response.data.voiceUrl = task.params.audioUrl;
|
|
@@ -1953,12 +1953,11 @@
|
|
|
1953
1953
|
// 添加处理后的响应对象到待发送队列
|
|
1954
1954
|
task.pendingResponses.push(response);
|
|
1955
1955
|
this.logger.debug('Response added to task', { taskId: task.id, pendingCount: task.pendingResponses.length });
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
// 任务完成生成,保持REQUESTING状态直到所有响应发送完毕
|
|
1956
|
+
// 检查是否完成
|
|
1957
|
+
if (response.data.done) {
|
|
1958
|
+
task.isGenerationComplete = true;
|
|
1959
|
+
this.logger.debug('Task generation completed', { taskId: task.id, totalResponses: task.pendingResponses.length });
|
|
1960
|
+
}
|
|
1962
1961
|
}
|
|
1963
1962
|
}
|
|
1964
1963
|
catch (error) {
|
|
@@ -2069,20 +2068,12 @@
|
|
|
2069
2068
|
* @private
|
|
2070
2069
|
*/
|
|
2071
2070
|
getBroadcastApiPath(type) {
|
|
2072
|
-
|
|
2071
|
+
ConfigManager.getInstance().getEnv();
|
|
2073
2072
|
switch (type) {
|
|
2074
2073
|
case exports.BroadcastType.TEXT:
|
|
2075
|
-
|
|
2076
|
-
if (env === 'dev' || env === 'test') {
|
|
2077
|
-
return '/aiep-openapi/avatar-interaction/v1/broadcast/text';
|
|
2078
|
-
}
|
|
2079
|
-
return '/dh-talker/user/agent/broadcast/text';
|
|
2074
|
+
return '/aiep-openapi/avatar-interaction/v1/broadcast/text';
|
|
2080
2075
|
case exports.BroadcastType.AUDIO:
|
|
2081
|
-
|
|
2082
|
-
if (env === 'dev' || env === 'test') {
|
|
2083
|
-
return '/aiep-openapi/avatar-interaction/v1/broadcast/audio';
|
|
2084
|
-
}
|
|
2085
|
-
return '/dh-talker/user/agent/broadcast/customAudio';
|
|
2076
|
+
return '/aiep-openapi/avatar-interaction/v1/broadcast/audio';
|
|
2086
2077
|
default:
|
|
2087
2078
|
throw new SDKError(exports.ConfigErrorCode.INVALID_CONFIG, `未知的播报类型: ${type}`);
|
|
2088
2079
|
}
|