@tencentcloud/tuiroom-engine-electron 3.0.0 → 3.0.6-beta.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.cjs.js +3 -1
- package/index.d.ts +112 -4
- package/index.esm.js +3 -1
- package/index.js +3 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1186,11 +1186,11 @@ declare enum TUILiveLayoutManagerEvents {
|
|
|
1186
1186
|
* const roomEngine = new TUIRoomEngine();
|
|
1187
1187
|
* const liveLayoutManager = roomEngine.getLiveLayoutManager();
|
|
1188
1188
|
* const callback = (roomId, layoutInfo) => {
|
|
1189
|
-
* console.log('liveLayoutManager.
|
|
1189
|
+
* console.log('liveLayoutManager.onLiveVideoLayoutChanged', roomId, layoutInfo);
|
|
1190
1190
|
* };
|
|
1191
|
-
* liveLayoutManager.on(TUILiveLayoutManagerEvents.
|
|
1191
|
+
* liveLayoutManager.on(TUILiveLayoutManagerEvents.onLiveVideoLayoutChanged, callback);
|
|
1192
1192
|
*/
|
|
1193
|
-
|
|
1193
|
+
onLiveVideoLayoutChanged = "onLiveVideoLayoutChanged"
|
|
1194
1194
|
}
|
|
1195
1195
|
|
|
1196
1196
|
declare class Logger {
|
|
@@ -1894,6 +1894,102 @@ declare class TUILiveListManager {
|
|
|
1894
1894
|
private handleLiveInfoChangeEvent;
|
|
1895
1895
|
}
|
|
1896
1896
|
|
|
1897
|
+
/**
|
|
1898
|
+
* 直播自定义布局插件
|
|
1899
|
+
* @class TUILiveLayoutManager
|
|
1900
|
+
*/
|
|
1901
|
+
declare class TUILiveLayoutManager {
|
|
1902
|
+
private liveLayoutManagerWASM;
|
|
1903
|
+
private logger;
|
|
1904
|
+
private static liveLayoutManager;
|
|
1905
|
+
constructor(options: {
|
|
1906
|
+
Module: any;
|
|
1907
|
+
logger: Logger;
|
|
1908
|
+
roomEngineWASM: any;
|
|
1909
|
+
});
|
|
1910
|
+
private observerFunction;
|
|
1911
|
+
private handleLiveLayoutChangeEvent;
|
|
1912
|
+
private JSCallNativeFunctionPromise;
|
|
1913
|
+
/**
|
|
1914
|
+
* 监听 TUILiveLayoutManager 事件
|
|
1915
|
+
* @param {TUILiveLayoutManagerEvents} event 事件名
|
|
1916
|
+
* @param func 事件回调函数
|
|
1917
|
+
*
|
|
1918
|
+
* @example
|
|
1919
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1920
|
+
* const liveLayoutManager = roomEngine.getLiveLayoutManager();
|
|
1921
|
+
* const callback = (roomId, layoutInfo) => {
|
|
1922
|
+
* console.log('liveLayoutManager.onLiveVideoLayoutChanged', roomId, layoutInfo);
|
|
1923
|
+
* };
|
|
1924
|
+
* liveLayoutManager.on(TUILiveLayoutManagerEvents.onLiveVideoLayoutChanged, callback);
|
|
1925
|
+
*/
|
|
1926
|
+
on(event: TUILiveLayoutManagerEvents, func: (...args: any[]) => void): void;
|
|
1927
|
+
/**
|
|
1928
|
+
* 取消 TUILiveLayoutManager 事件监听
|
|
1929
|
+
* @param {TUILiveLayoutManagerEvents} event 事件名
|
|
1930
|
+
* @param {Function} func 事件回调函数
|
|
1931
|
+
*
|
|
1932
|
+
* @example
|
|
1933
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1934
|
+
* const liveLayoutManager = roomEngine.getLiveLayoutManager();
|
|
1935
|
+
* const callback = (roomId, layoutInfo) => {
|
|
1936
|
+
* console.log('liveLayoutManager.onLiveVideoLayoutChanged', roomId, layoutInfo);
|
|
1937
|
+
* };
|
|
1938
|
+
* liveLayoutManager.off(TUILiveLayoutManagerEvents.onLiveVideoLayoutChanged, callback);
|
|
1939
|
+
*/
|
|
1940
|
+
off(event: TUILiveLayoutManagerEvents, func: (...args: any[]) => void): void;
|
|
1941
|
+
/**
|
|
1942
|
+
* 设置自定义布局信息
|
|
1943
|
+
*
|
|
1944
|
+
* @param {string} roomId 直播房间 ID
|
|
1945
|
+
* @param {string} layoutInfo 自定义布局信息, 格式为 JSON 字符串
|
|
1946
|
+
* @returns {Promise<void>}
|
|
1947
|
+
*
|
|
1948
|
+
* @example
|
|
1949
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1950
|
+
* const liveLayoutManager = roomEngine.getLiveLayoutManager();
|
|
1951
|
+
* liveLayoutManager.setLiveStreamLayoutInfo('roomId', '{
|
|
1952
|
+
* // 设置画布大小
|
|
1953
|
+
* "VideoEncode": {
|
|
1954
|
+
* "Width": 1920,
|
|
1955
|
+
* "Height": 1080,
|
|
1956
|
+
* },
|
|
1957
|
+
* "LayoutMode": 0, // 0~9 内置布局模板, 1000自定义布局, 只有1000时候才能修改LayoutInfo,目前只支持 0 和 1000
|
|
1958
|
+
* // 设置画面布局
|
|
1959
|
+
* "LayoutInfo": {
|
|
1960
|
+
* "LayoutList": [
|
|
1961
|
+
* {
|
|
1962
|
+
* "LocationX": 0, // 以画面左上角为原点的 x 坐标
|
|
1963
|
+
* "LocationY": 0, // 以画面左上角为原点的 y 坐标
|
|
1964
|
+
* "ImageWidth": 1920, // 调整后的画面宽度
|
|
1965
|
+
* "ImageHeight": 1080, // 调整后的画面高度
|
|
1966
|
+
* "ZOrder": 0, // 画面层级
|
|
1967
|
+
* "StreamType": 0, // 0 摄像头, 1 屏幕共享, 2 白板, 3 自定义
|
|
1968
|
+
* "Member_Account": "admin001", // 该路流的用户ID
|
|
1969
|
+
* "BackgroundImageUrl": "ImageUrl",
|
|
1970
|
+
* "RoomId": "roomId",
|
|
1971
|
+
* "BackgroundColor": "0x1F212C",
|
|
1972
|
+
*
|
|
1973
|
+
* }
|
|
1974
|
+
* ],
|
|
1975
|
+
* // 设置最大画面,只能有一路
|
|
1976
|
+
* "MaxUserLayout": {
|
|
1977
|
+
* "LocationX": 0, // 以画面左上角为原点的 x 坐标
|
|
1978
|
+
* "LocationY": 0, // 以画面左上角为原点的 y 坐标
|
|
1979
|
+
* "ImageWidth": 1920, // 调整后的画面宽度
|
|
1980
|
+
* "ImageHeight": 1080, // 调整后的画面高度
|
|
1981
|
+
* "ZOrder": 0, // 层级
|
|
1982
|
+
* "StreamType": 0, // 0为摄像头, 1为屏幕共享
|
|
1983
|
+
* "Member_Account": "admin001",
|
|
1984
|
+
* "BackgroundImageUrl": "ImageUrl", // 可以设置看看,可能在最大画面时候没作用
|
|
1985
|
+
* "RoomId":"roomId",
|
|
1986
|
+
* "BackgroundColor":"0x1F212C"
|
|
1987
|
+
* }
|
|
1988
|
+
* }}');
|
|
1989
|
+
*/
|
|
1990
|
+
setLiveStreamLayoutInfo(roomId: string, layoutInfo: string): Promise<void>;
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1897
1993
|
/**
|
|
1898
1994
|
* TUIRoomEngine 提供了音视频房间的能力
|
|
1899
1995
|
*
|
|
@@ -1908,6 +2004,7 @@ declare class TUIRoomEngine {
|
|
|
1908
2004
|
private conferenceListManager;
|
|
1909
2005
|
private conferenceInvitationManager;
|
|
1910
2006
|
private liveListManager;
|
|
2007
|
+
private liveLayoutManager;
|
|
1911
2008
|
private static userId;
|
|
1912
2009
|
private static sdkAppId;
|
|
1913
2010
|
private static Module;
|
|
@@ -3236,6 +3333,17 @@ declare class TUIRoomEngine {
|
|
|
3236
3333
|
* const liveListManager = roomEngine.getLiveListManager();
|
|
3237
3334
|
*/
|
|
3238
3335
|
getLiveListManager(): TUILiveListManager;
|
|
3336
|
+
/**
|
|
3337
|
+
* v3.0.0 版本起支持 getLiveLayoutManager 获取 TUILiveLayoutManager 模块
|
|
3338
|
+
*
|
|
3339
|
+
* @since v3.0.0
|
|
3340
|
+
* @returns {TUILiveLayoutManager}
|
|
3341
|
+
*
|
|
3342
|
+
* @example
|
|
3343
|
+
* const roomEngine = new TUIRoomEngine();
|
|
3344
|
+
* const liveLayoutManager = roomEngine.getLiveLayoutManager();
|
|
3345
|
+
*/
|
|
3346
|
+
getLiveLayoutManager(): TUILiveLayoutManager;
|
|
3239
3347
|
/**
|
|
3240
3348
|
* v2.6.0 版本起支持使用 getConferenceInvitationManager 获取 conferenceInvitation 模块
|
|
3241
3349
|
* @since v2.6.0
|
|
@@ -3278,4 +3386,4 @@ declare class TUIRoomEngine {
|
|
|
3278
3386
|
private static handleSetFramework;
|
|
3279
3387
|
}
|
|
3280
3388
|
|
|
3281
|
-
export { TRTCRole, TUIAudioQuality, TUIAudioRoute, TUICaptureSourceType, TUIChangeReason, TUIConferenceCancelReason, type TUIConferenceInfo, TUIConferenceInvitationManager, TUIConferenceInvitationManagerEvents, TUIConferenceListManager, TUIConferenceListManagerEvents, type TUIConferenceModifyInfo, TUIConferenceStatus, type TUIDeviceInfo, type TUIEnterRoomOptions, TUIErrorCode, type TUIInvitation, TUIInvitationCode, TUIInvitationRejectedReason, TUIInvitationStatus, TUIKickedOutOfRoomReason, type TUILiveInfo, TUILiveLayoutManagerEvents, TUILiveListManagerEvents, type TUILiveListResult, TUILiveModifyFlag, type TUILiveModifyInfo, type TUILoginUserInfo, TUIMediaDevice, TUIMediaDeviceState, TUIMediaDeviceType, type TUIMessage, type TUINetwork, TUINetworkQuality, type TUIRequest, TUIRequestAction, type TUIRequestCallback, TUIRequestCallbackType, TUIResolutionMode, TUIRole, TUIRoomDeviceManager, TUIRoomDeviceMangerEvents, TUIRoomDismissedReason, TUIRoomEvents, type TUIRoomInfo, TUIRoomType, type TUISeatInfo, type TUISeatLockParams, TUISeatMode, type TUIUserInfo, type TUIVideoEncoderParams, TUIVideoQuality, TUIVideoStreamType, TUIRoomEngine as default };
|
|
3389
|
+
export { TRTCRole, TUIAudioQuality, TUIAudioRoute, TUICaptureSourceType, TUIChangeReason, TUIConferenceCancelReason, type TUIConferenceInfo, TUIConferenceInvitationManager, TUIConferenceInvitationManagerEvents, TUIConferenceListManager, TUIConferenceListManagerEvents, type TUIConferenceModifyInfo, TUIConferenceStatus, type TUIDeviceInfo, type TUIEnterRoomOptions, TUIErrorCode, type TUIInvitation, TUIInvitationCode, TUIInvitationRejectedReason, TUIInvitationStatus, TUIKickedOutOfRoomReason, type TUILiveInfo, TUILiveLayoutManager, TUILiveLayoutManagerEvents, TUILiveListManager, TUILiveListManagerEvents, type TUILiveListResult, TUILiveModifyFlag, type TUILiveModifyInfo, type TUILoginUserInfo, TUIMediaDevice, TUIMediaDeviceState, TUIMediaDeviceType, type TUIMessage, type TUINetwork, TUINetworkQuality, type TUIRequest, TUIRequestAction, type TUIRequestCallback, TUIRequestCallbackType, TUIResolutionMode, TUIRole, TUIRoomDeviceManager, TUIRoomDeviceMangerEvents, TUIRoomDismissedReason, TUIRoomEvents, type TUIRoomInfo, TUIRoomType, type TUISeatInfo, type TUISeatLockParams, TUISeatMode, type TUIUserInfo, type TUIVideoEncoderParams, TUIVideoQuality, TUIVideoStreamType, TUIRoomEngine as default };
|