|
@@ -538,6 +538,103 @@ JitsiConference.prototype.sendTones = function (tones, duration, pause) {
|
538
|
538
|
this.dtmfManager.sendTones(tones, duration, pause);
|
539
|
539
|
};
|
540
|
540
|
|
|
541
|
+/**
|
|
542
|
+ * Returns true if the recording is supproted and false if not.
|
|
543
|
+ */
|
|
544
|
+JitsiConference.prototype.isRecordingSupported = function () {
|
|
545
|
+ if(this.room)
|
|
546
|
+ return this.room.isRecordingSupported();
|
|
547
|
+ return false;
|
|
548
|
+};
|
|
549
|
+
|
|
550
|
+/**
|
|
551
|
+ * Returns null if the recording is not supported, "on" if the recording started
|
|
552
|
+ * and "off" if the recording is not started.
|
|
553
|
+ */
|
|
554
|
+JitsiConference.prototype.getRecordingState = function () {
|
|
555
|
+ if(this.room)
|
|
556
|
+ return this.room.getRecordingState();
|
|
557
|
+ return "off";
|
|
558
|
+}
|
|
559
|
+
|
|
560
|
+/**
|
|
561
|
+ * Returns the url of the recorded video.
|
|
562
|
+ */
|
|
563
|
+JitsiConference.prototype.getRecordingURL = function () {
|
|
564
|
+ if(this.room)
|
|
565
|
+ return this.room.getRecordingURL();
|
|
566
|
+ return null;
|
|
567
|
+}
|
|
568
|
+
|
|
569
|
+/**
|
|
570
|
+ * Starts/stops the recording
|
|
571
|
+ * @param token a token for authentication.
|
|
572
|
+ */
|
|
573
|
+JitsiConference.prototype.toggleRecording = function (token, followEntity) {
|
|
574
|
+ if(this.room)
|
|
575
|
+ return this.room.toggleRecording(token, followEntity);
|
|
576
|
+ return new Promise(function(resolve, reject){
|
|
577
|
+ reject(new Error("The conference is not created yet!"))});
|
|
578
|
+}
|
|
579
|
+
|
|
580
|
+/**
|
|
581
|
+ * Returns true if the SIP calls are supported and false otherwise
|
|
582
|
+ */
|
|
583
|
+JitsiConference.prototype.isSIPCallingSupported = function () {
|
|
584
|
+ if(this.room)
|
|
585
|
+ return this.room.isSIPCallingSupported();
|
|
586
|
+ return false;
|
|
587
|
+}
|
|
588
|
+
|
|
589
|
+/**
|
|
590
|
+ * Dials a number.
|
|
591
|
+ * @param number the number
|
|
592
|
+ */
|
|
593
|
+JitsiConference.prototype.dial = function (number) {
|
|
594
|
+ if(this.room)
|
|
595
|
+ return this.room.dial(number);
|
|
596
|
+ return new Promise(function(resolve, reject){
|
|
597
|
+ reject(new Error("The conference is not created yet!"))});
|
|
598
|
+}
|
|
599
|
+
|
|
600
|
+/**
|
|
601
|
+ * Hangup an existing call
|
|
602
|
+ */
|
|
603
|
+JitsiConference.prototype.hangup = function () {
|
|
604
|
+ if(this.room)
|
|
605
|
+ return this.room.hangup();
|
|
606
|
+ return new Promise(function(resolve, reject){
|
|
607
|
+ reject(new Error("The conference is not created yet!"))});
|
|
608
|
+}
|
|
609
|
+
|
|
610
|
+/**
|
|
611
|
+ * Returns the phone number for joining the conference.
|
|
612
|
+ */
|
|
613
|
+JitsiConference.prototype.getPhoneNumber = function () {
|
|
614
|
+ if(this.room)
|
|
615
|
+ return this.room.getPhoneNumber();
|
|
616
|
+ return null;
|
|
617
|
+}
|
|
618
|
+
|
|
619
|
+/**
|
|
620
|
+ * Returns the pin for joining the conference with phone.
|
|
621
|
+ */
|
|
622
|
+JitsiConference.prototype.getPhonePin = function () {
|
|
623
|
+ if(this.room)
|
|
624
|
+ return this.room.getPhonePin();
|
|
625
|
+ return null;
|
|
626
|
+}
|
|
627
|
+
|
|
628
|
+/**
|
|
629
|
+ * Returns the connection state for the current room. Its ice connection state
|
|
630
|
+ * for its session.
|
|
631
|
+ */
|
|
632
|
+JitsiConference.prototype.getConnectionState = function () {
|
|
633
|
+ if(this.room)
|
|
634
|
+ return this.room.getConnectionState();
|
|
635
|
+ return null;
|
|
636
|
+}
|
|
637
|
+
|
541
|
638
|
/**
|
542
|
639
|
* Setups the listeners needed for the conference.
|
543
|
640
|
* @param conference the conference
|
|
@@ -596,6 +693,17 @@ function setupListeners(conference) {
|
596
|
693
|
conference.eventEmitter.emit(JitsiConferenceEvents.CONNECTION_INTERRUPTED);
|
597
|
694
|
});
|
598
|
695
|
|
|
696
|
+ conference.room.addListener(XMPPEvents.RECORDING_STATE_CHANGED,
|
|
697
|
+ function () {
|
|
698
|
+ conference.eventEmitter.emit(
|
|
699
|
+ JitsiConferenceEvents.RECORDING_STATE_CHANGED);
|
|
700
|
+ });
|
|
701
|
+
|
|
702
|
+ conference.room.addListener(XMPPEvents.PHONE_NUMBER_CHANGED, function () {
|
|
703
|
+ conference.eventEmitter.emit(
|
|
704
|
+ JitsiConferenceEvents.PHONE_NUMBER_CHANGED);
|
|
705
|
+ });
|
|
706
|
+
|
599
|
707
|
conference.room.addListener(XMPPEvents.CONNECTION_RESTORED, function () {
|
600
|
708
|
conference.eventEmitter.emit(JitsiConferenceEvents.CONNECTION_RESTORED);
|
601
|
709
|
});
|