@coze/realtime-api 1.2.1-beta.6 → 1.2.1-beta.7

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.
@@ -118,7 +118,7 @@ var EventNames = /*#__PURE__*/ function(EventNames) {
118
118
  */ EventNames["NETWORK_QUALITY"] = "client.network.quality";
119
119
  /**
120
120
  * en: Track ended
121
- * zh: 轨道结束
121
+ * zh: 断流事件
122
122
  */ EventNames["TRACK_ENDED"] = "client.track.ended";
123
123
  /**
124
124
  * en: Bot joined
package/dist/cjs/index.js CHANGED
@@ -231,7 +231,7 @@ var event_names_EventNames = /*#__PURE__*/ function(EventNames) {
231
231
  */ EventNames["NETWORK_QUALITY"] = "client.network.quality";
232
232
  /**
233
233
  * en: Track ended
234
- * zh: 轨道结束
234
+ * zh: 断流事件
235
235
  */ EventNames["TRACK_ENDED"] = "client.track.ended";
236
236
  /**
237
237
  * en: Bot joined
@@ -487,7 +487,7 @@ class EngineClient extends RealtimeEventHandler {
487
487
  if (!devices.audioInputs.length) throw new RealtimeAPIError(error_RealtimeError.DEVICE_ACCESS_ERROR, 'Failed to get audio devices');
488
488
  if (this._isSupportVideo && !devices.videoInputs.length) throw new RealtimeAPIError(error_RealtimeError.DEVICE_ACCESS_ERROR, 'Failed to get video devices');
489
489
  await this.engine.startAudioCapture(devices.audioInputs[0].deviceId);
490
- if (this._isSupportVideo) this.setVideoInputDevice((null == videoConfig ? void 0 : videoConfig.videoInputDeviceId) || devices.videoInputs[0].deviceId, null == videoConfig ? void 0 : videoConfig.videoOnDefault);
490
+ if (this._isSupportVideo) await this.setVideoInputDevice((null == videoConfig ? void 0 : videoConfig.videoInputDeviceId) || devices.videoInputs[0].deviceId, null == videoConfig ? void 0 : videoConfig.videoOnDefault);
491
491
  }
492
492
  async disconnect() {
493
493
  try {
@@ -81,7 +81,7 @@ var event_names_EventNames = /*#__PURE__*/ function(EventNames) {
81
81
  */ EventNames["NETWORK_QUALITY"] = "client.network.quality";
82
82
  /**
83
83
  * en: Track ended
84
- * zh: 轨道结束
84
+ * zh: 断流事件
85
85
  */ EventNames["TRACK_ENDED"] = "client.track.ended";
86
86
  /**
87
87
  * en: Bot joined
package/dist/esm/index.js CHANGED
@@ -204,7 +204,7 @@ var event_names_EventNames = /*#__PURE__*/ function(EventNames) {
204
204
  */ EventNames["NETWORK_QUALITY"] = "client.network.quality";
205
205
  /**
206
206
  * en: Track ended
207
- * zh: 轨道结束
207
+ * zh: 断流事件
208
208
  */ EventNames["TRACK_ENDED"] = "client.track.ended";
209
209
  /**
210
210
  * en: Bot joined
@@ -458,7 +458,7 @@ class EngineClient extends RealtimeEventHandler {
458
458
  if (!devices.audioInputs.length) throw new RealtimeAPIError(error_RealtimeError.DEVICE_ACCESS_ERROR, 'Failed to get audio devices');
459
459
  if (this._isSupportVideo && !devices.videoInputs.length) throw new RealtimeAPIError(error_RealtimeError.DEVICE_ACCESS_ERROR, 'Failed to get video devices');
460
460
  await this.engine.startAudioCapture(devices.audioInputs[0].deviceId);
461
- if (this._isSupportVideo) this.setVideoInputDevice((null == videoConfig ? void 0 : videoConfig.videoInputDeviceId) || devices.videoInputs[0].deviceId, null == videoConfig ? void 0 : videoConfig.videoOnDefault);
461
+ if (this._isSupportVideo) await this.setVideoInputDevice((null == videoConfig ? void 0 : videoConfig.videoInputDeviceId) || devices.videoInputs[0].deviceId, null == videoConfig ? void 0 : videoConfig.videoOnDefault);
462
462
  }
463
463
  async disconnect() {
464
464
  try {
@@ -101,7 +101,7 @@ declare enum EventNames {
101
101
  NETWORK_QUALITY = "client.network.quality",
102
102
  /**
103
103
  * en: Track ended
104
- * zh: 轨道结束
104
+ * zh: 断流事件
105
105
  */
106
106
  TRACK_ENDED = "client.track.ended",
107
107
  /**
@@ -101,7 +101,7 @@ declare enum EventNames {
101
101
  NETWORK_QUALITY = "client.network.quality",
102
102
  /**
103
103
  * en: Track ended
104
- * zh: 轨道结束
104
+ * zh: 断流事件
105
105
  */
106
106
  TRACK_ENDED = "client.track.ended",
107
107
  /**
package/dist/umd/index.js CHANGED
@@ -268,7 +268,7 @@
268
268
  */ EventNames["NETWORK_QUALITY"] = "client.network.quality";
269
269
  /**
270
270
  * en: Track ended
271
- * zh: 轨道结束
271
+ * zh: 断流事件
272
272
  */ EventNames["TRACK_ENDED"] = "client.track.ended";
273
273
  /**
274
274
  * en: Bot joined
@@ -525,7 +525,7 @@
525
525
  if (!devices.audioInputs.length) throw new RealtimeAPIError(error_RealtimeError.DEVICE_ACCESS_ERROR, 'Failed to get audio devices');
526
526
  if (this._isSupportVideo && !devices.videoInputs.length) throw new RealtimeAPIError(error_RealtimeError.DEVICE_ACCESS_ERROR, 'Failed to get video devices');
527
527
  await this.engine.startAudioCapture(devices.audioInputs[0].deviceId);
528
- if (this._isSupportVideo) this.setVideoInputDevice((null == videoConfig ? void 0 : videoConfig.videoInputDeviceId) || devices.videoInputs[0].deviceId, null == videoConfig ? void 0 : videoConfig.videoOnDefault);
528
+ if (this._isSupportVideo) await this.setVideoInputDevice((null == videoConfig ? void 0 : videoConfig.videoInputDeviceId) || devices.videoInputs[0].deviceId, null == videoConfig ? void 0 : videoConfig.videoOnDefault);
529
529
  }
530
530
  async disconnect() {
531
531
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coze/realtime-api",
3
- "version": "1.2.1-beta.6",
3
+ "version": "1.2.1-beta.7",
4
4
  "description": "A powerful real-time communication SDK for voice interactions with Coze AI bots | 扣子官方实时通信 SDK,用于与 Coze AI bots 进行语音交互",
5
5
  "keywords": [
6
6
  "coze",