trtc-electron-sdk 13.1.709-beta.1 → 13.2.709-beta.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/liteav/trtc.d.ts +18 -0
- package/liteav/trtc.js +18 -0
- package/package.json +1 -1
package/liteav/trtc.d.ts
CHANGED
|
@@ -2350,6 +2350,15 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2350
2350
|
* @param {TRTCVideoBufferType} bufferType - 指定视频数据结构类型
|
|
2351
2351
|
* @param {TRTCVideoRenderCallback | null} callback - 自定义渲染回调,传入 null 表示停止自定义渲染
|
|
2352
2352
|
* @return {number} 0:成功;<0:错误
|
|
2353
|
+
*
|
|
2354
|
+
* @example
|
|
2355
|
+
* import TRTCCloud from 'trtc-electron-sdk';
|
|
2356
|
+
* const trtcCloud = TRTCCloud.getTRTCShareInstance();
|
|
2357
|
+
* trtc.setLocalVideoRenderCallback(TRTCVideoPixelFormat.TRTCVideoPixelFormat_I420, TRTCVideoBufferType.TRTCVideoBufferType_Buffer, {
|
|
2358
|
+
* onRenderVideoFrame(userId, streamType, frame) {
|
|
2359
|
+
* // 处理本地视频帧的回调
|
|
2360
|
+
* }
|
|
2361
|
+
* });
|
|
2353
2362
|
*/
|
|
2354
2363
|
setLocalVideoRenderCallback(pixelFormat: TRTCVideoPixelFormat, bufferType: TRTCVideoBufferType, callback: TRTCVideoRenderCallback | null): number;
|
|
2355
2364
|
/**
|
|
@@ -2365,6 +2374,15 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2365
2374
|
* @param {TRTCVideoBufferType} bufferType - 指定视频数据结构类型
|
|
2366
2375
|
* @param {TRTCVideoRenderCallback | null} callback - 自定义渲染回调,传入 null 表示停止自定义渲染
|
|
2367
2376
|
* @return {number} 0:成功;<0:错误
|
|
2377
|
+
*
|
|
2378
|
+
* @example
|
|
2379
|
+
* import TRTCCloud from 'trtc-electron-sdk';
|
|
2380
|
+
* const trtcCloud = TRTCCloud.getTRTCShareInstance();
|
|
2381
|
+
* trtc.setRemoteVideoRenderCallback('remoteUserId', TRTCVideoPixelFormat.TRTCVideoPixelFormat_I420, TRTCVideoBufferType.TRTCVideoBufferType_Buffer, {
|
|
2382
|
+
* onRenderVideoFrame(userId, streamType, frame) {
|
|
2383
|
+
* // 处理远端视频帧的回调
|
|
2384
|
+
* }
|
|
2385
|
+
* });
|
|
2368
2386
|
*/
|
|
2369
2387
|
setRemoteVideoRenderCallback(userId: string, pixelFormat: TRTCVideoPixelFormat, bufferType: TRTCVideoBufferType, callback: TRTCVideoRenderCallback | null): number;
|
|
2370
2388
|
/**
|
package/liteav/trtc.js
CHANGED
|
@@ -3988,6 +3988,15 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3988
3988
|
* @param {TRTCVideoBufferType} bufferType - 指定视频数据结构类型
|
|
3989
3989
|
* @param {TRTCVideoRenderCallback | null} callback - 自定义渲染回调,传入 null 表示停止自定义渲染
|
|
3990
3990
|
* @return {number} 0:成功;<0:错误
|
|
3991
|
+
*
|
|
3992
|
+
* @example
|
|
3993
|
+
* import TRTCCloud from 'trtc-electron-sdk';
|
|
3994
|
+
* const trtcCloud = TRTCCloud.getTRTCShareInstance();
|
|
3995
|
+
* trtc.setLocalVideoRenderCallback(TRTCVideoPixelFormat.TRTCVideoPixelFormat_I420, TRTCVideoBufferType.TRTCVideoBufferType_Buffer, {
|
|
3996
|
+
* onRenderVideoFrame(userId, streamType, frame) {
|
|
3997
|
+
* // 处理本地视频帧的回调
|
|
3998
|
+
* }
|
|
3999
|
+
* });
|
|
3991
4000
|
*/
|
|
3992
4001
|
setLocalVideoRenderCallback(pixelFormat, bufferType, callback) {
|
|
3993
4002
|
try {
|
|
@@ -4037,6 +4046,15 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4037
4046
|
* @param {TRTCVideoBufferType} bufferType - 指定视频数据结构类型
|
|
4038
4047
|
* @param {TRTCVideoRenderCallback | null} callback - 自定义渲染回调,传入 null 表示停止自定义渲染
|
|
4039
4048
|
* @return {number} 0:成功;<0:错误
|
|
4049
|
+
*
|
|
4050
|
+
* @example
|
|
4051
|
+
* import TRTCCloud from 'trtc-electron-sdk';
|
|
4052
|
+
* const trtcCloud = TRTCCloud.getTRTCShareInstance();
|
|
4053
|
+
* trtc.setRemoteVideoRenderCallback('remoteUserId', TRTCVideoPixelFormat.TRTCVideoPixelFormat_I420, TRTCVideoBufferType.TRTCVideoBufferType_Buffer, {
|
|
4054
|
+
* onRenderVideoFrame(userId, streamType, frame) {
|
|
4055
|
+
* // 处理远端视频帧的回调
|
|
4056
|
+
* }
|
|
4057
|
+
* });
|
|
4040
4058
|
*/
|
|
4041
4059
|
setRemoteVideoRenderCallback(userId, pixelFormat, bufferType, callback) {
|
|
4042
4060
|
try {
|