virtual-human-cf 1.5.0 → 1.6.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 +11 -1
- package/dist/api/request.d.ts +1 -0
- package/dist/components/VirtualHumanEventAdapter.vue.d.ts +13 -1
- package/dist/virtual-human-cf.es.js +175 -164
- package/dist/virtual-human-cf.umd.js +6 -6
- package/package.json +1 -1
- package/src/api/request.ts +4 -1
- package/src/components/VirtualHumanEventAdapter.vue +15 -1
package/README.md
CHANGED
|
@@ -12,7 +12,14 @@
|
|
|
12
12
|
- 响应式设计
|
|
13
13
|
|
|
14
14
|
## 更新日志
|
|
15
|
-
|
|
15
|
+
## 1.6.0
|
|
16
|
+
- 新增VirtualHumanEventAdapter组件props: controlHostUrl,用于指定数字人播放控制指令的主机地址
|
|
17
|
+
```javascript
|
|
18
|
+
<VirtualHumanEventAdapter
|
|
19
|
+
:controlHostUrl="controlHostUrl"
|
|
20
|
+
/>
|
|
21
|
+
const controlHostUrl = ref("http://****");
|
|
22
|
+
```
|
|
16
23
|
### 1.5.0
|
|
17
24
|
- 新增VirtualHumanEventAdapter组件对外暴露play方法
|
|
18
25
|
|
|
@@ -179,6 +186,7 @@ const onEnded = () => {
|
|
|
179
186
|
| -------------- | ------ | ------ | ---- | ------------------ |
|
|
180
187
|
| screenClientId | String | - | 是 | 屏幕客户端 ID |
|
|
181
188
|
| wsUrl | String | - | 是 | WebSocket 连接地址 |
|
|
189
|
+
| controlHostUrl | String | - | 是 | 数字人播放控制指令的主机地址 |
|
|
182
190
|
|
|
183
191
|
#### Events
|
|
184
192
|
|
|
@@ -230,6 +238,7 @@ tts_complete 文本转语音完成,不代表本地播放完成
|
|
|
230
238
|
<VirtualHumanEventAdapter
|
|
231
239
|
:screen-client-id="clientId"
|
|
232
240
|
:ws-url="websocketUrl"
|
|
241
|
+
:controlHostUrl="controlHostUrl"
|
|
233
242
|
@connected="onConnected"
|
|
234
243
|
@eventNotifaction="onEventNotifaction"
|
|
235
244
|
@playComplete="onPlayComplete"
|
|
@@ -247,6 +256,7 @@ import { VirtualHumanEventAdapter } from 'virtual-human-cf';
|
|
|
247
256
|
|
|
248
257
|
const clientId = 'screen-123';
|
|
249
258
|
const websocketUrl = 'ws://localhost:8080/ws';
|
|
259
|
+
const controlHostUrl = 'http://localhost:8080';
|
|
250
260
|
|
|
251
261
|
const onConnected = () => {
|
|
252
262
|
console.log('WebSocket 连接成功');
|
package/dist/api/request.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
|
|
1
3
|
declare function __VLS_template(): {
|
|
2
4
|
default?(_: {}): any;
|
|
3
5
|
};
|
|
@@ -10,6 +12,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
10
12
|
type: StringConstructor;
|
|
11
13
|
required: true;
|
|
12
14
|
};
|
|
15
|
+
controlHostUrl: {
|
|
16
|
+
type: PropType<string | null>;
|
|
17
|
+
default: null;
|
|
18
|
+
};
|
|
13
19
|
}>, {
|
|
14
20
|
play: () => Promise<boolean>;
|
|
15
21
|
pause: () => Promise<boolean>;
|
|
@@ -32,6 +38,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
32
38
|
type: StringConstructor;
|
|
33
39
|
required: true;
|
|
34
40
|
};
|
|
41
|
+
controlHostUrl: {
|
|
42
|
+
type: PropType<string | null>;
|
|
43
|
+
default: null;
|
|
44
|
+
};
|
|
35
45
|
}>> & Readonly<{
|
|
36
46
|
onPause?: ((...args: any[]) => any) | undefined;
|
|
37
47
|
onError?: ((...args: any[]) => any) | undefined;
|
|
@@ -40,7 +50,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
40
50
|
onEnd?: ((...args: any[]) => any) | undefined;
|
|
41
51
|
onConnected?: ((...args: any[]) => any) | undefined;
|
|
42
52
|
onPlayComplete?: ((...args: any[]) => any) | undefined;
|
|
43
|
-
}>, {
|
|
53
|
+
}>, {
|
|
54
|
+
controlHostUrl: string | null;
|
|
55
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
44
56
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
45
57
|
export default _default;
|
|
46
58
|
type __VLS_WithTemplateSlots<T, S> = T & {
|