From 80c8bd80d7a921b1beb32ddca90041100cdf907a Mon Sep 17 00:00:00 2001 From: wataru Date: Tue, 16 Aug 2022 08:54:52 +0900 Subject: [PATCH] fix: add type of createScreenVideoTrack enable and disable --- dist/index.d.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/dist/index.d.ts b/dist/index.d.ts index 9a0ec98..bf26bfe 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -162,6 +162,30 @@ export declare function createMicrophoneAudioTrack(config?: MicrophoneAudioTrack track: IMicrophoneAudioTrack | null; error: AgoraRTCError | null; }; +/** + * Creates and stores the screenshare tracks + * @param config Config for the screenshare tracks + * @param withAudio Try and create audio track as well (needs browser support) + * @returns React hook that can be used to access the screenshare tracks + * @category Wrapper + */ + export declare function createScreenVideoTrack(config: ScreenVideoTrackInitConfig, withAudio: 'enable'): () => { + ready: boolean; + tracks: [ILocalVideoTrack, ILocalAudioTrack]; + error: AgoraRTCError | null; +}; +/** + * Creates and stores the screenshare tracks + * @param config Config for the screenshare tracks + * @param withAudio Try and create audio track as well (needs browser support) + * @returns React hook that can be used to access the screenshare tracks + * @category Wrapper + */ + export declare function createScreenVideoTrack(config: ScreenVideoTrackInitConfig, withAudio: 'disable'): () => { + ready: boolean; + track: ILocalVideoTrack; + error: AgoraRTCError | null; +}; /** * Creates and stores the screenshare tracks * @param config Config for the screenshare tracks