UNPKG

@daily-co/daily-react

Version:

Daily React makes it easier to integrate [@daily-co/daily-js](https://www.npmjs.com/package/@daily-co/daily-js) in React applications.

26 lines (25 loc) 1.05 kB
import { DailyEventObjectNonFatalError, DailyTrackState } from '@daily-co/daily-js'; import { Reconstruct } from '../types/Reconstruct'; export interface ScreenShare { local: boolean; screenAudio: DailyTrackState; screenVideo: DailyTrackState; screenId: string; session_id: string; } type DailyEventObjectScreenShareError = Reconstruct<DailyEventObjectNonFatalError, 'type', 'screen-share-error'>; interface UseScreenShareArgs { onError?(ev: DailyEventObjectScreenShareError): void; onLocalScreenShareStarted?(): void; onLocalScreenShareStopped?(): void; } /** * Allows access to information about shared screens, and methods to start or stop a local screen share. */ export declare const useScreenShare: ({ onError, onLocalScreenShareStarted, onLocalScreenShareStopped, }?: UseScreenShareArgs) => { isSharingScreen: boolean; screens: ScreenShare[]; startScreenShare: (properties?: import("@daily-co/daily-js").DailyStartScreenShareOptions | undefined) => void; stopScreenShare: () => void; }; export {};