Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

fix: add type of createScreenVideoTrack enable and disable #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down