1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export 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 |
|
32 | export type DailyLanguageSetting = DailyLanguage | 'user';
|
33 |
|
34 | export 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 |
|
89 | export type DailyMeetingState =
|
90 | | 'new'
|
91 | | 'loading'
|
92 | | 'loaded'
|
93 | | 'joining-meeting'
|
94 | | 'joined-meeting'
|
95 | | 'left-meeting'
|
96 | | 'error';
|
97 |
|
98 | export type DailyCameraErrorType =
|
99 | | 'cam-in-use'
|
100 | | 'mic-in-use'
|
101 | | 'cam-mic-in-use';
|
102 |
|
103 | export type DailyFatalErrorType =
|
104 | | 'ejected'
|
105 | | 'nbf-room'
|
106 | | 'nbf-token'
|
107 | | 'exp-room'
|
108 | | 'exp-token';
|
109 |
|
110 | export type DailyNetworkTopology = 'sfu' | 'peer';
|
111 |
|
112 | export interface DailyParticipantsObject {
|
113 | local: DailyParticipant;
|
114 | [id: string]: DailyParticipant;
|
115 | }
|
116 |
|
117 | export 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 |
|
127 | export interface DailyThemeColors {
|
128 | |
129 |
|
130 |
|
131 | accent?: string;
|
132 | |
133 |
|
134 |
|
135 | accentText?: string;
|
136 | |
137 |
|
138 |
|
139 | background?: string;
|
140 | |
141 |
|
142 |
|
143 | backgroundAccent?: string;
|
144 | |
145 |
|
146 |
|
147 | baseText?: string;
|
148 | |
149 |
|
150 |
|
151 | border?: string;
|
152 | |
153 |
|
154 |
|
155 | mainAreaBg?: string;
|
156 | |
157 |
|
158 |
|
159 | mainAreaBgAccent?: string;
|
160 | |
161 |
|
162 |
|
163 | mainAreaText?: string;
|
164 | |
165 |
|
166 |
|
167 | supportiveText?: string;
|
168 | }
|
169 |
|
170 | export type DailyTheme = {
|
171 | colors: DailyThemeColors;
|
172 | };
|
173 | export type DailyThemeConfig =
|
174 | | DailyTheme
|
175 | | {
|
176 | light: DailyTheme;
|
177 | dark: DailyTheme;
|
178 | };
|
179 |
|
180 | export interface DailyGridLayoutConfig {
|
181 | maxTilesPerPage?: number;
|
182 | minTilesPerPage?: number;
|
183 | }
|
184 | export interface DailyLayoutConfig {
|
185 | grid?: DailyGridLayoutConfig;
|
186 | }
|
187 |
|
188 | export 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 |
|
213 | export interface DailyLoadOptions extends DailyCallOptions {
|
214 | baseUrl?: string;
|
215 | }
|
216 |
|
217 | export 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 |
|
233 | export 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 |
|
255 | export interface DailyParticipant {
|
256 |
|
257 | audioTrack?: MediaStreamTrack;
|
258 | videoTrack?: MediaStreamTrack;
|
259 | screenVideoTrack?: MediaStreamTrack;
|
260 | screenAudioTrack?: MediaStreamTrack;
|
261 |
|
262 |
|
263 | audio: boolean;
|
264 | video: boolean;
|
265 | screen: boolean;
|
266 |
|
267 |
|
268 | tracks: {
|
269 | audio: DailyTrackState;
|
270 | video: DailyTrackState;
|
271 | screenAudio: DailyTrackState;
|
272 | screenVideo: DailyTrackState;
|
273 | };
|
274 |
|
275 |
|
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 |
|
286 | cam_info: {} | DailyVideoElementInfo;
|
287 | screen_info: {} | DailyVideoElementInfo;
|
288 | }
|
289 |
|
290 | export interface DailyWaitingParticipant {
|
291 | id: string;
|
292 | name: string;
|
293 | awaitingAccess: SpecifiedDailyAccess;
|
294 | }
|
295 |
|
296 | export type DailyTrackSubscriptionState = 'staged' | boolean;
|
297 |
|
298 | export type DailyTrackSubscriptionOptions =
|
299 | | DailyTrackSubscriptionState
|
300 | | 'avatar'
|
301 | | {
|
302 | audio?: DailyTrackSubscriptionState;
|
303 | video?: DailyTrackSubscriptionState;
|
304 | screenVideo?: DailyTrackSubscriptionState;
|
305 | screenAudio?: DailyTrackSubscriptionState;
|
306 | };
|
307 |
|
308 | export interface DailyParticipantUpdateOptions {
|
309 | setAudio?: boolean;
|
310 | setVideo?: boolean;
|
311 | setSubscribedTracks?: DailyTrackSubscriptionOptions;
|
312 | eject?: true;
|
313 | styles?: DailyParticipantCss;
|
314 | }
|
315 |
|
316 | export interface DailyWaitingParticipantUpdateOptions {
|
317 | grantRequestedAccess?: boolean;
|
318 | }
|
319 |
|
320 | export interface DailyParticipantCss {
|
321 | cam?: DailyParticipantStreamCss;
|
322 | screen?: DailyParticipantStreamCss;
|
323 | }
|
324 |
|
325 | export interface DailyParticipantStreamCss {
|
326 | div?: Partial<CSSStyleDeclaration>;
|
327 | overlay?: Partial<CSSStyleDeclaration>;
|
328 | video?: Partial<CSSStyleDeclaration>;
|
329 | }
|
330 |
|
331 | export interface DailyVideoElementInfo {
|
332 | width: number;
|
333 | height: number;
|
334 | left: number;
|
335 | top: number;
|
336 | video_width: number;
|
337 | video_height: number;
|
338 | }
|
339 |
|
340 | export interface DailyDeviceInfos {
|
341 | camera: {} | MediaDeviceInfo;
|
342 | mic: {} | MediaDeviceInfo;
|
343 | speaker: {} | MediaDeviceInfo;
|
344 | }
|
345 |
|
346 | export interface DailyScreenCaptureOptions {
|
347 | audio?: boolean;
|
348 | maxWidth?: number;
|
349 | maxHeight?: number;
|
350 | chromeMediaSourceId?: string;
|
351 | mediaStream?: MediaStream;
|
352 | }
|
353 |
|
354 | export 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 |
|
372 | export interface DailyPendingRoomInfo {
|
373 | roomUrlPendingJoin: string;
|
374 | }
|
375 |
|
376 | export 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 |
|
438 | export interface DailyMeetingSession {
|
439 | id: string;
|
440 | }
|
441 |
|
442 | export interface DailyVideoReceiveSettings {
|
443 | layer?: number;
|
444 | }
|
445 | export interface DailySingleParticipantReceiveSettings {
|
446 | video?: DailyVideoReceiveSettings;
|
447 | screenVideo?: DailyVideoReceiveSettings;
|
448 | }
|
449 |
|
450 | export interface DailyReceiveSettings {
|
451 | [participantIdOrBase: string]: DailySingleParticipantReceiveSettings;
|
452 | }
|
453 |
|
454 | export interface DailyVideoReceiveSettingsUpdates {
|
455 | layer?: number | 'inherit';
|
456 | }
|
457 |
|
458 | export interface DailySingleParticipantReceiveSettingsUpdates {
|
459 | video?: DailyVideoReceiveSettingsUpdates | 'inherit';
|
460 | screenVideo?: DailyVideoReceiveSettingsUpdates | 'inherit';
|
461 | }
|
462 |
|
463 | export interface DailyReceiveSettingsUpdates {
|
464 | [participantIdOrBaseOrStar: string]:
|
465 | | DailySingleParticipantReceiveSettingsUpdates
|
466 | | 'inherit';
|
467 | }
|
468 |
|
469 | export interface DailyInputSettings {
|
470 | video?: DailyInputVideoSettings;
|
471 | }
|
472 |
|
473 | export interface DailyInputVideoSettings {
|
474 | processor?: DailyInputVideoProcessorSettings;
|
475 | }
|
476 | export interface DailyInputVideoProcessorSettings {
|
477 | type: 'none' | 'background-blur';
|
478 | config?: {};
|
479 | }
|
480 | export 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 |
|
498 | export 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 |
|
511 | export interface DailyEventObjectFatalError {
|
512 | action: Extract<DailyEvent, 'error'>;
|
513 | errorMsg: string;
|
514 | error?: {
|
515 | type: DailyFatalErrorType;
|
516 | localizedMsg?: string;
|
517 | };
|
518 | }
|
519 |
|
520 | export interface DailyEventObjectGenericError {
|
521 | action: Extract<DailyEvent, 'load-attempt-failed' | 'live-streaming-error'>;
|
522 | errorMsg: string;
|
523 | }
|
524 |
|
525 | export interface DailyEventObjectParticipants {
|
526 | action: Extract<DailyEvent, 'joined-meeting'>;
|
527 | participants: DailyParticipantsObject;
|
528 | }
|
529 |
|
530 | export interface DailyEventObjectParticipant {
|
531 | action: Extract<
|
532 | DailyEvent,
|
533 | 'participant-joined' | 'participant-updated' | 'participant-left'
|
534 | >;
|
535 | participant: DailyParticipant;
|
536 | }
|
537 |
|
538 | export 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 |
|
548 | export interface DailyEventObjectAccessState extends DailyAccessState {
|
549 | action: Extract<DailyEvent, 'access-state-updated'>;
|
550 | }
|
551 |
|
552 | export interface DailyEventObjectMeetingSessionUpdated {
|
553 | action: Extract<DailyEvent, 'meeting-session-updated'>;
|
554 | meetingSession: DailyMeetingSession;
|
555 | }
|
556 |
|
557 | export interface DailyEventObjectTrack {
|
558 | action: Extract<DailyEvent, 'track-started' | 'track-stopped'>;
|
559 | participant: DailyParticipant | null;
|
560 | track: MediaStreamTrack;
|
561 | }
|
562 |
|
563 | export 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 |
|
572 | export 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 |
|
596 | export 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 |
|
608 | export interface DailyEventObjectNetworkQualityEvent {
|
609 | action: Extract<DailyEvent, 'network-quality-change'>;
|
610 | threshold: 'good' | 'low' | 'very-low';
|
611 | quality: number;
|
612 | }
|
613 |
|
614 | export type NetworkConnectionType = 'signaling' | 'peer-to-peer' | 'sfu';
|
615 |
|
616 | export interface DailyEventObjectNetworkConnectionEvent {
|
617 | action: Extract<DailyEvent, 'network-connection'>;
|
618 | type: NetworkConnectionType;
|
619 | event: string;
|
620 | session_id?: string;
|
621 | sfu_id?: string;
|
622 | }
|
623 |
|
624 | export interface DailyEventObjectActiveSpeakerChange {
|
625 | action: Extract<DailyEvent, 'active-speaker-change'>;
|
626 | activeSpeaker: {
|
627 | peerId: string;
|
628 | };
|
629 | }
|
630 |
|
631 | export interface DailyEventObjectActiveSpeakerModeChange {
|
632 | action: Extract<DailyEvent, 'active-speaker-mode-change'>;
|
633 | enabled: boolean;
|
634 | }
|
635 |
|
636 | export interface DailyEventObjectAppMessage {
|
637 | action: Extract<DailyEvent, 'app-message'>;
|
638 | data: any;
|
639 | fromId: string;
|
640 | }
|
641 |
|
642 | export interface DailyEventObjectLangUpdated {
|
643 | action: Extract<DailyEvent, 'lang-updated'>;
|
644 | lang: DailyLanguage;
|
645 | langSetting: DailyLanguageSetting;
|
646 | }
|
647 |
|
648 | export interface DailyEventObjectThemeUpdated {
|
649 | action: Extract<DailyEvent, 'theme-updated'>;
|
650 | theme: DailyThemeConfig;
|
651 | }
|
652 |
|
653 | export interface DailyEventObjectReceiveSettingsUpdated {
|
654 | action: Extract<DailyEvent, 'receive-settings-updated'>;
|
655 | receiveSettings: DailyReceiveSettings;
|
656 | }
|
657 |
|
658 | export interface DailyEventObjectShowLocalVideoChanged {
|
659 | action: Extract<DailyEvent, 'show-local-video-changed'>;
|
660 | show: boolean;
|
661 | }
|
662 | export interface DailyEventObjectInputSettingsUpdated {
|
663 | action: Extract<DailyEvent, 'input-settings-updated'>;
|
664 | inputSettings: DailyInputSettings;
|
665 | }
|
666 |
|
667 | export interface DailyEventObjectLiveStreamingStarted {
|
668 | action: Extract<DailyEvent, 'live-streaming-started'>;
|
669 | layout?: DailyStreamingLayoutConfig;
|
670 | }
|
671 |
|
672 | export 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 |
|
722 | export 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 |
|
734 | export 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 |
|
745 | export interface DailyCallStaticUtils {
|
746 | supportedBrowser(): DailyBrowserInfo;
|
747 | version(): string;
|
748 | }
|
749 |
|
750 | export interface DailyStreamingDefaultLayoutConfig {
|
751 | preset: 'default';
|
752 | max_cam_streams?: number;
|
753 | }
|
754 |
|
755 | export interface DailyStreamingSingleParticipantLayoutConfig {
|
756 | preset: 'single-participant';
|
757 | session_id: string;
|
758 | }
|
759 |
|
760 | export interface DailyStreamingActiveParticipantLayoutConfig {
|
761 | preset: 'active-participant';
|
762 | }
|
763 |
|
764 | export type DailyStreamingPortraitLayoutVariant = 'vertical' | 'inset';
|
765 |
|
766 | export interface DailyStreamingPortraitLayoutConfig {
|
767 | preset: 'portrait';
|
768 | variant?: DailyStreamingPortraitLayoutVariant;
|
769 | max_cam_streams?: number;
|
770 | }
|
771 |
|
772 | export type DailyStreamingLayoutConfig =
|
773 | | DailyStreamingDefaultLayoutConfig
|
774 | | DailyStreamingSingleParticipantLayoutConfig
|
775 | | DailyStreamingActiveParticipantLayoutConfig
|
776 | | DailyStreamingPortraitLayoutConfig;
|
777 |
|
778 | export type DailyAccess = 'unknown' | SpecifiedDailyAccess;
|
779 |
|
780 | export type SpecifiedDailyAccess = { level: 'none' | 'lobby' | 'full' };
|
781 |
|
782 | export type DailyAccessState = {
|
783 | access: DailyAccess;
|
784 | awaitingAccess?: SpecifiedDailyAccess;
|
785 | };
|
786 |
|
787 | export type DailyAccessRequest = {
|
788 | access?: { level: 'full' };
|
789 | name: string;
|
790 | };
|
791 |
|
792 | export interface DailyStreamingOptions {
|
793 | width?: number;
|
794 | height?: number;
|
795 | backgroundColor?: string;
|
796 | layout?: DailyStreamingLayoutConfig;
|
797 | }
|
798 |
|
799 | export interface DailyLiveStreamingOptions extends DailyStreamingOptions {
|
800 | rtmpUrl: string;
|
801 | }
|
802 |
|
803 | export 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 |
|
946 | declare const DailyIframe: DailyCallFactory & DailyCallStaticUtils;
|
947 |
|
948 | export default DailyIframe;
|