Procházet zdrojové kódy

Adds params for enabling rec on entering the conference.

efficient_tiling
damencho před 10 roky
rodič
revize
cc29df6376
2 změnil soubory, kde provedl 16 přidání a 2 odebrání
  1. 2
    0
      modules/UI/UI.js
  2. 14
    2
      modules/UI/toolbars/Toolbar.js

+ 2
- 0
modules/UI/UI.js Zobrazit soubor

@@ -541,6 +541,8 @@ function onLocalRoleChanged(jid, info, pres, isModerator) {
541 541
         Authentication.closeAuthenticationWindow();
542 542
         messageHandler.notify(null, "notify.me",
543 543
             'connected', "notify.moderator");
544
+
545
+        Toolbar.checkAutoRecord();
544 546
     }
545 547
 }
546 548
 

+ 14
- 2
modules/UI/toolbars/Toolbar.js Zobrazit soubor

@@ -123,8 +123,13 @@ function hangup() {
123 123
  * Starts or stops the recording for the conference.
124 124
  */
125 125
 
126
-function toggleRecording() {
126
+function toggleRecording(predefinedToken) {
127 127
     APP.xmpp.toggleRecording(function (callback) {
128
+        if (predefinedToken) {
129
+            callback(UIUtil.escapeHtml(predefinedToken));
130
+            return;
131
+        }
132
+
128 133
         var msg = APP.translation.generateTranslationHTML(
129 134
             "dialog.recordingToken");
130 135
         var token = APP.translation.translateString("dialog.token");
@@ -567,7 +572,7 @@ var Toolbar = (function (my) {
567 572
             }, 1500);
568 573
 
569 574
             recordingToaster = messageHandler.notify(null, "recording.toaster", null,
570
-                null, null, {timeOut: 0, closeButton: null});
575
+                null, null, {timeOut: 0, closeButton: null, tapToDismiss: false});
571 576
         } else if (recordingState === 'off') {
572 577
             selector.removeClass("icon-recEnable active");
573 578
             selector.addClass("icon-recEnable");
@@ -590,6 +595,13 @@ var Toolbar = (function (my) {
590 595
         }
591 596
     };
592 597
 
598
+    // checks whether recording is enabled and whether we have params to start automatically recording
599
+    my.checkAutoRecord = function () {
600
+        if (config.enableRecording && config.autoRecord) {
601
+            toggleRecording(config.autoRecordToken);
602
+        }
603
+    }
604
+
593 605
     // Shows or hides SIP calls button
594 606
     my.showSipCallButton = function (show) {
595 607
         if (APP.xmpp.isSipGatewayEnabled() && show) {

Načítá se…
Zrušit
Uložit