|
|
@@ -506,6 +506,51 @@ export default {
|
|
506
|
506
|
|
|
507
|
507
|
this._setupListeners();
|
|
508
|
508
|
},
|
|
|
509
|
+
|
|
|
510
|
+ /**
|
|
|
511
|
+ * Exposes a Command(s) API on this instance. It is necessitated by (1) the
|
|
|
512
|
+ * desire to keep room private to this instance and (2) the need of other
|
|
|
513
|
+ * modules to send and receive commands to and from participants.
|
|
|
514
|
+ * Eventually, this instance remains in control with respect to the
|
|
|
515
|
+ * decision whether the Command(s) API of room (i.e. lib-jitsi-meet's
|
|
|
516
|
+ * JitsiConference) is to be used in the implementation of the Command(s)
|
|
|
517
|
+ * API of this instance.
|
|
|
518
|
+ */
|
|
|
519
|
+ commands: {
|
|
|
520
|
+ /**
|
|
|
521
|
+ * Receives notifications from other participants about commands aka
|
|
|
522
|
+ * custom events (sent by sendCommand or sendCommandOnce methods).
|
|
|
523
|
+ * @param command {String} the name of the command
|
|
|
524
|
+ * @param handler {Function} handler for the command
|
|
|
525
|
+ */
|
|
|
526
|
+ addCommandListener () {
|
|
|
527
|
+ room.addCommandListener.apply(room, arguments);
|
|
|
528
|
+ },
|
|
|
529
|
+ /**
|
|
|
530
|
+ * Removes command.
|
|
|
531
|
+ * @param name {String} the name of the command.
|
|
|
532
|
+ */
|
|
|
533
|
+ removeCommand () {
|
|
|
534
|
+ room.removeCommand.apply(room, arguments);
|
|
|
535
|
+ },
|
|
|
536
|
+ /**
|
|
|
537
|
+ * Sends command.
|
|
|
538
|
+ * @param name {String} the name of the command.
|
|
|
539
|
+ * @param values {Object} with keys and values that will be sent.
|
|
|
540
|
+ */
|
|
|
541
|
+ sendCommand () {
|
|
|
542
|
+ room.sendCommand.apply(room, arguments);
|
|
|
543
|
+ },
|
|
|
544
|
+ /**
|
|
|
545
|
+ * Sends command one time.
|
|
|
546
|
+ * @param name {String} the name of the command.
|
|
|
547
|
+ * @param values {Object} with keys and values that will be sent.
|
|
|
548
|
+ */
|
|
|
549
|
+ sendCommandOnce () {
|
|
|
550
|
+ room.sendCommandOnce.apply(room, arguments);
|
|
|
551
|
+ },
|
|
|
552
|
+ },
|
|
|
553
|
+
|
|
509
|
554
|
_getConferenceOptions() {
|
|
510
|
555
|
let options = config;
|
|
511
|
556
|
if(config.enableRecording) {
|