@tencentcloud/tuiroom-engine-js 3.0.0 → 3.0.1

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/index.d.ts CHANGED
@@ -333,6 +333,16 @@ type TUIConferenceModifyInfo = {
333
333
  roomName?: string;
334
334
  };
335
335
  };
336
+ /**
337
+ * 自动播放失败时回调参数结构体
338
+ *
339
+ * userId 用户ID
340
+ * resume 恢复播放的回调函数
341
+ */
342
+ type TUIAutoPlayCallbackInfo = {
343
+ userId: string;
344
+ resume: () => void;
345
+ };
336
346
  declare enum TUIInvitationStatus {
337
347
  kNone = 0,
338
348
  kPending = 1,
@@ -799,7 +809,18 @@ declare enum TUIRoomEvents {
799
809
  * console.log('roomEngine.onUserScreenCaptureStopped');
800
810
  * });
801
811
  */
802
- onUserScreenCaptureStopped = "onUserScreenCaptureStopped"
812
+ onUserScreenCaptureStopped = "onUserScreenCaptureStopped",
813
+ /**
814
+ * @description 自动播放失败的事件,监听到该事件后可以引导用户与页面进行交互
815
+ * @default 'onAutoPlayFailed'
816
+ * @event TUIRoomEvents#onAutoPlayFailed
817
+ * @example
818
+ * const roomEngine = new TUIRoomEngine();
819
+ * roomEngine.on(TUIRoomEvents.onAutoPlayFailed, ({userId, resume}) => {
820
+ * // 自动播放失败,引导用户与页面进行交互
821
+ * });
822
+ */
823
+ onAutoPlayFailed = "onAutoPlayFailed"
803
824
  }
804
825
  declare enum TUIRoomDeviceMangerEvents {
805
826
  /**
@@ -1186,11 +1207,11 @@ declare enum TUILiveLayoutManagerEvents {
1186
1207
  * const roomEngine = new TUIRoomEngine();
1187
1208
  * const liveLayoutManager = roomEngine.getLiveLayoutManager();
1188
1209
  * const callback = (roomId, layoutInfo) => {
1189
- * console.log('liveLayoutManager.onLiveVideoLayoutListChanged', roomId, layoutInfo);
1210
+ * console.log('liveLayoutManager.onLiveVideoLayoutChanged', roomId, layoutInfo);
1190
1211
  * };
1191
- * liveLayoutManager.on(TUILiveLayoutManagerEvents.onLiveVideoLayoutListChanged, callback);
1212
+ * liveLayoutManager.on(TUILiveLayoutManagerEvents.onLiveVideoLayoutChanged, callback);
1192
1213
  */
1193
- onLiveVideoLayoutListChanged = "onLiveVideoLayoutListChanged"
1214
+ onLiveVideoLayoutChanged = "onLiveVideoLayoutChanged"
1194
1215
  }
1195
1216
 
1196
1217
  declare class Logger {
@@ -1919,9 +1940,9 @@ declare class TUILiveLayoutManager {
1919
1940
  * const roomEngine = new TUIRoomEngine();
1920
1941
  * const liveLayoutManager = roomEngine.getLiveLayoutManager();
1921
1942
  * const callback = (roomId, layoutInfo) => {
1922
- * console.log('liveLayoutManager.onLiveVideoLayoutListChanged', roomId, layoutInfo);
1943
+ * console.log('liveLayoutManager.onLiveVideoLayoutChanged', roomId, layoutInfo);
1923
1944
  * };
1924
- * liveLayoutManager.on(TUILiveLayoutManagerEvents.onLiveVideoLayoutListChanged, callback);
1945
+ * liveLayoutManager.on(TUILiveLayoutManagerEvents.onLiveVideoLayoutChanged, callback);
1925
1946
  */
1926
1947
  on(event: TUILiveLayoutManagerEvents, func: (...args: any[]) => void): void;
1927
1948
  /**
@@ -1933,9 +1954,9 @@ declare class TUILiveLayoutManager {
1933
1954
  * const roomEngine = new TUIRoomEngine();
1934
1955
  * const liveLayoutManager = roomEngine.getLiveLayoutManager();
1935
1956
  * const callback = (roomId, layoutInfo) => {
1936
- * console.log('liveLayoutManager.onLiveVideoLayoutListChanged', roomId, layoutInfo);
1957
+ * console.log('liveLayoutManager.onLiveVideoLayoutChanged', roomId, layoutInfo);
1937
1958
  * };
1938
- * liveLayoutManager.off(TUILiveLayoutManagerEvents.onLiveVideoLayoutListChanged, callback);
1959
+ * liveLayoutManager.off(TUILiveLayoutManagerEvents.onLiveVideoLayoutChanged, callback);
1939
1960
  */
1940
1961
  off(event: TUILiveLayoutManagerEvents, func: (...args: any[]) => void): void;
1941
1962
  /**
@@ -3179,6 +3200,7 @@ declare class TUIRoomEngine {
3179
3200
  */
3180
3201
  off(event: string, func: (...args: any[]) => void): void;
3181
3202
  private handleTrtcCloudBindEvent;
3203
+ private handleTrtcAutoPlayFailedEvent;
3182
3204
  /**
3183
3205
  * 获取摄像头设备列表<br>
3184
3206
  * @returns {Promise<TRTCDeviceInfo[]>} 摄像头列表
@@ -3407,4 +3429,4 @@ declare class TUIRoomEngine {
3407
3429
  }
3408
3430
 
3409
3431
  export { TRTCRole, TUIAudioQuality, TUIAudioRoute, TUICaptureSourceType, TUIChangeReason, TUIConferenceCancelReason, TUIConferenceInvitationManager, TUIConferenceInvitationManagerEvents, TUIConferenceListManager, TUIConferenceListManagerEvents, TUIConferenceStatus, TUIErrorCode, TUIInvitationCode, TUIInvitationRejectedReason, TUIInvitationStatus, TUIKickedOutOfRoomReason, TUILiveLayoutManagerEvents, TUILiveListManagerEvents, TUILiveModifyFlag, TUIMediaDevice, TUIMediaDeviceState, TUIMediaDeviceType, TUINetworkQuality, TUIRequestAction, TUIRequestCallbackType, TUIResolutionMode, TUIRole, TUIRoomDeviceManager, TUIRoomDeviceMangerEvents, TUIRoomDismissedReason, TUIRoomEvents, TUIRoomType, TUISeatMode, TUIVideoQuality, TUIVideoStreamType, TUIRoomEngine as default };
3410
- export type { TUIConferenceInfo, TUIConferenceModifyInfo, TUIDeviceInfo, TUIEnterRoomOptions, TUIInvitation, TUILiveInfo, TUILiveListResult, TUILiveModifyInfo, TUILoginUserInfo, TUIMessage, TUINetwork, TUIRequest, TUIRequestCallback, TUIRoomInfo, TUISeatInfo, TUISeatLockParams, TUIUserInfo, TUIVideoEncoderParams };
3432
+ export type { TUIAutoPlayCallbackInfo, TUIConferenceInfo, TUIConferenceModifyInfo, TUIDeviceInfo, TUIEnterRoomOptions, TUIInvitation, TUILiveInfo, TUILiveListResult, TUILiveModifyInfo, TUILoginUserInfo, TUIMessage, TUINetwork, TUIRequest, TUIRequestCallback, TUIRoomInfo, TUISeatInfo, TUISeatLockParams, TUIUserInfo, TUIVideoEncoderParams };