From 6c660e041fd1adfa4ed9080442b491591eb4452a Mon Sep 17 00:00:00 2001 From: gxz Date: Fri, 27 Sep 2024 19:36:04 +0800 Subject: [PATCH] chore: optimize --- .../renderer/examples/advanced/ScreenShare/ScreenShare.tsx | 4 ++-- .../src/renderer/examples/hook/ScreenShare/ScreenShare.tsx | 4 ++-- ts/Private/internal/RtcEngineExInternal.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/src/renderer/examples/advanced/ScreenShare/ScreenShare.tsx b/example/src/renderer/examples/advanced/ScreenShare/ScreenShare.tsx index 9b535bbdd..cdbf22eed 100644 --- a/example/src/renderer/examples/advanced/ScreenShare/ScreenShare.tsx +++ b/example/src/renderer/examples/advanced/ScreenShare/ScreenShare.tsx @@ -192,7 +192,7 @@ export default class ScreenShare ScreenCaptureSourceType.ScreencapturesourcetypeScreen ) { this.engine?.startScreenCaptureByDisplayId( - targetSource.sourceId, + targetSource.sourceId!, {}, { dimensions: { width, height }, @@ -208,7 +208,7 @@ export default class ScreenShare ); } else { this.engine?.startScreenCaptureByWindowId( - targetSource.sourceId, + targetSource.sourceId!, {}, { dimensions: { width, height }, diff --git a/example/src/renderer/examples/hook/ScreenShare/ScreenShare.tsx b/example/src/renderer/examples/hook/ScreenShare/ScreenShare.tsx index c1e6efca1..3d36c3ebf 100644 --- a/example/src/renderer/examples/hook/ScreenShare/ScreenShare.tsx +++ b/example/src/renderer/examples/hook/ScreenShare/ScreenShare.tsx @@ -131,7 +131,7 @@ export default function ScreenShare() { ScreenCaptureSourceType.ScreencapturesourcetypeScreen ) { engine.current.startScreenCaptureByDisplayId( - targetSource.sourceId, + targetSource.sourceId!, {}, { dimensions: { width, height }, @@ -147,7 +147,7 @@ export default function ScreenShare() { ); } else { engine.current.startScreenCaptureByWindowId( - targetSource.sourceId, + targetSource.sourceId!, {}, { dimensions: { width, height }, diff --git a/ts/Private/internal/RtcEngineExInternal.ts b/ts/Private/internal/RtcEngineExInternal.ts index 1ab1516a9..ff1db3e03 100644 --- a/ts/Private/internal/RtcEngineExInternal.ts +++ b/ts/Private/internal/RtcEngineExInternal.ts @@ -515,7 +515,7 @@ export class RtcEngineExInternal extends IRtcEngineExImpl { value.iconImage.length! ); } - value.sourceDisplayId = parseIntPtr2Number(value.sourceDisplayId); + value.sourceDisplayId = parseIntPtr2Number(value.sourceDisplayId!); return value; } );