UNPKG

25.4 kBTypeScriptView Raw
1// Type definitions for daily-js
2// Project: https://github.com/daily-co/daily-js
3// Definitions by: Paul Kompfner <https://github.com/kompfner>
4
5/**
6 * --- BROWSER-SPECIFIC TYPES ---
7 */
8
9/// <reference lib="dom" />
10
11/**
12 * --- DAILY-JS API ---
13 */
14
15export type DailyLanguage =
16 | 'de'
17 | 'en'
18 | 'es'
19 | 'fi'
20 | 'fr'
21 | 'it'
22 | 'jp'
23 | 'ka'
24 | 'nl'
25 | 'no'
26 | 'pl'
27 | 'pt'
28 | 'ru'
29 | 'sv'
30 | 'tr';
31
32export type DailyLanguageSetting = DailyLanguage | 'user';
33
34export type DailyEvent =
35 | 'loading'
36 | 'load-attempt-failed'
37 | 'loaded'
38 | 'started-camera'
39 | 'camera-error'
40 | 'joining-meeting'
41 | 'joined-meeting'
42 | 'left-meeting'
43 | 'participant-joined'
44 | 'participant-updated'
45 | 'participant-left'
46 | 'track-started'
47 | 'track-stopped'
48 | 'recording-started'
49 | 'recording-stopped'
50 | 'recording-stats'
51 | 'recording-error'
52 | 'recording-upload-completed'
53 | 'recording-data'
54 | 'transcription-started'
55 | 'transcription-stopped'
56 | 'transcription-error'
57 | 'app-message'
58 | 'local-screen-share-started'
59 | 'local-screen-share-stopped'
60 | 'active-speaker-change'
61 | 'active-speaker-mode-change'
62 | 'network-quality-change'
63 | 'network-connection'
64 | 'fullscreen'
65 | 'exited-fullscreen'
66 | 'error'
67 | 'click'
68 | 'mousedown'
69 | 'mouseup'
70 | 'mouseover'
71 | 'mousemove'
72 | 'touchstart'
73 | 'touchmove'
74 | 'touchend'
75 | 'live-streaming-started'
76 | 'live-streaming-stopped'
77 | 'live-streaming-error'
78 | 'lang-updated'
79 | 'access-state-updated'
80 | 'meeting-session-updated'
81 | 'waiting-participant-added'
82 | 'waiting-participant-updated'
83 | 'waiting-participant-removed'
84 | 'theme-updated'
85 | 'receive-settings-updated'
86 | 'input-settings-updated'
87 | 'show-local-video-changed';
88
89export type DailyMeetingState =
90 | 'new'
91 | 'loading'
92 | 'loaded'
93 | 'joining-meeting'
94 | 'joined-meeting'
95 | 'left-meeting'
96 | 'error';
97
98export type DailyCameraErrorType =
99 | 'cam-in-use'
100 | 'mic-in-use'
101 | 'cam-mic-in-use';
102
103export type DailyFatalErrorType =
104 | 'ejected'
105 | 'nbf-room'
106 | 'nbf-token'
107 | 'exp-room'
108 | 'exp-token';
109
110export type DailyNetworkTopology = 'sfu' | 'peer';
111
112export interface DailyParticipantsObject {
113 local: DailyParticipant;
114 [id: string]: DailyParticipant;
115}
116
117export interface DailyBrowserInfo {
118 supported: boolean;
119 mobile: boolean;
120 name: string;
121 version: string;
122 supportsScreenShare: boolean;
123 supportsSfu: boolean;
124 supportsVideoProcessing: boolean;
125}
126
127export interface DailyThemeColors {
128 /**
129 * Main theme color. Used for primary actions and keyboard focus.
130 */
131 accent?: string;
132 /**
133 * Text color rendered on `accent`.
134 */
135 accentText?: string;
136 /**
137 * Background color.
138 */
139 background?: string;
140 /**
141 * Background color for highlighted elements.
142 */
143 backgroundAccent?: string;
144 /**
145 * Default text color, as rendered on `background` or `backgroundAccent`.
146 */
147 baseText?: string;
148 /**
149 * Default border color for bordered elements.
150 */
151 border?: string;
152 /**
153 * Background color for the call main area.
154 */
155 mainAreaBg?: string;
156 /**
157 * Background color for video tiles.
158 */
159 mainAreaBgAccent?: string;
160 /**
161 * Text color for text rendered inside the call main area, e.g. names.
162 */
163 mainAreaText?: string;
164 /**
165 * Text color for supportive, less emphasized, text.
166 */
167 supportiveText?: string;
168}
169
170export type DailyTheme = {
171 colors: DailyThemeColors;
172};
173export type DailyThemeConfig =
174 | DailyTheme
175 | {
176 light: DailyTheme;
177 dark: DailyTheme;
178 };
179
180export interface DailyGridLayoutConfig {
181 maxTilesPerPage?: number;
182 minTilesPerPage?: number;
183}
184export interface DailyLayoutConfig {
185 grid?: DailyGridLayoutConfig;
186}
187
188export interface DailyCallOptions {
189 url?: string;
190 token?: string;
191 lang?: DailyLanguageSetting;
192 activeSpeakerMode?: boolean;
193 showLeaveButton?: boolean;
194 showParticipantsBar?: boolean;
195 showLocalVideo?: boolean;
196 showFullscreenButton?: boolean;
197 iframeStyle?: Partial<CSSStyleDeclaration>;
198 customLayout?: boolean;
199 bodyClass?: string;
200 cssFile?: string;
201 cssText?: string;
202 dailyConfig?: DailyAdvancedConfig;
203 subscribeToTracksAutomatically?: boolean;
204 videoSource?: string | MediaStreamTrack | boolean;
205 audioSource?: string | MediaStreamTrack | boolean;
206 theme?: DailyThemeConfig;
207 layoutConfig?: DailyLayoutConfig;
208 receiveSettings?: DailyReceiveSettings;
209 inputSettings?: DailyInputSettings;
210 userName?: string;
211}
212
213export interface DailyLoadOptions extends DailyCallOptions {
214 baseUrl?: string;
215}
216
217export interface DailyAdvancedConfig {
218 experimentalChromeVideoMuteLightOff?: boolean;
219 experimentalGetUserMediaConstraintsModify?: (
220 constraints: MediaStreamConstraints
221 ) => void;
222 fastConnect?: boolean;
223 preferH264ForCam?: boolean;
224 preferH264ForScreenSharing?: boolean;
225 preferH264?: boolean;
226 disableSimulcast?: boolean;
227 h264Profile?: string;
228 camSimulcastEncodings?: any[];
229 screenSimulcastEncodings?: any[];
230 useDevicePreferenceCookies?: boolean;
231}
232
233export interface DailyTrackState {
234 subscribed: DailyTrackSubscriptionState;
235 state:
236 | 'blocked'
237 | 'off'
238 | 'sendable'
239 | 'loading'
240 | 'interrupted'
241 | 'playable';
242 blocked?: {
243 byDeviceMissing?: boolean;
244 byDeviceInUse?: boolean;
245 byPermissions?: boolean;
246 };
247 off?: {
248 byUser?: boolean;
249 byRemoteRequest?: boolean;
250 byBandwidth?: boolean;
251 };
252 track?: MediaStreamTrack;
253}
254
255export interface DailyParticipant {
256 // tracks
257 audioTrack?: MediaStreamTrack;
258 videoTrack?: MediaStreamTrack;
259 screenVideoTrack?: MediaStreamTrack;
260 screenAudioTrack?: MediaStreamTrack;
261
262 // legacy track state
263 audio: boolean;
264 video: boolean;
265 screen: boolean;
266
267 // new track state
268 tracks: {
269 audio: DailyTrackState;
270 video: DailyTrackState;
271 screenAudio: DailyTrackState;
272 screenVideo: DailyTrackState;
273 };
274
275 // user/session info
276 user_id: string;
277 user_name: string;
278 session_id: string;
279 joined_at: Date;
280 will_eject_at: Date;
281 local: boolean;
282 owner: boolean;
283 record: boolean;
284
285 // video element info (iframe-based calls using standard UI only)
286 cam_info: {} | DailyVideoElementInfo;
287 screen_info: {} | DailyVideoElementInfo;
288}
289
290export interface DailyWaitingParticipant {
291 id: string;
292 name: string;
293 awaitingAccess: SpecifiedDailyAccess;
294}
295
296export type DailyTrackSubscriptionState = 'staged' | boolean;
297
298export type DailyTrackSubscriptionOptions =
299 | DailyTrackSubscriptionState
300 | 'avatar'
301 | {
302 audio?: DailyTrackSubscriptionState;
303 video?: DailyTrackSubscriptionState;
304 screenVideo?: DailyTrackSubscriptionState;
305 screenAudio?: DailyTrackSubscriptionState;
306 };
307
308export interface DailyParticipantUpdateOptions {
309 setAudio?: boolean;
310 setVideo?: boolean;
311 setSubscribedTracks?: DailyTrackSubscriptionOptions;
312 eject?: true;
313 styles?: DailyParticipantCss;
314}
315
316export interface DailyWaitingParticipantUpdateOptions {
317 grantRequestedAccess?: boolean;
318}
319
320export interface DailyParticipantCss {
321 cam?: DailyParticipantStreamCss;
322 screen?: DailyParticipantStreamCss;
323}
324
325export interface DailyParticipantStreamCss {
326 div?: Partial<CSSStyleDeclaration>;
327 overlay?: Partial<CSSStyleDeclaration>;
328 video?: Partial<CSSStyleDeclaration>;
329}
330
331export interface DailyVideoElementInfo {
332 width: number;
333 height: number;
334 left: number;
335 top: number;
336 video_width: number;
337 video_height: number;
338}
339
340export interface DailyDeviceInfos {
341 camera: {} | MediaDeviceInfo;
342 mic: {} | MediaDeviceInfo;
343 speaker: {} | MediaDeviceInfo;
344}
345
346export interface DailyScreenCaptureOptions {
347 audio?: boolean;
348 maxWidth?: number;
349 maxHeight?: number;
350 chromeMediaSourceId?: string;
351 mediaStream?: MediaStream;
352}
353
354export interface DailyNetworkStats {
355 quality: number;
356 stats: {
357 latest: {
358 recvBitsPerSecond: number;
359 sendBitsPerSecond: number;
360 timestamp: number;
361 videoRecvBitsPerSecond: number;
362 videoRecvPacketLoss: number;
363 videoSendBitsPerSecond: number;
364 videoSendPacketLoss: number;
365 };
366 worstVideoRecvPacketLoss: number;
367 worstVideoSendPacketLoss: number;
368 };
369 threshold: 'good' | 'low' | 'very-low';
370}
371
372export interface DailyPendingRoomInfo {
373 roomUrlPendingJoin: string;
374}
375
376export interface DailyRoomInfo {
377 id: string;
378 name: string;
379 config: {
380 nbf?: number;
381 exp?: number;
382 max_participants?: number;
383 enable_screenshare?: boolean;
384 enable_chat?: boolean;
385 enable_knocking?: boolean;
386 enable_network_ui?: boolean;
387 enable_prejoin_ui?: boolean;
388 enable_video_processing_ui?: boolean;
389 start_video_off?: boolean;
390 start_audio_off?: boolean;
391 owner_only_broadcast?: boolean;
392 audio_only?: boolean;
393 enable_recording?: string;
394 enable_dialin?: boolean;
395 autojoin?: boolean;
396 eject_at_room_exp?: boolean;
397 eject_after_elapsed?: number;
398 lang?: '' | DailyLanguageSetting;
399 sfu_switchover?: number;
400 signaling_impl?: string;
401 geo?: string;
402 };
403 domainConfig: {
404 hide_daily_branding?: boolean;
405 redirect_on_meeting_exit?: string;
406 hipaa?: boolean;
407 sfu_impl?: string;
408 signaling_impl?: string;
409 sfu_switchover?: number;
410 lang?: '' | DailyLanguageSetting;
411 max_api_rooms?: number;
412 webhook_meeting_end?: any;
413 max_live_streams?: number;
414 enable_network_ui?: boolean;
415 enable_prejoin_ui?: boolean;
416 enable_video_processing_ui?: boolean;
417 };
418 tokenConfig: {
419 eject_at_token_exp?: boolean;
420 eject_after_elapsed?: boolean;
421 nbf?: number;
422 exp?: number;
423 is_owner?: boolean;
424 user_name?: string;
425 user_id?: string;
426 enable_screenshare?: boolean;
427 start_video_off?: boolean;
428 start_audio_off?: boolean;
429 enable_recording?: string;
430 start_cloud_recording?: boolean;
431 close_tab_on_exit?: boolean;
432 redirect_on_meeting_exit?: string;
433 lang?: '' | DailyLanguageSetting;
434 };
435 dialInPIN?: string;
436}
437
438export interface DailyMeetingSession {
439 id: string;
440}
441
442export interface DailyVideoReceiveSettings {
443 layer?: number;
444}
445export interface DailySingleParticipantReceiveSettings {
446 video?: DailyVideoReceiveSettings;
447 screenVideo?: DailyVideoReceiveSettings;
448}
449
450export interface DailyReceiveSettings {
451 [participantIdOrBase: string]: DailySingleParticipantReceiveSettings;
452}
453
454export interface DailyVideoReceiveSettingsUpdates {
455 layer?: number | 'inherit';
456}
457
458export interface DailySingleParticipantReceiveSettingsUpdates {
459 video?: DailyVideoReceiveSettingsUpdates | 'inherit';
460 screenVideo?: DailyVideoReceiveSettingsUpdates | 'inherit';
461}
462
463export interface DailyReceiveSettingsUpdates {
464 [participantIdOrBaseOrStar: string]:
465 | DailySingleParticipantReceiveSettingsUpdates
466 | 'inherit';
467}
468
469export interface DailyInputSettings {
470 video?: DailyInputVideoSettings;
471}
472
473export interface DailyInputVideoSettings {
474 processor?: DailyInputVideoProcessorSettings;
475}
476export interface DailyInputVideoProcessorSettings {
477 type: 'none' | 'background-blur';
478 config?: {};
479}
480export interface DailyEventObjectNoPayload {
481 action: Extract<
482 DailyEvent,
483 | 'loading'
484 | 'loaded'
485 | 'joining-meeting'
486 | 'left-meeting'
487 | 'recording-stopped'
488 | 'recording-stats'
489 | 'recording-error'
490 | 'recording-upload-completed'
491 | 'fullscreen'
492 | 'exited-fullscreen'
493 | 'live-streaming-started'
494 | 'live-streaming-stopped'
495 >;
496}
497
498export interface DailyEventObjectCameraError {
499 action: Extract<DailyEvent, 'camera-error'>;
500 errorMsg: {
501 errorMsg: string;
502 audioOk?: boolean;
503 videoOk?: boolean;
504 };
505 error?: {
506 type: DailyCameraErrorType;
507 localizedMsg?: string;
508 };
509}
510
511export interface DailyEventObjectFatalError {
512 action: Extract<DailyEvent, 'error'>;
513 errorMsg: string;
514 error?: {
515 type: DailyFatalErrorType;
516 localizedMsg?: string;
517 };
518}
519
520export interface DailyEventObjectGenericError {
521 action: Extract<DailyEvent, 'load-attempt-failed' | 'live-streaming-error'>;
522 errorMsg: string;
523}
524
525export interface DailyEventObjectParticipants {
526 action: Extract<DailyEvent, 'joined-meeting'>;
527 participants: DailyParticipantsObject;
528}
529
530export interface DailyEventObjectParticipant {
531 action: Extract<
532 DailyEvent,
533 'participant-joined' | 'participant-updated' | 'participant-left'
534 >;
535 participant: DailyParticipant;
536}
537
538export interface DailyEventObjectWaitingParticipant {
539 action: Extract<
540 DailyEvent,
541 | 'waiting-participant-added'
542 | 'waiting-participant-updated'
543 | 'waiting-participant-removed'
544 >;
545 participant: DailyWaitingParticipant;
546}
547
548export interface DailyEventObjectAccessState extends DailyAccessState {
549 action: Extract<DailyEvent, 'access-state-updated'>;
550}
551
552export interface DailyEventObjectMeetingSessionUpdated {
553 action: Extract<DailyEvent, 'meeting-session-updated'>;
554 meetingSession: DailyMeetingSession;
555}
556
557export interface DailyEventObjectTrack {
558 action: Extract<DailyEvent, 'track-started' | 'track-stopped'>;
559 participant: DailyParticipant | null; // null if participant left meeting
560 track: MediaStreamTrack;
561}
562
563export interface DailyEventObjectRecordingStarted {
564 action: Extract<DailyEvent, 'recording-started'>;
565 local?: boolean;
566 recordingId?: string;
567 startedBy?: string;
568 type?: string;
569 layout?: DailyStreamingLayoutConfig;
570}
571
572export interface DailyEventObjectMouseEvent {
573 action: Extract<
574 DailyEvent,
575 'click' | 'mousedown' | 'mouseup' | 'mouseover' | 'mousemove'
576 >;
577 event: {
578 type: string;
579 button: number;
580 x: number;
581 y: number;
582 pageX: number;
583 pageY: number;
584 screenX: number;
585 screenY: number;
586 offsetX: number;
587 offsetY: number;
588 altKey: boolean;
589 ctrlKey: boolean;
590 metaKey: boolean;
591 shiftKey: boolean;
592 };
593 participant: DailyParticipant;
594}
595
596export interface DailyEventObjectTouchEvent {
597 action: Extract<DailyEvent, 'touchstart' | 'touchmove' | 'touchend'>;
598 event: {
599 type: string;
600 altKey: boolean;
601 ctrlKey: boolean;
602 metaKey: boolean;
603 shiftKey: boolean;
604 };
605 participant: DailyParticipant;
606}
607
608export interface DailyEventObjectNetworkQualityEvent {
609 action: Extract<DailyEvent, 'network-quality-change'>;
610 threshold: 'good' | 'low' | 'very-low';
611 quality: number;
612}
613
614export type NetworkConnectionType = 'signaling' | 'peer-to-peer' | 'sfu';
615
616export interface DailyEventObjectNetworkConnectionEvent {
617 action: Extract<DailyEvent, 'network-connection'>;
618 type: NetworkConnectionType;
619 event: string;
620 session_id?: string;
621 sfu_id?: string;
622}
623
624export interface DailyEventObjectActiveSpeakerChange {
625 action: Extract<DailyEvent, 'active-speaker-change'>;
626 activeSpeaker: {
627 peerId: string;
628 };
629}
630
631export interface DailyEventObjectActiveSpeakerModeChange {
632 action: Extract<DailyEvent, 'active-speaker-mode-change'>;
633 enabled: boolean;
634}
635
636export interface DailyEventObjectAppMessage {
637 action: Extract<DailyEvent, 'app-message'>;
638 data: any;
639 fromId: string;
640}
641
642export interface DailyEventObjectLangUpdated {
643 action: Extract<DailyEvent, 'lang-updated'>;
644 lang: DailyLanguage;
645 langSetting: DailyLanguageSetting;
646}
647
648export interface DailyEventObjectThemeUpdated {
649 action: Extract<DailyEvent, 'theme-updated'>;
650 theme: DailyThemeConfig;
651}
652
653export interface DailyEventObjectReceiveSettingsUpdated {
654 action: Extract<DailyEvent, 'receive-settings-updated'>;
655 receiveSettings: DailyReceiveSettings;
656}
657
658export interface DailyEventObjectShowLocalVideoChanged {
659 action: Extract<DailyEvent, 'show-local-video-changed'>;
660 show: boolean;
661}
662export interface DailyEventObjectInputSettingsUpdated {
663 action: Extract<DailyEvent, 'input-settings-updated'>;
664 inputSettings: DailyInputSettings;
665}
666
667export interface DailyEventObjectLiveStreamingStarted {
668 action: Extract<DailyEvent, 'live-streaming-started'>;
669 layout?: DailyStreamingLayoutConfig;
670}
671
672export type DailyEventObject<
673 T extends DailyEvent = any
674> = T extends DailyEventObjectAppMessage['action']
675 ? DailyEventObjectAppMessage
676 : T extends DailyEventObjectNoPayload['action']
677 ? DailyEventObjectNoPayload
678 : T extends DailyEventObjectCameraError['action']
679 ? DailyEventObjectCameraError
680 : T extends DailyEventObjectFatalError['action']
681 ? DailyEventObjectFatalError
682 : T extends DailyEventObjectGenericError['action']
683 ? DailyEventObjectGenericError
684 : T extends DailyEventObjectParticipants['action']
685 ? DailyEventObjectParticipants
686 : T extends DailyEventObjectParticipant['action']
687 ? DailyEventObjectParticipant
688 : T extends DailyEventObjectWaitingParticipant['action']
689 ? DailyEventObjectWaitingParticipant
690 : T extends DailyEventObjectAccessState['action']
691 ? DailyEventObjectAccessState
692 : T extends DailyEventObjectMeetingSessionUpdated['action']
693 ? DailyEventObjectMeetingSessionUpdated
694 : T extends DailyEventObjectTrack['action']
695 ? DailyEventObjectTrack
696 : T extends DailyEventObjectRecordingStarted['action']
697 ? DailyEventObjectRecordingStarted
698 : T extends DailyEventObjectMouseEvent['action']
699 ? DailyEventObjectMouseEvent
700 : T extends DailyEventObjectTouchEvent['action']
701 ? DailyEventObjectTouchEvent
702 : T extends DailyEventObjectNetworkQualityEvent['action']
703 ? DailyEventObjectNetworkQualityEvent
704 : T extends DailyEventObjectNetworkConnectionEvent['action']
705 ? DailyEventObjectNetworkConnectionEvent
706 : T extends DailyEventObjectActiveSpeakerChange['action']
707 ? DailyEventObjectActiveSpeakerChange
708 : T extends DailyEventObjectActiveSpeakerModeChange['action']
709 ? DailyEventObjectActiveSpeakerModeChange
710 : T extends DailyEventObjectLangUpdated['action']
711 ? DailyEventObjectLangUpdated
712 : T extends DailyEventObjectThemeUpdated['action']
713 ? DailyEventObjectThemeUpdated
714 : T extends DailyEventObjectReceiveSettingsUpdated['action']
715 ? DailyEventObjectReceiveSettingsUpdated
716 : T extends DailyEventObjectShowLocalVideoChanged['action']
717 ? DailyEventObjectShowLocalVideoChanged
718 : T extends DailyEventObjectInputSettingsUpdated['action']
719 ? DailyEventObjectInputSettingsUpdated
720 : any;
721
722export interface DailyFaceInfo {
723 score: number;
724 viewportBox: {
725 width: number;
726 height: number;
727 left: number;
728 top: number;
729 right: number;
730 bottom: number;
731 };
732}
733
734export interface DailyCallFactory {
735 createCallObject(properties?: DailyCallOptions): DailyCall;
736 wrap(iframe: HTMLIFrameElement, properties?: DailyCallOptions): DailyCall;
737 createFrame(
738 parentElement: HTMLElement,
739 properties?: DailyCallOptions
740 ): DailyCall;
741 createFrame(properties?: DailyCallOptions): DailyCall;
742 createTransparentFrame(properties?: DailyCallOptions): DailyCall;
743}
744
745export interface DailyCallStaticUtils {
746 supportedBrowser(): DailyBrowserInfo;
747 version(): string;
748}
749
750export interface DailyStreamingDefaultLayoutConfig {
751 preset: 'default';
752 max_cam_streams?: number;
753}
754
755export interface DailyStreamingSingleParticipantLayoutConfig {
756 preset: 'single-participant';
757 session_id: string;
758}
759
760export interface DailyStreamingActiveParticipantLayoutConfig {
761 preset: 'active-participant';
762}
763
764export type DailyStreamingPortraitLayoutVariant = 'vertical' | 'inset';
765
766export interface DailyStreamingPortraitLayoutConfig {
767 preset: 'portrait';
768 variant?: DailyStreamingPortraitLayoutVariant;
769 max_cam_streams?: number;
770}
771
772export type DailyStreamingLayoutConfig =
773 | DailyStreamingDefaultLayoutConfig
774 | DailyStreamingSingleParticipantLayoutConfig
775 | DailyStreamingActiveParticipantLayoutConfig
776 | DailyStreamingPortraitLayoutConfig;
777
778export type DailyAccess = 'unknown' | SpecifiedDailyAccess;
779
780export type SpecifiedDailyAccess = { level: 'none' | 'lobby' | 'full' };
781
782export type DailyAccessState = {
783 access: DailyAccess;
784 awaitingAccess?: SpecifiedDailyAccess;
785};
786
787export type DailyAccessRequest = {
788 access?: { level: 'full' };
789 name: string;
790};
791
792export interface DailyStreamingOptions {
793 width?: number;
794 height?: number;
795 backgroundColor?: string;
796 layout?: DailyStreamingLayoutConfig;
797}
798
799export interface DailyLiveStreamingOptions extends DailyStreamingOptions {
800 rtmpUrl: string;
801}
802
803export interface DailyCall {
804 iframe(): HTMLIFrameElement | null;
805 join(properties?: DailyCallOptions): Promise<DailyParticipantsObject | void>;
806 leave(): Promise<void>;
807 destroy(): Promise<void>;
808 loadCss(properties: {
809 bodyClass?: string;
810 cssFile?: string;
811 cssText?: string;
812 }): DailyCall;
813 meetingState(): DailyMeetingState;
814 accessState(): DailyAccessState;
815 participants(): DailyParticipantsObject;
816 updateParticipant(
817 sessionId: string,
818 updates: DailyParticipantUpdateOptions
819 ): DailyCall;
820 updateParticipants(updates: {
821 [sessionId: string]: DailyParticipantUpdateOptions;
822 }): DailyCall;
823 waitingParticipants(): { [id: string]: DailyWaitingParticipant };
824 updateWaitingParticipant(
825 id: string,
826 updates: DailyWaitingParticipantUpdateOptions
827 ): Promise<{ id: string }>;
828 updateWaitingParticipants(updates: {
829 [id: string]: DailyWaitingParticipantUpdateOptions;
830 }): Promise<{ ids: string[] }>;
831 requestAccess(
832 access: DailyAccessRequest
833 ): Promise<{ access: DailyAccess; granted: boolean }>;
834 localAudio(): boolean;
835 localVideo(): boolean;
836 setLocalAudio(enabled: boolean): DailyCall;
837 setLocalVideo(enabled: boolean): DailyCall;
838 getReceiveSettings(
839 id: string,
840 options?: { showInheritedValues: boolean }
841 ): Promise<DailySingleParticipantReceiveSettings>;
842 getReceiveSettings(): Promise<DailyReceiveSettings>;
843 updateReceiveSettings(
844 receiveSettings: DailyReceiveSettingsUpdates
845 ): Promise<DailyReceiveSettings>;
846 updateInputSettings(
847 inputSettings: DailyInputSettings
848 ): Promise<DailyInputSettings>;
849 getInputSettings(): Promise<DailyInputSettings>;
850 setBandwidth(bw: {
851 kbs?: number | 'NO_CAP' | null;
852 trackConstraints?: MediaTrackConstraints;
853 }): DailyCall;
854 getDailyLang(): Promise<{
855 lang: DailyLanguage;
856 langSetting: DailyLanguageSetting;
857 }>;
858 setDailyLang(lang: DailyLanguageSetting): DailyCall;
859 getMeetingSession(): Promise<{
860 meetingSession: DailyMeetingSession;
861 }>;
862 setUserName(
863 name: string,
864 options?: { thisMeetingOnly?: boolean }
865 ): Promise<{ userName: string }>;
866 startCamera(properties?: DailyCallOptions): Promise<DailyDeviceInfos>;
867 cycleCamera(): Promise<{ device?: MediaDeviceInfo | null }>;
868 cycleMic(): Promise<{ device?: MediaDeviceInfo | null }>;
869 setInputDevices(devices: {
870 audioDeviceId?: string | false;
871 audioSource?: MediaStreamTrack | false;
872 videoDeviceId?: string | false;
873 videoSource?: MediaStreamTrack | false;
874 }): DailyCall;
875 setInputDevicesAsync(devices: {
876 audioDeviceId?: string | false;
877 audioSource?: MediaStreamTrack | false;
878 videoDeviceId?: string | false;
879 videoSource?: MediaStreamTrack | false;
880 }): Promise<DailyDeviceInfos>;
881 setOutputDevice(audioDevice: { outputDeviceId?: string }): DailyCall;
882 getInputDevices(): Promise<DailyDeviceInfos>;
883 preAuth(properties?: DailyCallOptions): Promise<{ access: DailyAccess }>;
884 load(properties?: DailyLoadOptions): Promise<void>;
885 startScreenShare(captureOptions?: DailyScreenCaptureOptions): void;
886 stopScreenShare(): void;
887 startRecording(options?: DailyStreamingOptions): void;
888 updateRecording(options: { layout?: DailyStreamingLayoutConfig }): void;
889 stopRecording(): void;
890 startLiveStreaming(options: DailyLiveStreamingOptions): void;
891 updateLiveStreaming(options: { layout?: DailyStreamingLayoutConfig }): void;
892 stopLiveStreaming(): void;
893 startTranscription(): void;
894 stopTranscription(): void;
895 getNetworkStats(): Promise<DailyNetworkStats>;
896 getActiveSpeaker(): { peerId?: string };
897 setActiveSpeakerMode(enabled: boolean): DailyCall;
898 activeSpeakerMode(): boolean;
899 subscribeToTracksAutomatically(): boolean;
900 setSubscribeToTracksAutomatically(enabled: boolean): DailyCall;
901 enumerateDevices(): Promise<{ devices: MediaDeviceInfo[] }>;
902 sendAppMessage(data: any, to?: string): DailyCall;
903 addFakeParticipant(details?: { aspectRatio: number }): DailyCall;
904 setShowNamesMode(mode: false | 'always' | 'never'): DailyCall;
905 setShowLocalVideo(show: boolean): DailyCall;
906 setShowParticipantsBar(show: boolean): DailyCall;
907 theme(): DailyThemeConfig;
908 setTheme(theme: DailyThemeConfig): Promise<DailyThemeConfig>;
909 showLocalVideo(): boolean;
910 showParticipantsBar(): boolean;
911 detectAllFaces(): Promise<{
912 faces?: { [id: string]: DailyFaceInfo[] };
913 }>;
914 requestFullscreen(): Promise<void>;
915 exitFullscreen(): void;
916 room(options?: {
917 includeRoomConfigDefaults: boolean;
918 }): Promise<DailyPendingRoomInfo | DailyRoomInfo | null>;
919 geo(): Promise<{ current: string }>;
920 getNetworkTopology(): Promise<{
921 topology: DailyNetworkTopology | 'none';
922 error?: string;
923 }>;
924 setNetworkTopology(options: {
925 topology: DailyNetworkTopology;
926 }): Promise<{ workerId?: string; error?: string }>;
927 setPlayNewParticipantSound(sound: boolean | number): void;
928 on<T extends DailyEvent>(
929 event: T,
930 handler: (event?: DailyEventObject<T>) => void
931 ): DailyCall;
932 once<T extends DailyEvent>(
933 event: T,
934 handler: (event?: DailyEventObject<T>) => void
935 ): DailyCall;
936 off<T extends DailyEvent>(
937 event: T,
938 handler: (event?: DailyEventObject<T>) => void
939 ): DailyCall;
940 properties: {
941 dailyConfig?: DailyAdvancedConfig;
942 userName?: string;
943 };
944}
945
946declare const DailyIframe: DailyCallFactory & DailyCallStaticUtils;
947
948export default DailyIframe;