Bläddra i källkod

Fixes jshint errors

master
hristoterezov 10 år sedan
förälder
incheckning
6ae330befa
1 ändrade filer med 20 tillägg och 23 borttagningar
  1. 20
    23
      modules/xmpp/recording.js

+ 20
- 23
modules/xmpp/recording.js Visa fil

10
     this.focusMucJid = focusMucJid;
10
     this.focusMucJid = focusMucJid;
11
     this.url = null;
11
     this.url = null;
12
     this.isRecordingSupported = false;
12
     this.isRecordingSupported = false;
13
-};
13
+}
14
 
14
 
15
 Recording.prototype.handleJibriPresence = function (jibri) {
15
 Recording.prototype.handleJibriPresence = function (jibri) {
16
-
17
     this.eventEmitter.emit(XMPPEvents.RECORDING_STATE_CHANGED);
16
     this.eventEmitter.emit(XMPPEvents.RECORDING_STATE_CHANGED);
18
-}
17
+};
19
 
18
 
20
 Recording.prototype.setRecording = function (state, streamId, callback){
19
 Recording.prototype.setRecording = function (state, streamId, callback){
21
     if (state == this.state){
20
     if (state == this.state){
41
         },
40
         },
42
         function (error) {
41
         function (error) {
43
             console.log('Failed to start recording, error: ', error);
42
             console.log('Failed to start recording, error: ', error);
44
-            callback(recordingEnabled);
43
+            callback(this.state);
45
         });
44
         });
46
-}
47
-
45
+};
48
 
46
 
49
 Recording.prototype.toggleRecording = function (token) {
47
 Recording.prototype.toggleRecording = function (token) {
50
         // Jirecon does not (currently) support a token.
48
         // Jirecon does not (currently) support a token.
51
-        if (!token) {
52
-            console.error("No token passed!");
53
-            return;
54
-        }
49
+    if (!token) {
50
+        console.error("No token passed!");
51
+        return;
52
+    }
55
 
53
 
56
-        var oldState = this.state;
57
-        var newState = (oldState === 'off' || !oldState) ? 'on' : 'off';
54
+    var oldState = this.state;
55
+    var newState = (oldState === 'off' || !oldState) ? 'on' : 'off';
58
 
56
 
59
-        this.setRecording(newState,
60
-            token,
61
-            function (state) {
62
-                console.log("New recording state: ", state);
63
-                if (state !== oldState) {
64
-                    this.state = state;
65
-                    this.eventEmitter.emit(XMPPEvents.RECORDING_STATE_CHANGED, state);
66
-                }
57
+    this.setRecording(newState,
58
+        token,
59
+        function (state) {
60
+            console.log("New recording state: ", state);
61
+            if (state !== oldState) {
62
+                this.state = state;
63
+                this.eventEmitter.emit(XMPPEvents.RECORDING_STATE_CHANGED,
64
+                     state);
67
             }
65
             }
68
-        );
69
-    }
70
-
66
+        }
67
+    );
71
 };
68
 };
72
 
69
 
73
 module.exports = Recording;
70
 module.exports = Recording;

Laddar…
Avbryt
Spara