forked from jitsi/lib-jitsi-meet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
12311 lines (12165 loc) · 452 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
declare module '@medme/lib-jitsi-meet/JitsiConference' {
/**
* Creates a JitsiConference object with the given name and properties.
* Note: this constructor is not a part of the public API (objects should be
* created using JitsiConnection.createConference).
* @param options.config properties / settings related to the conference that
* will be created.
* @param options.name the name of the conference
* @param options.connection the JitsiConnection object for this
* JitsiConference.
* @param {number} [options.config.avgRtpStatsN=15] how many samples are to be
* collected by {@link AvgRTPStatsReporter}, before arithmetic mean is
* calculated and submitted to the analytics module.
* @param {boolean} [options.config.enableIceRestart=false] - enables the ICE
* restart logic.
* @param {boolean} [options.config.p2p.enabled] when set to <tt>true</tt>
* the peer to peer mode will be enabled. It means that when there are only 2
* participants in the conference an attempt to make direct connection will be
* made. If the connection succeeds the conference will stop sending data
* through the JVB connection and will use the direct one instead.
* @param {number} [options.config.p2p.backToP2PDelay=5] a delay given in
* seconds, before the conference switches back to P2P, after the 3rd
* participant has left the room.
* @param {number} [options.config.channelLastN=-1] The requested amount of
* videos are going to be delivered after the value is in effect. Set to -1 for
* unlimited or all available videos.
* @param {number} [options.config.forceJVB121Ratio]
* "Math.random() < forceJVB121Ratio" will determine whether a 2 people
* conference should be moved to the JVB instead of P2P. The decision is made on
* the responder side, after ICE succeeds on the P2P connection.
* @param {*} [options.config.openBridgeChannel] Which kind of communication to
* open with the videobridge. Values can be "datachannel", "websocket", true
* (treat it as "datachannel"), undefined (treat it as "datachannel") and false
* (don't open any channel).
* @constructor
*
* FIXME Make all methods which are called from lib-internal classes
* to non-public (use _). To name a few:
* {@link JitsiConference.onLocalRoleChanged}
* {@link JitsiConference.onUserRoleChanged}
* {@link JitsiConference.onMemberLeft}
* and so on...
*/
class JitsiConference {
/**
* Creates a JitsiConference object with the given name and properties.
* Note: this constructor is not a part of the public API (objects should be
* created using JitsiConnection.createConference).
* @param options.config properties / settings related to the conference that
* will be created.
* @param options.name the name of the conference
* @param options.connection the JitsiConnection object for this
* JitsiConference.
* @param {number} [options.config.avgRtpStatsN=15] how many samples are to be
* collected by {@link AvgRTPStatsReporter}, before arithmetic mean is
* calculated and submitted to the analytics module.
* @param {boolean} [options.config.enableIceRestart=false] - enables the ICE
* restart logic.
* @param {boolean} [options.config.p2p.enabled] when set to <tt>true</tt>
* the peer to peer mode will be enabled. It means that when there are only 2
* participants in the conference an attempt to make direct connection will be
* made. If the connection succeeds the conference will stop sending data
* through the JVB connection and will use the direct one instead.
* @param {number} [options.config.p2p.backToP2PDelay=5] a delay given in
* seconds, before the conference switches back to P2P, after the 3rd
* participant has left the room.
* @param {number} [options.config.channelLastN=-1] The requested amount of
* videos are going to be delivered after the value is in effect. Set to -1 for
* unlimited or all available videos.
* @param {number} [options.config.forceJVB121Ratio]
* "Math.random() < forceJVB121Ratio" will determine whether a 2 people
* conference should be moved to the JVB instead of P2P. The decision is made on
* the responder side, after ICE succeeds on the P2P connection.
* @param {*} [options.config.openBridgeChannel] Which kind of communication to
* open with the videobridge. Values can be "datachannel", "websocket", true
* (treat it as "datachannel"), undefined (treat it as "datachannel") and false
* (don't open any channel).
* @constructor
*
* FIXME Make all methods which are called from lib-internal classes
* to non-public (use _). To name a few:
* {@link JitsiConference.onLocalRoleChanged}
* {@link JitsiConference.onUserRoleChanged}
* {@link JitsiConference.onMemberLeft}
* and so on...
*/
constructor(options: any);
eventEmitter: any;
options: any;
eventManager: JitsiConferenceEventManager;
participants: {};
componentsVersions: ComponentsVersions;
/**
* Jingle session instance for the JVB connection.
* @type {JingleSessionPC}
*/
jvbJingleSession: any;
lastDominantSpeaker: any;
dtmfManager: any;
somebodySupportsDTMF: boolean;
authEnabled: boolean;
startAudioMuted: boolean;
startVideoMuted: boolean;
startMutedPolicy: {
audio: boolean;
video: boolean;
};
isMutedByFocus: boolean;
mutedByFocusActor: any;
wasStopped: boolean;
properties: {};
/**
* The object which monitors local and remote connection statistics (e.g.
* sending bitrate) and calculates a number which represents the connection
* quality.
*/
connectionQuality: ConnectionQuality;
/**
* Reports average RTP statistics to the analytics module.
* @type {AvgRTPStatsReporter}
*/
avgRtpStatsReporter: AvgRTPStatsReporter;
/**
* Detects issues with the audio of remote participants.
* @type {AudioOutputProblemDetector}
*/
_audioOutputProblemDetector: AudioOutputProblemDetector;
/**
* Indicates whether the connection is interrupted or not.
*/
isJvbConnectionInterrupted: boolean;
/**
* The object which tracks active speaker times
*/
speakerStatsCollector: SpeakerStatsCollector;
/**
* Stores reference to deferred start P2P task. It's created when 3rd
* participant leaves the room in order to avoid ping pong effect (it
* could be just a page reload).
* @type {number|null}
*/
deferredStartP2PTask: number | null;
/**
* A delay given in seconds, before the conference switches back to P2P
* after the 3rd participant has left.
* @type {number}
*/
backToP2PDelay: number;
/**
* If set to <tt>true</tt> it means the P2P ICE is no longer connected.
* When <tt>false</tt> it means that P2P ICE (media) connection is up
* and running.
* @type {boolean}
*/
isP2PConnectionInterrupted: boolean;
/**
* Flag set to <tt>true</tt> when P2P session has been established
* (ICE has been connected) and this conference is currently in the peer to
* peer mode (P2P connection is the active one).
* @type {boolean}
*/
p2p: boolean;
/**
* A JingleSession for the direct peer to peer connection.
* @type {JingleSessionPC}
*/
p2pJingleSession: any;
videoSIPGWHandler: VideoSIPGW;
recordingManager: RecordingManager;
/**
* If the conference.joined event has been sent this will store the timestamp when it happened.
*
* @type {undefined|number}
* @private
*/
private _conferenceJoinAnalyticsEventSent;
_e2eEncryption: E2EEncryption;
constructor(options: any);
_init(options?: {
connection: any;
}): void;
connection: any;
xmpp: any;
_statsCurrentId: any;
room: any;
_onIceConnectionInterrupted: any;
_onIceConnectionRestored: any;
_onIceConnectionEstablished: any;
_updateProperties: any;
_sendConferenceJoinAnalyticsEvent: any;
e2eping: E2ePing;
rtc: RTC;
qualityController: QualityController;
participantConnectionStatus: ParticipantConnectionStatusHandler;
statistics: Statistics;
_audioAnalyser: VADAudioAnalyser;
_noAudioSignalDetection: NoAudioSignalDetection;
/**
* Emits {@link JitsiConferenceEvents.JVB121_STATUS}.
* @type {Jvb121EventGenerator}
*/
jvb121Status: Jvb121EventGenerator;
p2pDominantSpeakerDetection: P2PDominantSpeakerDetection;
join(password?: string): void;
authenticateAndUpgradeRole(options: any): any;
isJoined(): any;
isP2PEnabled(): boolean;
isP2PTestModeEnabled(): boolean;
leave(): Promise<any>;
private _getActiveMediaSession;
private _getMediaSessions;
getName(): any;
getConnection(): any;
isAuthEnabled(): boolean;
isLoggedIn(): boolean;
getAuthLogin(): any;
isExternalAuthEnabled(): any;
getExternalAuthUrl(urlForPopup?: boolean): Promise<any>;
getLocalTracks(mediaType?: typeof MediaType): any[];
getLocalAudioTrack(): any | null;
getLocalVideoTrack(): any | null;
getPerformanceStats(): any | null;
on(eventId: any, handler: any): void;
off(eventId: any, handler?: any): void;
addEventListener: any;
removeEventListener: any;
addCommandListener(command: string, handler: Function): void;
removeCommandListener(command: string, handler: Function): void;
sendTextMessage(message: any, elementName?: string): void;
sendPrivateTextMessage(id: any, message: any, elementName?: string): void;
sendCommand(name: string, values: any): void;
sendCommandOnce(name: string, values: any): void;
removeCommand(name: string): void;
setDisplayName(name: any): void;
setSubject(subject: string): void;
getTranscriber(): typeof Transcriber;
transcriber: any;
getTranscriptionStatus(): string;
addTrack(track: any): Promise<any>;
_fireAudioLevelChangeEvent(audioLevel: number, tpc?: any): void;
_fireMuteChangeEvent(track: any): void;
onLocalTrackRemoved(track: any): void;
removeTrack(track: any): Promise<any>;
replaceTrack(oldTrack: any, newTrack: any): Promise<any>;
private _doReplaceTrack;
_setupNewTrack(newTrack: any): void;
_addLocalTrackAsUnmute(track: any): Promise<any>;
_removeLocalTrackAsMute(track: any): Promise<any>;
getRole(): string;
isHidden(): boolean | null;
isModerator(): boolean | null;
lock(password: string): Promise<any>;
unlock(): Promise<any>;
selectParticipant(participantId: any): void;
selectParticipants(participantIds: any): void;
pinParticipant(participantId: any): void;
getLastN(): number;
setLastN(lastN: any): void;
isInLastN(participantId: string): boolean;
getParticipants(): any[];
getParticipantCount(countHidden?: boolean): number;
getParticipantById(id: any): JitsiParticipant;
grantOwner(id: string): void;
kickParticipant(id: string): void;
private _maybeClearSITimeout;
_sessionInitiateTimeout: any;
private _maybeSetSITimeout;
muteParticipant(id: string): void;
onMemberJoined(jid: any, nick: any, role: any, isHidden: any, statsID: any, status: any, identity: any, botType: any): void;
private _updateFeatures;
private _onMemberBotTypeChanged;
onMemberLeft(jid: any): void;
onMemberKicked(isSelfPresence: boolean, actorId: string, kickedParticipantId: string | null): void;
onLocalRoleChanged(role: string): void;
onUserRoleChanged(jid: any, role: any): void;
onDisplayNameChanged(jid: any, displayName: any): void;
onRemoteTrackAdded(track: any): void;
onCallAccepted(session: any, answer: any): void;
onTransportInfo(session: any, transportInfo: any): void;
onRemoteTrackRemoved(removedTrack: any): void;
_onIncomingCallP2P(jingleSession: any, jingleOffer: any): void;
onIncomingCall(jingleSession: any, jingleOffer: any, now: any): void;
_acceptJvbIncomingCall(jingleSession: any, jingleOffer: any, now: any): void;
_setBridgeChannel(offerIq: any, pc: any): void;
private _rejectIncomingCall;
onCallEnded(jingleSession: any, reasonCondition: string, reasonText: string | null): void;
onSuspendDetected(jingleSession: any): void;
updateDTMFSupport(): void;
isDTMFSupported(): boolean;
myUserId(): string;
sendTones(tones: any, duration: any, pause: any): void;
startRecording(options: any): Promise<any>;
stopRecording(sessionID: string): Promise<any>;
isSIPCallingSupported(): any;
dial(number: any): any;
hangup(): any;
startTranscriber(): any;
/**
* Stops the transcription service.
*/
stopTranscriber: any;
getPhoneNumber(): any;
getPhonePin(): any;
getMeetingUniqueId(): string | undefined;
public getActivePeerConnection(): any | null;
getConnectionState(): string | null;
setStartMutedPolicy(policy: any): void;
getStartMutedPolicy(): any;
isStartAudioMuted(): boolean;
isStartVideoMuted(): boolean;
getConnectionTimes(): any;
setLocalParticipantProperty(name: any, value: any): void;
removeLocalParticipantProperty(name: any): void;
getLocalParticipantProperty(name: any): any;
sendFeedback(overallFeedback: any, detailedFeedback: any): Promise<any>;
isCallstatsEnabled(): boolean;
getSsrcByTrack(track: any): number | undefined;
_onTrackAttach(track: any | any, container: any): void;
sendApplicationLog(message: string): void;
_isFocus(mucJid: any): boolean | null;
_fireIncompatibleVersionsEvent(): void;
sendEndpointMessage(to: string, payload: object): void;
broadcastEndpointMessage(payload: object): void;
sendMessage(message: string | object, to?: string, sendThroughVideobridge?: boolean): void;
isConnectionInterrupted(): boolean;
private _onIceConnectionFailed;
_delayedIceFailed: IceFailedHandling;
private _acceptP2PIncomingCall;
private _addRemoteJVBTracks;
private _addRemoteP2PTracks;
private _addRemoteTracks;
p2pEstablishmentDuration: any;
jvbEstablishmentDuration: any;
getProperty(key: string): any;
private _maybeClearDeferredStartP2P;
private _removeRemoteJVBTracks;
private _removeRemoteP2PTracks;
private _removeRemoteTracks;
private _resumeMediaTransferForJvbConnection;
private _setP2PStatus;
private _startP2PSession;
private _suspendMediaTransferForJvbConnection;
private _maybeStartOrStopP2P;
private _shouldBeInP2PMode;
private _stopP2PSession;
isP2PActive(): boolean;
getP2PConnectionState(): string | null;
startP2PSession(): void;
stopP2PSession(): void;
getSpeakerStats(): object;
setReceiverVideoConstraint(maxFrameHeight: number): void;
setSenderVideoConstraint(maxFrameHeight: number): Promise<any>;
createVideoSIPGWSession(sipAddress: string, displayName: string): any | Error;
private _sendConferenceLeftAnalyticsEvent;
_restartMediaSessions(): void;
_isE2EEEnabled(): boolean;
isE2EESupported(): boolean;
toggleE2EE(enabled: boolean): void;
isLobbySupported(): boolean;
isMembersOnly(): boolean;
enableLobby(): Promise<any>;
disableLobby(): void;
joinLobby(displayName: string, email: string): Promise<never>;
lobbyDenyAccess(id: string): void;
lobbyApproveAccess(id: string): void;
}
namespace JitsiConference {
function resourceCreator(jid: string, isAuthenticatedUser: boolean): string;
}
export default JitsiConference;
import JitsiConferenceEventManager from "@medme/lib-jitsi-meet/JitsiConferenceEventManager";
import ComponentsVersions from "@medme/lib-jitsi-meet/modules/version/ComponentsVersions";
import ConnectionQuality from "@medme/lib-jitsi-meet/modules/connectivity/ConnectionQuality";
import AvgRTPStatsReporter from "@medme/lib-jitsi-meet/modules/statistics/AvgRTPStatsReporter";
import AudioOutputProblemDetector from "@medme/lib-jitsi-meet/modules/statistics/AudioOutputProblemDetector";
import SpeakerStatsCollector from "@medme/lib-jitsi-meet/modules/statistics/SpeakerStatsCollector";
import VideoSIPGW from "@medme/lib-jitsi-meet/modules/videosipgw/VideoSIPGW";
import RecordingManager from "@medme/lib-jitsi-meet/modules/recording/RecordingManager";
import { E2EEncryption } from "@medme/lib-jitsi-meet/modules/e2ee/E2EEncryption";
import E2ePing from "@medme/lib-jitsi-meet/modules/e2eping/e2eping";
import RTC from "@medme/lib-jitsi-meet/modules/RTC/RTC";
import { QualityController } from "@medme/lib-jitsi-meet/modules/qualitycontrol/QualityController";
import ParticipantConnectionStatusHandler from "@medme/lib-jitsi-meet/modules/connectivity/ParticipantConnectionStatus";
import Statistics from "@medme/lib-jitsi-meet/modules/statistics/statistics";
import VADAudioAnalyser from "@medme/lib-jitsi-meet/modules/detection/VADAudioAnalyser";
import NoAudioSignalDetection from "@medme/lib-jitsi-meet/modules/detection/NoAudioSignalDetection";
import Jvb121EventGenerator from "@medme/lib-jitsi-meet/modules/event/Jvb121EventGenerator";
import P2PDominantSpeakerDetection from "@medme/lib-jitsi-meet/modules/detection/P2PDominantSpeakerDetection";
import * as MediaType from "@medme/lib-jitsi-meet/service/RTC/MediaType";
import Transcriber from "@medme/lib-jitsi-meet/modules/transcription/transcriber";
import JitsiParticipant from "@medme/lib-jitsi-meet/JitsiParticipant";
import IceFailedHandling from "@medme/lib-jitsi-meet/modules/connectivity/IceFailedHandling";
}
declare module '@medme/lib-jitsi-meet/JitsiConferenceErrors' {
/**
* The errors for the conference.
*/
/**
* Indicates that client must be authenticated to create the conference.
*/
export const AUTHENTICATION_REQUIRED: "conference.authenticationRequired";
/**
* Indicates that chat error occurred.
*/
export const CHAT_ERROR: "conference.chatError";
/**
* Indicates that conference has been destroyed.
*/
export const CONFERENCE_DESTROYED: "conference.destroyed";
/**
* Indicates that max users limit has been reached.
*/
export const CONFERENCE_MAX_USERS: "conference.max_users";
/**
* Indicates that a connection error occurred when trying to join a conference.
*/
export const CONNECTION_ERROR: "conference.connectionError";
/**
* Indicates that a connection error is due to not allowed,
* occurred when trying to join a conference.
*/
export const NOT_ALLOWED_ERROR: "conference.connectionError.notAllowed";
/**
* Indicates that a connection error is due to not allowed,
* occurred when trying to join a conference, only approved members are allowed to join.
*/
export const MEMBERS_ONLY_ERROR: "conference.connectionError.membersOnly";
/**
* Indicates that a connection error is due to denied access to the room,
* occurred after joining a lobby room and access is denied by the room moderators.
*/
export const CONFERENCE_ACCESS_DENIED: "conference.connectionError.accessDenied";
/**
* Indicates that focus error happened.
*/
export const FOCUS_DISCONNECTED: "conference.focusDisconnected";
/**
* Indicates that focus left the conference.
*/
export const FOCUS_LEFT: "conference.focusLeft";
/**
* Indicates that graceful shutdown happened.
*/
export const GRACEFUL_SHUTDOWN: "conference.gracefulShutdown";
/**
* Indicates that the media connection has failed.
*/
export const ICE_FAILED: "conference.iceFailed";
/**
* Indicates that the versions of the server side components are incompatible
* with the client side.
*/
export const INCOMPATIBLE_SERVER_VERSIONS: "conference.incompatible_server_versions";
/**
* Indicates that offer/answer had failed.
*/
export const OFFER_ANSWER_FAILED: "conference.offerAnswerFailed";
/**
* Indicates that password cannot be set for this conference.
*/
export const PASSWORD_NOT_SUPPORTED: "conference.passwordNotSupported";
/**
* Indicates that a password is required in order to join the conference.
*/
export const PASSWORD_REQUIRED: "conference.passwordRequired";
/**
* Indicates that reservation system returned error.
*/
export const RESERVATION_ERROR: "conference.reservationError";
/**
* Indicates that there is no available videobridge.
*/
export const VIDEOBRIDGE_NOT_AVAILABLE: "conference.videobridgeNotAvailable";
}
declare module '@medme/lib-jitsi-meet/JitsiConferenceEventManager' {
/**
* Setups all event listeners related to conference
* @param conference {JitsiConference} the conference
*/
export default function JitsiConferenceEventManager(conference: any): void;
export default class JitsiConferenceEventManager {
/**
* Setups all event listeners related to conference
* @param conference {JitsiConference} the conference
*/
constructor(conference: any);
conference: any;
xmppListeners: {};
setupChatRoomListeners(): void;
chatRoomForwarder: any;
setupRTCListeners(): void;
removeXMPPListeners(): void;
setupXMPPListeners(): void;
_addConferenceXMPPListener(eventName: any, listener: any): void;
setupStatisticsListeners(): void;
}
}
declare module '@medme/lib-jitsi-meet/JitsiConferenceEvents' {
/**
* The events for the conference.
*/
/**
* Event indicates that the current conference audio input switched between audio
* input states,i.e. with or without audio input.
*/
export const AUDIO_INPUT_STATE_CHANGE: "conference.audio_input_state_changed";
/**
* Indicates that authentication status changed.
*/
export const AUTH_STATUS_CHANGED: "conference.auth_status_changed";
/**
* Fired just before the statistics module is disposed and it's the last chance
* to submit some logs to the statistics service (ex. CallStats if enabled),
* before it's disconnected.
*/
export const BEFORE_STATISTICS_DISPOSED: "conference.beforeStatisticsDisposed";
/**
* Indicates that an error occured.
*/
export const CONFERENCE_ERROR: "conference.error";
/**
* Indicates that conference failed.
*/
export const CONFERENCE_FAILED: "conference.failed";
/**
* Indicates that conference has been joined. The event does NOT provide any
* parameters to its listeners.
*/
export const CONFERENCE_JOINED: "conference.joined";
/**
* Indicates that conference has been left.
*/
export const CONFERENCE_LEFT: "conference.left";
/**
* Indicates that the connection to the conference has been established
* XXX This is currently fired whenVthe *ICE* connection enters 'connected'
* state for the first time.
*/
export const CONNECTION_ESTABLISHED: "conference.connectionEstablished";
/**
* Indicates that the connection to the conference has been interrupted for some
* reason.
* XXX This is currently fired when the *ICE* connection is interrupted.
*/
export const CONNECTION_INTERRUPTED: "conference.connectionInterrupted";
/**
* Indicates that the connection to the conference has been restored.
* XXX This is currently fired when the *ICE* connection is restored.
*/
export const CONNECTION_RESTORED: "conference.connectionRestored";
/**
* A connection to the video bridge's data channel has been established.
*/
export const DATA_CHANNEL_OPENED: "conference.dataChannelOpened";
/**
* A user has changed it display name
*/
export const DISPLAY_NAME_CHANGED: "conference.displayNameChanged";
/**
* The dominant speaker was changed.
*/
export const DOMINANT_SPEAKER_CHANGED: "conference.dominantSpeaker";
/**
* UTC conference timestamp when first participant joined.
*/
export const CONFERENCE_CREATED_TIMESTAMP: "conference.createdTimestamp";
/**
* Indicates that DTMF support changed.
*/
export const DTMF_SUPPORT_CHANGED: "conference.dtmfSupportChanged";
/**
* Indicates that a message from another participant is received on data
* channel.
*/
export const ENDPOINT_MESSAGE_RECEIVED: "conference.endpoint_message_received";
/**
* NOTE This is lib-jitsi-meet internal event and can be removed at any time !
*
* Event emitted when conference transits, between one to one and multiparty JVB
* conference. If the conference switches to P2P it's neither one to one nor
* a multiparty JVB conference, but P2P (the status argument of this event will
* be <tt>false</tt>).
*
* The first argument is a boolean which carries the previous value and
* the seconds argument is a boolean with the new status. The event is emitted
* only if the previous and the new values are different.
*
* @type {string}
*/
export const JVB121_STATUS: string;
/**
* You are kicked from the conference.
* @param {JitsiParticipant} the participant that initiated the kick.
*/
export const KICKED: "conference.kicked";
/**
* Participant was kicked from the conference.
* @param {JitsiParticipant} the participant that initiated the kick.
* @param {JitsiParticipant} the participant that was kicked.
*/
export const PARTICIPANT_KICKED: "conference.participant_kicked";
/**
* The Last N set is changed.
*
* @param {Array<string>|null} leavingEndpointIds the ids of all the endpoints
* which are leaving Last N
* @param {Array<string>|null} enteringEndpointIds the ids of all the endpoints
* which are entering Last N
*/
export const LAST_N_ENDPOINTS_CHANGED: "conference.lastNEndpointsChanged";
/**
* Indicates that the room has been locked or unlocked.
*/
export const LOCK_STATE_CHANGED: "conference.lock_state_changed";
/**
* Indicates that the region of the media server (jitsi-videobridge) that we
* are connected to changed (or was initially set).
* @type {string} the region.
*/
export const SERVER_REGION_CHANGED: string;
/**
* An event(library-private) fired when a new media session is added to the conference.
* @type {string}
* @private
*/
export const _MEDIA_SESSION_STARTED: string;
/**
* An event(library-private) fired when the conference switches the currently active media session.
* @type {string}
* @private
*/
export const _MEDIA_SESSION_ACTIVE_CHANGED: string;
/**
* Indicates that the conference had changed to members only enabled/disabled.
* The first argument of this event is a <tt>boolean</tt> which when set to
* <tt>true</tt> means that the conference is running in members only mode.
* You may need to use Lobby if supported to ask for permissions to enter the conference.
*/
export const MEMBERS_ONLY_CHANGED: "conference.membersOnlyChanged";
/**
* New text message was received.
*/
export const MESSAGE_RECEIVED: "conference.messageReceived";
/**
* Event indicates that the current selected input device has no signal
*/
export const NO_AUDIO_INPUT: "conference.no_audio_input";
/**
* Event indicates that the current microphone used by the conference is noisy.
*/
export const NOISY_MIC: "conference.noisy_mic";
/**
* New private text message was received.
*/
export const PRIVATE_MESSAGE_RECEIVED: "conference.privateMessageReceived";
/**
* Event fired when JVB sends notification about interrupted/restored user's
* ICE connection status or we detect local problem with the video track.
* First argument is the ID of the participant and
* the seconds is a string indicating if the connection is currently
* - active - the connection is active
* - inactive - the connection is inactive, was intentionally interrupted by
* the bridge
* - interrupted - a network problem occurred
* - restoring - the connection was inactive and is restoring now
*
* The current status value can be obtained by calling
* JitsiParticipant.getConnectionStatus().
*/
export const PARTICIPANT_CONN_STATUS_CHANGED: "conference.participant_conn_status_changed";
/**
* Indicates that the features of the participant has been changed.
*/
export const PARTCIPANT_FEATURES_CHANGED: "conference.partcipant_features_changed";
/**
* Indicates that a the value of a specific property of a specific participant
* has changed.
*/
export const PARTICIPANT_PROPERTY_CHANGED: "conference.participant_property_changed";
/**
* Indicates that the conference has switched between JVB and P2P connections.
* The first argument of this event is a <tt>boolean</tt> which when set to
* <tt>true</tt> means that the conference is running on the P2P connection.
*/
export const P2P_STATUS: "conference.p2pStatus";
/**
* Indicates that phone number changed.
*/
export const PHONE_NUMBER_CHANGED: "conference.phoneNumberChanged";
/**
* The conference properties changed.
* @type {string}
*/
export const PROPERTIES_CHANGED: string;
/**
* Indicates that recording state changed.
*/
export const RECORDER_STATE_CHANGED: "conference.recorderStateChanged";
/**
* Indicates that video SIP GW state changed.
* @param {VideoSIPGWConstants} status.
*/
export const VIDEO_SIP_GW_AVAILABILITY_CHANGED: "conference.videoSIPGWAvailabilityChanged";
/**
* Indicates that video SIP GW Session state changed.
* @param {options} event - {
* {string} address,
* {VideoSIPGWConstants} oldState,
* {VideoSIPGWConstants} newState,
* {string} displayName}
* }.
*/
export const VIDEO_SIP_GW_SESSION_STATE_CHANGED: "conference.videoSIPGWSessionStateChanged";
/**
* Indicates that start muted settings changed.
*/
export const START_MUTED_POLICY_CHANGED: "conference.start_muted_policy_changed";
/**
* Indicates that the local user has started muted.
*/
export const STARTED_MUTED: "conference.started_muted";
/**
* Indicates that subject of the conference has changed.
*/
export const SUBJECT_CHANGED: "conference.subjectChanged";
/**
* Indicates that DTMF support changed.
*/
export const SUSPEND_DETECTED: "conference.suspendDetected";
/**
* Event indicates that local user is talking while he muted himself
*/
export const TALK_WHILE_MUTED: "conference.talk_while_muted";
/**
* A new media track was added to the conference. The event provides the
* following parameters to its listeners:
*
* @param {JitsiTrack} track the added JitsiTrack
*/
export const TRACK_ADDED: "conference.trackAdded";
/**
* Audio levels of a media track ( attached to the conference) was changed.
*/
export const TRACK_AUDIO_LEVEL_CHANGED: "conference.audioLevelsChanged";
/**
* A media track ( attached to the conference) mute status was changed.
* @param {JitsiParticipant|null} the participant that initiated the mute
* if it is a remote mute.
*/
export const TRACK_MUTE_CHANGED: "conference.trackMuteChanged";
/**
* The media track was removed from the conference. The event provides the
* following parameters to its listeners:
*
* @param {JitsiTrack} track the removed JitsiTrack
*/
export const TRACK_REMOVED: "conference.trackRemoved";
/**
* Notifies for transcription status changes. The event provides the
* following parameters to its listeners:
*
* @param {String} status - The new status.
*/
export const TRANSCRIPTION_STATUS_CHANGED: "conference.transcriptionStatusChanged";
/**
* A new user joined the conference.
*/
export const USER_JOINED: "conference.userJoined";
/**
* A user has left the conference.
*/
export const USER_LEFT: "conference.userLeft";
/**
* User role changed.
*/
export const USER_ROLE_CHANGED: "conference.roleChanged";
/**
* User status changed.
*/
export const USER_STATUS_CHANGED: "conference.statusChanged";
/**
* Event indicates that the bot participant type changed.
*/
export const BOT_TYPE_CHANGED: "conference.bot_type_changed";
/**
* A new user joined the lobby room.
*/
export const LOBBY_USER_JOINED: "conference.lobby.userJoined";
/**
* A user from the lobby room has been update.
*/
export const LOBBY_USER_UPDATED: "conference.lobby.userUpdated";
/**
* A user left the lobby room.
*/
export const LOBBY_USER_LEFT: "conference.lobby.userLeft";
}
declare module '@medme/lib-jitsi-meet/JitsiConnection' {
/**
* Creates a new connection object for the Jitsi Meet server side video
* conferencing service. Provides access to the JitsiConference interface.
* @param appID identification for the provider of Jitsi Meet video conferencing
* services.
* @param token the JWT token used to authenticate with the server(optional)
* @param options Object with properties / settings related to connection with
* the server.
* @constructor
*/
export default function JitsiConnection(appID: any, token: any, options: any): void;
export default class JitsiConnection {
/**
* Creates a new connection object for the Jitsi Meet server side video
* conferencing service. Provides access to the JitsiConference interface.
* @param appID identification for the provider of Jitsi Meet video conferencing
* services.
* @param token the JWT token used to authenticate with the server(optional)
* @param options Object with properties / settings related to connection with
* the server.
* @constructor
*/
constructor(appID: any, token: any, options: any);
appID: any;
token: any;
options: any;
xmpp: XMPP;
connect(options?: object): void;
attach(options: object): void;
disconnect(...args: any[]): Promise<any>;
getJid(): string;
setToken(token: any): void;
initJitsiConference(name: any, options: any): JitsiConference;
addEventListener(event: typeof JitsiConnectionEvents, listener: Function): void;
removeEventListener(event: typeof JitsiConnectionEvents, listener: Function): void;
getConnectionTimes(): {};
addFeature(feature: string, submit?: boolean): void;
removeFeature(feature: string, submit?: boolean): void;
getLogs(): any;
}
import XMPP from "@medme/lib-jitsi-meet/modules/xmpp/xmpp";
import JitsiConference from "@medme/lib-jitsi-meet/JitsiConference";
import * as JitsiConnectionEvents from "@medme/lib-jitsi-meet/JitsiConnectionEvents";
}
declare module '@medme/lib-jitsi-meet/JitsiConnectionErrors' {
/**
* The errors for the connection.
*/
/**
* Indicates that the connection was dropped with an error which was most likely
* caused by some networking issues. The dropped term in this context means that
* the connection was closed unexpectedly (not on user's request).
*
* One example is 'item-not-found' error thrown by Prosody when the BOSH session
* times out after 60 seconds of inactivity. On the other hand 'item-not-found'
* could also happen when BOSH request is sent to the server with the session-id
* that is not know to the server. But this should not happen in lib-jitsi-meet
* case as long as the service is configured correctly (there is no bug).
*/
export const CONNECTION_DROPPED_ERROR: "connection.droppedError";
/**
* Not specified errors.
*/
export const OTHER_ERROR: "connection.otherError";
/**
* Indicates that a password is required in order to join the conference.
*/
export const PASSWORD_REQUIRED: "connection.passwordRequired";
/**
* Indicates that the connection was dropped, because of too many 5xx HTTP
* errors on BOSH requests.
*/
export const SERVER_ERROR: "connection.serverError";
}
declare module '@medme/lib-jitsi-meet/JitsiConnectionEvents' {
/**
* The events for the connection.
*/
/**
* Indicates that the connection has been disconnected. The event provides
* the following parameters to its listeners:
*
* @param msg {string} a message associated with the disconnect such as the
* last (known) error message
*/
export const CONNECTION_DISCONNECTED: "connection.connectionDisconnected";
/**
* Indicates that the connection has been established. The event provides
* the following parameters to its listeners:
*
* @param id {string} the ID of the local endpoint/participant/peer (within
* the context of the established connection)
*/
export const CONNECTION_ESTABLISHED: "connection.connectionEstablished";
/**
* Indicates that the connection has been failed for some reason. The event
* provides the following parameters to its listeners:
*
* @param errType {JitsiConnectionErrors} the type of error associated with
* the failure
* @param errReason {string} the error (message) associated with the failure
* @param credentials {object} the credentials used to connect (if any)
* @param errReasonDetails {object} an optional object with details about
* the error, like shard moving, suspending. Used for analytics purposes.
*/
export const CONNECTION_FAILED: "connection.connectionFailed";
/**
* Indicates that the performed action cannot be executed because the
* connection is not in the correct state(connected, disconnected, etc.)
*/
export const WRONG_STATE: "connection.wrongState";
/**
* Indicates that the display name is required over this connection and need to be supplied when
* joining the room.
* There are cases like lobby room where display name is required.
*/
export const DISPLAY_NAME_REQUIRED: "connection.display_name_required";
}
declare module '@medme/lib-jitsi-meet/JitsiMediaDevices' {
var _default: JitsiMediaDevices;
export default _default;
/**
* Media devices utilities for Jitsi.
*/
class JitsiMediaDevices {
_eventEmitter: any;
_grantedPermissions: {};
_permissionsApiSupported: Promise<any>;
/**
* Updated the local granted permissions cache. A permissions might be
* granted, denied, or undefined. This is represented by having its media
* type key set to {@code true} or {@code false} respectively.
*
* @param {Object} grantedPermissions - Array with the permissions
* which were granted.
*/
_handleGrantedPermissions(grantedPermissions: any): void;
/**
* Gathers data and sends it to statistics.
* @param deviceID the device id to log
* @param devices list of devices
*/
_logOutputDevice(deviceID: any, devices: any): void;
/**
* Executes callback with list of media devices connected.
* @param {function} callback
*/
enumerateDevices(callback: Function): void;
/**
* Checks if its possible to enumerate available cameras/micropones.
* @returns {Promise<boolean>} a Promise which will be resolved only once
* the WebRTC stack is ready, either with true if the device listing is
* available available or with false otherwise.
*/
isDeviceListAvailable(): Promise<boolean>;
/**
* Returns true if changing the input (camera / microphone) or output
* (audio) device is supported and false if not.
* @param {string} [deviceType] - type of device to change. Default is
* undefined or 'input', 'output' - for audio output device change.
* @returns {boolean} true if available, false otherwise.
*/
isDeviceChangeAvailable(deviceType?: string): boolean;
/**
* Checks if the permission for the given device was granted.
*
* @param {'audio'|'video'} [type] - type of devices to check,
* undefined stands for both 'audio' and 'video' together
* @returns {Promise<boolean>}
*/
isDevicePermissionGranted(type?: 'audio' | 'video'): Promise<boolean>;
/**
* Returns true if it is possible to be simultaneously capturing audio
* from more than one device.
*
* @returns {boolean}
*/
isMultipleAudioInputSupported(): boolean;
/**
* Returns currently used audio output device id, 'default' stands
* for default device
* @returns {string}
*/
getAudioOutputDevice(): string;
/**
* Sets current audio output device.
* @param {string} deviceId - id of 'audiooutput' device from
* navigator.mediaDevices.enumerateDevices(), 'default' is for
* default device
* @returns {Promise} - resolves when audio output is changed, is rejected
* otherwise
*/
setAudioOutputDevice(deviceId: string): Promise<any>;
/**
* Adds an event handler.