@coze/realtime-api 1.2.1-beta.3 → 1.2.1-beta.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/cjs/event-names/index.js +1 -1
- package/dist/cjs/index.js +3 -1
- package/dist/esm/event-names/index.js +1 -1
- package/dist/esm/index.js +3 -1
- package/dist/types/event-names/event-names.d.ts +1 -1
- package/dist/types/event-names/index.d.ts +3 -1
- package/dist/types/event-names.d.ts +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/umd/index.js +3 -1
- package/package.json +1 -1
@@ -151,7 +151,7 @@ var EventNames = /*#__PURE__*/ function(EventNames) {
|
|
151
151
|
/**
|
152
152
|
* en: Session updated
|
153
153
|
* zh: 会话更新
|
154
|
-
*/ EventNames["
|
154
|
+
*/ EventNames["SESSION_UPDATED"] = "server.session.updated";
|
155
155
|
return EventNames;
|
156
156
|
}(EventNames || {});
|
157
157
|
/* ESM default export */ const __WEBPACK_DEFAULT_EXPORT__ = EventNames;
|
package/dist/cjs/index.js
CHANGED
@@ -264,7 +264,7 @@ var event_names_EventNames = /*#__PURE__*/ function(EventNames) {
|
|
264
264
|
/**
|
265
265
|
* en: Session updated
|
266
266
|
* zh: 会话更新
|
267
|
-
*/ EventNames["
|
267
|
+
*/ EventNames["SESSION_UPDATED"] = "server.session.updated";
|
268
268
|
return EventNames;
|
269
269
|
}(event_names_EventNames || {});
|
270
270
|
/* ESM default export */ const event_names = event_names_EventNames;
|
@@ -632,6 +632,7 @@ class RealtimeClient extends RealtimeEventHandler {
|
|
632
632
|
else {
|
633
633
|
const config = {};
|
634
634
|
if (this._config.prologueContent) config.prologue_content = this._config.prologueContent;
|
635
|
+
if (void 0 !== this._config.roomMode && null !== this._config.roomMode) config.room_mode = this._config.roomMode;
|
635
636
|
if (this._config.videoConfig) {
|
636
637
|
if (isScreenShareDevice(this._config.videoConfig.videoInputDeviceId)) config.video_config = {
|
637
638
|
stream_video_type: 'screen'
|
@@ -863,6 +864,7 @@ class RealtimeClient extends RealtimeEventHandler {
|
|
863
864
|
* @param config.videoConfig.screenConfig - Optional, Screen share configuration if videoInputDeviceId is 'screenShare' see https://www.volcengine.com/docs/6348/104481#screenconfig for more details. |
|
864
865
|
* 可选,屏幕共享配置,如果 videoInputDeviceId 是 'screenShare',请参考 https://www.volcengine.com/docs/6348/104481#screenconfig 了解更多详情。
|
865
866
|
* @param config.prologueContent - Optional, Prologue content. | 可选,开场白内容。
|
867
|
+
* @param config.roomMode - Optional, Room mode. | 可选,房间模式。
|
866
868
|
*/ constructor(config){
|
867
869
|
super(config.debug), this._client = null, this.isConnected = false, this._isTestEnv = false, this._isSupportVideo = false;
|
868
870
|
this._config = config;
|
@@ -114,7 +114,7 @@ var event_names_EventNames = /*#__PURE__*/ function(EventNames) {
|
|
114
114
|
/**
|
115
115
|
* en: Session updated
|
116
116
|
* zh: 会话更新
|
117
|
-
*/ EventNames["
|
117
|
+
*/ EventNames["SESSION_UPDATED"] = "server.session.updated";
|
118
118
|
return EventNames;
|
119
119
|
}(event_names_EventNames || {});
|
120
120
|
/* ESM default export */ const event_names = event_names_EventNames;
|
package/dist/esm/index.js
CHANGED
@@ -237,7 +237,7 @@ var event_names_EventNames = /*#__PURE__*/ function(EventNames) {
|
|
237
237
|
/**
|
238
238
|
* en: Session updated
|
239
239
|
* zh: 会话更新
|
240
|
-
*/ EventNames["
|
240
|
+
*/ EventNames["SESSION_UPDATED"] = "server.session.updated";
|
241
241
|
return EventNames;
|
242
242
|
}(event_names_EventNames || {});
|
243
243
|
/* ESM default export */ const event_names = event_names_EventNames;
|
@@ -603,6 +603,7 @@ class RealtimeClient extends RealtimeEventHandler {
|
|
603
603
|
else {
|
604
604
|
const config = {};
|
605
605
|
if (this._config.prologueContent) config.prologue_content = this._config.prologueContent;
|
606
|
+
if (void 0 !== this._config.roomMode && null !== this._config.roomMode) config.room_mode = this._config.roomMode;
|
606
607
|
if (this._config.videoConfig) {
|
607
608
|
if (isScreenShareDevice(this._config.videoConfig.videoInputDeviceId)) config.video_config = {
|
608
609
|
stream_video_type: 'screen'
|
@@ -834,6 +835,7 @@ class RealtimeClient extends RealtimeEventHandler {
|
|
834
835
|
* @param config.videoConfig.screenConfig - Optional, Screen share configuration if videoInputDeviceId is 'screenShare' see https://www.volcengine.com/docs/6348/104481#screenconfig for more details. |
|
835
836
|
* 可选,屏幕共享配置,如果 videoInputDeviceId 是 'screenShare',请参考 https://www.volcengine.com/docs/6348/104481#screenconfig 了解更多详情。
|
836
837
|
* @param config.prologueContent - Optional, Prologue content. | 可选,开场白内容。
|
838
|
+
* @param config.roomMode - Optional, Room mode. | 可选,房间模式。
|
837
839
|
*/ constructor(config){
|
838
840
|
super(config.debug), this._client = null, this.isConnected = false, this._isTestEnv = false, this._isSupportVideo = false;
|
839
841
|
this._config = config;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type ScreenConfig, type AudioPropertiesConfig, type IRTCEngine } from '@volcengine/rtc';
|
2
|
-
import { type CreateRoomData, type GetToken } from '@coze/api';
|
2
|
+
import { type CreateRoomData, type GetToken, type RoomMode } from '@coze/api';
|
3
3
|
import * as RealtimeUtils from './utils';
|
4
4
|
import EventNames from './event-names';
|
5
5
|
import { RealtimeEventHandler } from './event-handler';
|
@@ -31,6 +31,7 @@ export interface RealtimeClientConfig {
|
|
31
31
|
videoConfig?: VideoConfig /** optional, Video configuration */;
|
32
32
|
isAutoSubscribeAudio?: boolean /** optional, Whether to automatically subscribe to bot reply audio streams, defaults to true */;
|
33
33
|
prologueContent?: string /** optional, Prologue content */;
|
34
|
+
roomMode?: RoomMode /** optional, Room mode */;
|
34
35
|
}
|
35
36
|
declare class RealtimeClient extends RealtimeEventHandler {
|
36
37
|
_config: RealtimeClientConfig;
|
@@ -82,6 +83,7 @@ declare class RealtimeClient extends RealtimeEventHandler {
|
|
82
83
|
* @param config.videoConfig.screenConfig - Optional, Screen share configuration if videoInputDeviceId is 'screenShare' see https://www.volcengine.com/docs/6348/104481#screenconfig for more details. |
|
83
84
|
* 可选,屏幕共享配置,如果 videoInputDeviceId 是 'screenShare',请参考 https://www.volcengine.com/docs/6348/104481#screenconfig 了解更多详情。
|
84
85
|
* @param config.prologueContent - Optional, Prologue content. | 可选,开场白内容。
|
86
|
+
* @param config.roomMode - Optional, Room mode. | 可选,房间模式。
|
85
87
|
*/
|
86
88
|
constructor(config: RealtimeClientConfig);
|
87
89
|
/**
|
package/dist/types/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type ScreenConfig, type AudioPropertiesConfig, type IRTCEngine } from '@volcengine/rtc';
|
2
|
-
import { type CreateRoomData, type GetToken } from '@coze/api';
|
2
|
+
import { type CreateRoomData, type GetToken, type RoomMode } from '@coze/api';
|
3
3
|
import * as RealtimeUtils from './utils';
|
4
4
|
import EventNames from './event-names';
|
5
5
|
import { RealtimeEventHandler } from './event-handler';
|
@@ -31,6 +31,7 @@ export interface RealtimeClientConfig {
|
|
31
31
|
videoConfig?: VideoConfig /** optional, Video configuration */;
|
32
32
|
isAutoSubscribeAudio?: boolean /** optional, Whether to automatically subscribe to bot reply audio streams, defaults to true */;
|
33
33
|
prologueContent?: string /** optional, Prologue content */;
|
34
|
+
roomMode?: RoomMode /** optional, Room mode */;
|
34
35
|
}
|
35
36
|
declare class RealtimeClient extends RealtimeEventHandler {
|
36
37
|
_config: RealtimeClientConfig;
|
@@ -82,6 +83,7 @@ declare class RealtimeClient extends RealtimeEventHandler {
|
|
82
83
|
* @param config.videoConfig.screenConfig - Optional, Screen share configuration if videoInputDeviceId is 'screenShare' see https://www.volcengine.com/docs/6348/104481#screenconfig for more details. |
|
83
84
|
* 可选,屏幕共享配置,如果 videoInputDeviceId 是 'screenShare',请参考 https://www.volcengine.com/docs/6348/104481#screenconfig 了解更多详情。
|
84
85
|
* @param config.prologueContent - Optional, Prologue content. | 可选,开场白内容。
|
86
|
+
* @param config.roomMode - Optional, Room mode. | 可选,房间模式。
|
85
87
|
*/
|
86
88
|
constructor(config: RealtimeClientConfig);
|
87
89
|
/**
|
package/dist/umd/index.js
CHANGED
@@ -301,7 +301,7 @@
|
|
301
301
|
/**
|
302
302
|
* en: Session updated
|
303
303
|
* zh: 会话更新
|
304
|
-
*/ EventNames["
|
304
|
+
*/ EventNames["SESSION_UPDATED"] = "server.session.updated";
|
305
305
|
return EventNames;
|
306
306
|
}(event_names_EventNames || {});
|
307
307
|
/* ESM default export */ const event_names = event_names_EventNames;
|
@@ -670,6 +670,7 @@
|
|
670
670
|
else {
|
671
671
|
const config = {};
|
672
672
|
if (this._config.prologueContent) config.prologue_content = this._config.prologueContent;
|
673
|
+
if (void 0 !== this._config.roomMode && null !== this._config.roomMode) config.room_mode = this._config.roomMode;
|
673
674
|
if (this._config.videoConfig) {
|
674
675
|
if (isScreenShareDevice(this._config.videoConfig.videoInputDeviceId)) config.video_config = {
|
675
676
|
stream_video_type: 'screen'
|
@@ -901,6 +902,7 @@
|
|
901
902
|
* @param config.videoConfig.screenConfig - Optional, Screen share configuration if videoInputDeviceId is 'screenShare' see https://www.volcengine.com/docs/6348/104481#screenconfig for more details. |
|
902
903
|
* 可选,屏幕共享配置,如果 videoInputDeviceId 是 'screenShare',请参考 https://www.volcengine.com/docs/6348/104481#screenconfig 了解更多详情。
|
903
904
|
* @param config.prologueContent - Optional, Prologue content. | 可选,开场白内容。
|
905
|
+
* @param config.roomMode - Optional, Room mode. | 可选,房间模式。
|
904
906
|
*/ constructor(config){
|
905
907
|
super(config.debug), this._client = null, this.isConnected = false, this._isTestEnv = false, this._isSupportVideo = false;
|
906
908
|
this._config = config;
|
package/package.json
CHANGED