Browse Source

Enables the jshint maximum line length check (80 chars) globally, and only overrides it in certain files.

j8
Boris Grozev 9 years ago
parent
commit
bd58e6c799
39 changed files with 89 additions and 35 deletions
  1. 1
    2
      .jshintrc
  2. 7
    4
      app.js
  3. 1
    0
      config.js
  4. 6
    3
      external_api.js
  5. 6
    3
      modules/API/API.js
  6. 1
    0
      modules/RTC/DataChannels.js
  7. 8
    4
      modules/RTC/RTC.js
  8. 1
    0
      modules/RTC/RTCUtils.js
  9. 1
    0
      modules/UI/UI.js
  10. 1
    0
      modules/UI/audio_levels/AudioLevels.js
  11. 2
    1
      modules/UI/etherpad/Etherpad.js
  12. 1
    0
      modules/UI/prezi/PreziPlayer.js
  13. 5
    2
      modules/UI/side_pannels/SidePanelToggler.js
  14. 2
    1
      modules/UI/side_pannels/chat/Chat.js
  15. 1
    0
      modules/UI/side_pannels/chat/Replacement.js
  16. 2
    1
      modules/UI/side_pannels/settings/SettingsMenu.js
  17. 1
    0
      modules/UI/toolbars/Toolbar.js
  18. 2
    1
      modules/UI/util/JitsiPopover.js
  19. 1
    0
      modules/UI/util/MessageHandler.js
  20. 1
    0
      modules/UI/videolayout/ConnectionIndicator.js
  21. 1
    0
      modules/UI/videolayout/LargeVideo.js
  22. 1
    0
      modules/UI/videolayout/SmallVideo.js
  23. 1
    0
      modules/UI/videolayout/VideoLayout.js
  24. 1
    0
      modules/UI/welcome_page/RoomnameGenerator.js
  25. 1
    0
      modules/connectionquality/connectionquality.js
  26. 2
    1
      modules/keyboardshortcut/keyboardshortcut.js
  27. 2
    1
      modules/statistics/LocalStatsCollector.js
  28. 1
    0
      modules/statistics/RTPStatsCollector.js
  29. 6
    3
      modules/statistics/statistics.js
  30. 2
    1
      modules/translation/translation.js
  31. 1
    0
      modules/xmpp/JingleSessionPC.js
  32. 1
    0
      modules/xmpp/SDP.js
  33. 1
    0
      modules/xmpp/SDPUtil.js
  34. 1
    0
      modules/xmpp/TraceablePeerConnection.js
  35. 8
    3
      modules/xmpp/recording.js
  36. 1
    0
      modules/xmpp/strophe.jingle.js
  37. 2
    1
      modules/xmpp/strophe.moderate.js
  38. 4
    3
      modules/xmpp/strophe.rayo.js
  39. 1
    0
      modules/xmpp/xmpp.js

+ 1
- 2
.jshintrc View File

13
     "indent": 4, // {int} Number of spaces to use for indentation
13
     "indent": 4, // {int} Number of spaces to use for indentation
14
     "latedef": true, // true: Require variables/functions to be defined before being used
14
     "latedef": true, // true: Require variables/functions to be defined before being used
15
     "newcap": true, // true: Require capitalization of all constructor functions e.g. `new F()`
15
     "newcap": true, // true: Require capitalization of all constructor functions e.g. `new F()`
16
-    //TODO: set to 80 when the code is compliant..
17
-    "maxlen": 1000, // {int} Max number of characters per line
16
+    "maxlen": 80, // {int} Max number of characters per line
18
     "latedef": false, //This option prohibits the use of a variable before it was defined
17
     "latedef": false, //This option prohibits the use of a variable before it was defined
19
     "laxbreak": true //Ignore line breaks around "=", "==", "&&", etc.
18
     "laxbreak": true //Ignore line breaks around "=", "==", "&&", etc.
20
 }
19
 }

+ 7
- 4
app.js View File

6
     init: function () {
6
     init: function () {
7
         this.UI = require("./modules/UI/UI");
7
         this.UI = require("./modules/UI/UI");
8
         this.API = require("./modules/API/API");
8
         this.API = require("./modules/API/API");
9
-        this.connectionquality = require("./modules/connectionquality/connectionquality");
9
+        this.connectionquality =
10
+            require("./modules/connectionquality/connectionquality");
10
         this.statistics = require("./modules/statistics/statistics");
11
         this.statistics = require("./modules/statistics/statistics");
11
         this.RTC = require("./modules/RTC/RTC");
12
         this.RTC = require("./modules/RTC/RTC");
12
-        this.desktopsharing = require("./modules/desktopsharing/desktopsharing");
13
+        this.desktopsharing =
14
+            require("./modules/desktopsharing/desktopsharing");
13
         this.xmpp = require("./modules/xmpp/xmpp");
15
         this.xmpp = require("./modules/xmpp/xmpp");
14
-        this.keyboardshortcut = require("./modules/keyboardshortcut/keyboardshortcut");
16
+        this.keyboardshortcut =
17
+            require("./modules/keyboardshortcut/keyboardshortcut");
15
         this.translation = require("./modules/translation/translation");
18
         this.translation = require("./modules/translation/translation");
16
         this.settings = require("./modules/settings/Settings");
19
         this.settings = require("./modules/settings/Settings");
17
-        this.DTMF = require("./modules/DTMF/DTMF");
20
+        //this.DTMF = require("./modules/DTMF/DTMF");
18
         this.members = require("./modules/members/MemberList");
21
         this.members = require("./modules/members/MemberList");
19
         this.configFetch = require("./modules/config/HttpConfigFetch");
22
         this.configFetch = require("./modules/config/HttpConfigFetch");
20
     }
23
     }

+ 1
- 0
config.js View File

1
+/* jshint -W101 */
1
 var config = {
2
 var config = {
2
 //    configLocation: './config.json', // see ./modules/HttpConfigFetch.js
3
 //    configLocation: './config.json', // see ./modules/HttpConfigFetch.js
3
     hosts: {
4
     hosts: {

+ 6
- 3
external_api.js View File

70
                 if (!interfaceConfigOverwrite.hasOwnProperty(key) ||
70
                 if (!interfaceConfigOverwrite.hasOwnProperty(key) ||
71
                     typeof key !== 'string')
71
                     typeof key !== 'string')
72
                     continue;
72
                     continue;
73
-                this.url += "&interfaceConfig." + key + "=" + interfaceConfigOverwrite[key];
73
+                this.url += "&interfaceConfig." + key + "=" +
74
+                    interfaceConfigOverwrite[key];
74
             }
75
             }
75
         }
76
         }
76
 
77
 
180
      * {{
181
      * {{
181
      * jid: jid //the jid of the participant
182
      * jid: jid //the jid of the participant
182
      * }}
183
      * }}
183
-     * participantLeft - receives event notifications about participant that left room.
184
+     * participantLeft - receives event notifications about the participant that
185
+     * left the room.
184
      * The listener will receive object with the following structure:
186
      * The listener will receive object with the following structure:
185
      * {{
187
      * {{
186
      * jid: jid //the jid of the participant
188
      * jid: jid //the jid of the participant
225
      * {{
227
      * {{
226
      * jid: jid //the jid of the participant
228
      * jid: jid //the jid of the participant
227
      * }}
229
      * }}
228
-     * participantLeft - receives event notifications about participant that left room.
230
+     * participantLeft - receives event notifications about participant the that
231
+     * left the room.
229
      * The listener will receive object with the following structure:
232
      * The listener will receive object with the following structure:
230
      * {{
233
      * {{
231
      * jid: jid //the jid of the participant
234
      * jid: jid //the jid of the participant

+ 6
- 3
modules/API/API.js View File

132
     APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_JOINED, function (from) {
132
     APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_JOINED, function (from) {
133
         API.triggerEvent("participantJoined", {jid: from});
133
         API.triggerEvent("participantJoined", {jid: from});
134
     });
134
     });
135
-    APP.xmpp.addListener(XMPPEvents.MESSAGE_RECEIVED, function (from, nick, txt, myjid, stamp) {
135
+    APP.xmpp.addListener(XMPPEvents.MESSAGE_RECEIVED,
136
+                         function (from, nick, txt, myjid, stamp) {
136
         if (from != myjid)
137
         if (from != myjid)
137
             API.triggerEvent("incomingMessage",
138
             API.triggerEvent("incomingMessage",
138
                 {"from": from, "nick": nick, "message": txt, "stamp": stamp});
139
                 {"from": from, "nick": nick, "message": txt, "stamp": stamp});
140
     APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_LEFT, function (jid) {
141
     APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_LEFT, function (jid) {
141
         API.triggerEvent("participantLeft", {jid: jid});
142
         API.triggerEvent("participantLeft", {jid: jid});
142
     });
143
     });
143
-    APP.xmpp.addListener(XMPPEvents.DISPLAY_NAME_CHANGED, function (jid, newDisplayName) {
144
+    APP.xmpp.addListener(XMPPEvents.DISPLAY_NAME_CHANGED,
145
+                         function (jid, newDisplayName) {
144
         var name = displayName[jid];
146
         var name = displayName[jid];
145
         if(!name || name != newDisplayName) {
147
         if(!name || name != newDisplayName) {
146
-            API.triggerEvent("displayNameChange", {jid: jid, displayname: newDisplayName});
148
+            API.triggerEvent("displayNameChange",
149
+                             {jid: jid, displayname: newDisplayName});
147
             displayName[jid] = newDisplayName;
150
             displayName[jid] = newDisplayName;
148
         }
151
         }
149
     });
152
     });

+ 1
- 0
modules/RTC/DataChannels.js View File

1
 /* global config, APP, Strophe */
1
 /* global config, APP, Strophe */
2
+/* jshint -W101 */
2
 
3
 
3
 // cache datachannels to avoid garbage collection
4
 // cache datachannels to avoid garbage collection
4
 // https://code.google.com/p/chromium/issues/detail?id=405545
5
 // https://code.google.com/p/chromium/issues/detail?id=405545

+ 8
- 4
modules/RTC/RTC.js View File

65
 
65
 
66
         eventEmitter.removeListener(eventType, listener);
66
         eventEmitter.removeListener(eventType, listener);
67
     },
67
     },
68
-    createLocalStream: function (stream, type, change, videoType, isMuted, isGUMStream) {
68
+    createLocalStream: function (stream, type, change, videoType,
69
+                                 isMuted, isGUMStream) {
69
 
70
 
70
-        var localStream =  new LocalStream(stream, type, eventEmitter, videoType, isGUMStream);
71
+        var localStream =
72
+            new LocalStream(stream, type, eventEmitter, videoType, isGUMStream);
71
         //in firefox we have only one stream object
73
         //in firefox we have only one stream object
72
         if(this.localStreams.length === 0 ||
74
         if(this.localStreams.length === 0 ||
73
             this.localStreams[0].getOriginalStream() != stream)
75
             this.localStreams[0].getOriginalStream() != stream)
112
             this.remoteStreams[jid] = {};
114
             this.remoteStreams[jid] = {};
113
         }
115
         }
114
         this.remoteStreams[jid][remoteStream.type]= remoteStream;
116
         this.remoteStreams[jid][remoteStream.type]= remoteStream;
115
-        eventEmitter.emit(StreamEventTypes.EVENT_TYPE_REMOTE_CREATED, remoteStream);
117
+        eventEmitter.emit(StreamEventTypes.EVENT_TYPE_REMOTE_CREATED,
118
+                          remoteStream);
116
         return remoteStream;
119
         return remoteStream;
117
     },
120
     },
118
     getPCConstraints: function () {
121
     getPCConstraints: function () {
224
             stream = stream.videoStream;
227
             stream = stream.videoStream;
225
         }
228
         }
226
         var videoStream = this.rtcUtils.createStream(stream, true);
229
         var videoStream = this.rtcUtils.createStream(stream, true);
227
-        this.localVideo = this.createLocalStream(videoStream, "video", true, type);
230
+        this.localVideo =
231
+            this.createLocalStream(videoStream, "video", true, type);
228
         // Stop the stream to trigger onended event for old stream
232
         // Stop the stream to trigger onended event for old stream
229
         oldStream.stop();
233
         oldStream.stop();
230
 
234
 

+ 1
- 0
modules/RTC/RTCUtils.js View File

1
 /* global APP, config, require, attachMediaStream, getUserMedia,
1
 /* global APP, config, require, attachMediaStream, getUserMedia,
2
     RTCPeerConnection, webkitMediaStream, webkitURL, webkitRTCPeerConnection,
2
     RTCPeerConnection, webkitMediaStream, webkitURL, webkitRTCPeerConnection,
3
     mozRTCIceCandidate, mozRTCSessionDescription, mozRTCPeerConnection */
3
     mozRTCIceCandidate, mozRTCSessionDescription, mozRTCPeerConnection */
4
+/* jshint -W101 */
4
 var RTCBrowserType = require("./RTCBrowserType");
5
 var RTCBrowserType = require("./RTCBrowserType");
5
 var Resolutions = require("../../service/RTC/Resolutions");
6
 var Resolutions = require("../../service/RTC/Resolutions");
6
 var AdapterJS = require("./adapter.screenshare");
7
 var AdapterJS = require("./adapter.screenshare");

+ 1
- 0
modules/UI/UI.js View File

1
 /* global Strophe, APP, $, config, interfaceConfig, toastr */
1
 /* global Strophe, APP, $, config, interfaceConfig, toastr */
2
+/* jshint -W101 */
2
 var UI = {};
3
 var UI = {};
3
 
4
 
4
 var VideoLayout = require("./videolayout/VideoLayout.js");
5
 var VideoLayout = require("./videolayout/VideoLayout.js");

+ 1
- 0
modules/UI/audio_levels/AudioLevels.js View File

1
 /* global APP, interfaceConfig, $, Strophe */
1
 /* global APP, interfaceConfig, $, Strophe */
2
+/* jshint -W101 */
2
 var CanvasUtil = require("./CanvasUtils");
3
 var CanvasUtil = require("./CanvasUtils");
3
 
4
 
4
 var ASDrawContext = null;
5
 var ASDrawContext = null;

+ 2
- 1
modules/UI/etherpad/Etherpad.js View File

8
 var etherpadName = null;
8
 var etherpadName = null;
9
 var etherpadIFrame = null;
9
 var etherpadIFrame = null;
10
 var domain = null;
10
 var domain = null;
11
-var options = "?showControls=true&showChat=false&showLineNumbers=true&useMonospaceFont=false";
11
+var options = "?showControls=true&showChat=false&showLineNumbers=true" +
12
+    "&useMonospaceFont=false";
12
 
13
 
13
 
14
 
14
 /**
15
 /**

+ 1
- 0
modules/UI/prezi/PreziPlayer.js View File

1
 /* global PreziPlayer */
1
 /* global PreziPlayer */
2
+/* jshint -W101 */
2
 (function() {
3
 (function() {
3
     "use strict";
4
     "use strict";
4
     var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
5
     var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

+ 5
- 2
modules/UI/side_pannels/SidePanelToggler.js View File

103
         toggle(Chat,
103
         toggle(Chat,
104
             '#chatspace',
104
             '#chatspace',
105
             function () {
105
             function () {
106
-                // Request the focus in the nickname field or the chat input field.
106
+                // Request the focus in the nickname field or the chat input
107
+                // field.
107
                 if ($('#nickname').css('visibility') === 'visible') {
108
                 if ($('#nickname').css('visibility') === 'visible') {
108
                     $('#nickinput').focus();
109
                     $('#nickinput').focus();
109
                 } else {
110
                 } else {
164
     };
165
     };
165
 
166
 
166
     my.isVisible = function() {
167
     my.isVisible = function() {
167
-        return (Chat.isVisible() || ContactList.isVisible() || SettingsMenu.isVisible());
168
+        return (Chat.isVisible() ||
169
+                ContactList.isVisible() ||
170
+                SettingsMenu.isVisible());
168
     };
171
     };
169
 
172
 
170
     return my;
173
     return my;

+ 2
- 1
modules/UI/side_pannels/chat/Chat.js View File

203
                 }
203
                 }
204
                 else {
204
                 else {
205
                     var message = UIUtil.escapeHtml(value);
205
                     var message = UIUtil.escapeHtml(value);
206
-                    APP.xmpp.sendChatMessage(message, NicknameHandler.getNickname());
206
+                    APP.xmpp.sendChatMessage(message,
207
+                                             NicknameHandler.getNickname());
207
                 }
208
                 }
208
             }
209
             }
209
         });
210
         });

+ 1
- 0
modules/UI/side_pannels/chat/Replacement.js View File

1
+/* jshint -W101 */
1
 var Smileys = require("./smileys.json");
2
 var Smileys = require("./smileys.json");
2
 /**
3
 /**
3
  * Processes links and smileys in "body"
4
  * Processes links and smileys in "body"

+ 2
- 1
modules/UI/side_pannels/settings/SettingsMenu.js View File

61
     },
61
     },
62
 
62
 
63
     update: function() {
63
     update: function() {
64
-        var newDisplayName = UIUtil.escapeHtml($('#setDisplayName').get(0).value);
64
+        var newDisplayName =
65
+            UIUtil.escapeHtml($('#setDisplayName').get(0).value);
65
         var newEmail = UIUtil.escapeHtml($('#setEmail').get(0).value);
66
         var newEmail = UIUtil.escapeHtml($('#setEmail').get(0).value);
66
 
67
 
67
         if(newDisplayName) {
68
         if(newDisplayName) {

+ 1
- 0
modules/UI/toolbars/Toolbar.js View File

1
 /* global APP, $, buttonClick, config, lockRoom, interfaceConfig, setSharedKey,
1
 /* global APP, $, buttonClick, config, lockRoom, interfaceConfig, setSharedKey,
2
  Util */
2
  Util */
3
+/* jshint -W101 */
3
 var messageHandler = require("../util/MessageHandler");
4
 var messageHandler = require("../util/MessageHandler");
4
 var BottomToolbar = require("./BottomToolbar");
5
 var BottomToolbar = require("./BottomToolbar");
5
 var Prezi = require("../prezi/Prezi");
6
 var Prezi = require("../prezi/Prezi");

+ 2
- 1
modules/UI/util/JitsiPopover.js View File

28
         element.data("jitsi_popover", this);
28
         element.data("jitsi_popover", this);
29
         this.element = element;
29
         this.element = element;
30
         this.template = ' <div class="jitsipopover ' + this.options.skin +
30
         this.template = ' <div class="jitsipopover ' + this.options.skin +
31
-            '"><div class="arrow"></div><div class="jitsipopover-content"></div>' +
31
+            '"><div class="arrow"></div>' +
32
+            '<div class="jitsipopover-content"></div>' +
32
             '<div class="jitsiPopupmenuPadding"></div></div>';
33
             '<div class="jitsiPopupmenuPadding"></div></div>';
33
         var self = this;
34
         var self = this;
34
         this.element.on("mouseenter", function () {
35
         this.element.on("mouseenter", function () {

+ 1
- 0
modules/UI/util/MessageHandler.js View File

1
 /* global $, APP, jQuery, toastr, Impromptu */
1
 /* global $, APP, jQuery, toastr, Impromptu */
2
+/* jshint -W101 */
2
 
3
 
3
 /**
4
 /**
4
  * Flag for enable/disable of the notifications.
5
  * Flag for enable/disable of the notifications.

+ 1
- 0
modules/UI/videolayout/ConnectionIndicator.js View File

1
 /* global APP, $ */
1
 /* global APP, $ */
2
+/* jshint -W101 */
2
 var JitsiPopover = require("../util/JitsiPopover");
3
 var JitsiPopover = require("../util/JitsiPopover");
3
 
4
 
4
 /**
5
 /**

+ 1
- 0
modules/UI/videolayout/LargeVideo.js View File

1
 /* global $, APP, Strophe, interfaceConfig */
1
 /* global $, APP, Strophe, interfaceConfig */
2
+/* jshint -W101 */
2
 var Avatar = require("../avatar/Avatar");
3
 var Avatar = require("../avatar/Avatar");
3
 var RTCBrowserType = require("../../RTC/RTCBrowserType");
4
 var RTCBrowserType = require("../../RTC/RTCBrowserType");
4
 var UIUtil = require("../util/UIUtil");
5
 var UIUtil = require("../util/UIUtil");

+ 1
- 0
modules/UI/videolayout/SmallVideo.js View File

1
 /* global $, APP, require */
1
 /* global $, APP, require */
2
+/* jshint -W101 */
2
 var Avatar = require("../avatar/Avatar");
3
 var Avatar = require("../avatar/Avatar");
3
 var UIUtil = require("../util/UIUtil");
4
 var UIUtil = require("../util/UIUtil");
4
 var LargeVideo = require("./LargeVideo");
5
 var LargeVideo = require("./LargeVideo");

+ 1
- 0
modules/UI/videolayout/VideoLayout.js View File

1
 /* global config, APP, $, Strophe, require, interfaceConfig */
1
 /* global config, APP, $, Strophe, require, interfaceConfig */
2
+/* jshint -W101 */
2
 var AudioLevels = require("../audio_levels/AudioLevels");
3
 var AudioLevels = require("../audio_levels/AudioLevels");
3
 var ContactList = require("../side_pannels/contactlist/ContactList");
4
 var ContactList = require("../side_pannels/contactlist/ContactList");
4
 var MediaStreamType = require("../../../service/RTC/MediaStreamTypes");
5
 var MediaStreamType = require("../../../service/RTC/MediaStreamTypes");

+ 1
- 0
modules/UI/welcome_page/RoomnameGenerator.js View File

1
+/* jshint -W101 */
1
 //var nouns = [
2
 //var nouns = [
2
 //];
3
 //];
3
 var pluralNouns = [
4
 var pluralNouns = [

+ 1
- 0
modules/connectionquality/connectionquality.js View File

1
 /* global APP, require */
1
 /* global APP, require */
2
+/* jshint -W101 */
2
 var EventEmitter = require("events");
3
 var EventEmitter = require("events");
3
 var eventEmitter = new EventEmitter();
4
 var eventEmitter = new EventEmitter();
4
 var CQEvents = require("../../service/connectionquality/CQEvents");
5
 var CQEvents = require("../../service/connectionquality/CQEvents");

+ 2
- 1
modules/keyboardshortcut/keyboardshortcut.js View File

51
                     APP.UI.clickOnVideo(keycode - "0".charCodeAt(0) + 1);
51
                     APP.UI.clickOnVideo(keycode - "0".charCodeAt(0) + 1);
52
                 }
52
                 }
53
                 //esc while the smileys are visible hides them
53
                 //esc while the smileys are visible hides them
54
-            } else if (keycode === 27 && $('#smileysContainer').is(':visible')) {
54
+            } else if (keycode === 27 &&
55
+                $('#smileysContainer').is(':visible')) {
55
                 APP.UI.toggleSmileys();
56
                 APP.UI.toggleSmileys();
56
             }
57
             }
57
         };
58
         };

+ 2
- 1
modules/statistics/LocalStatsCollector.js View File

66
  * @param interval stats refresh interval given in ms.
66
  * @param interval stats refresh interval given in ms.
67
  * @constructor
67
  * @constructor
68
  */
68
  */
69
-function LocalStatsCollector(stream, interval, statisticsService, eventEmitter) {
69
+function LocalStatsCollector(stream, interval,
70
+                             statisticsService, eventEmitter) {
70
     window.AudioContext = window.AudioContext || window.webkitAudioContext;
71
     window.AudioContext = window.AudioContext || window.webkitAudioContext;
71
     this.stream = stream;
72
     this.stream = stream;
72
     this.intervalId = null;
73
     this.intervalId = null;

+ 1
- 0
modules/statistics/RTPStatsCollector.js View File

1
 /* global require, ssrc2jid */
1
 /* global require, ssrc2jid */
2
 /* jshint -W117 */
2
 /* jshint -W117 */
3
+/* jshint -W101 */
3
 var RTCBrowserType = require("../RTC/RTCBrowserType");
4
 var RTCBrowserType = require("../RTC/RTCBrowserType");
4
 
5
 
5
 /* Whether we support the browser we are running into for logging statistics */
6
 /* Whether we support the browser we are running into for logging statistics */

+ 6
- 3
modules/statistics/statistics.js View File

114
     start: function () {
114
     start: function () {
115
         APP.RTC.addStreamListener(onStreamCreated,
115
         APP.RTC.addStreamListener(onStreamCreated,
116
             StreamEventTypes.EVENT_TYPE_LOCAL_CREATED);
116
             StreamEventTypes.EVENT_TYPE_LOCAL_CREATED);
117
-        APP.xmpp.addListener(XMPPEvents.DISPOSE_CONFERENCE, onDisposeConference);
118
-        //FIXME: we may want to change CALL INCOMING event to onnegotiationneeded
117
+        APP.xmpp.addListener(XMPPEvents.DISPOSE_CONFERENCE,
118
+                             onDisposeConference);
119
+        //FIXME: we may want to change CALL INCOMING event to
120
+        // onnegotiationneeded
119
         APP.xmpp.addListener(XMPPEvents.CALL_INCOMING, function (event) {
121
         APP.xmpp.addListener(XMPPEvents.CALL_INCOMING, function (event) {
120
             startRemoteStats(event.peerconnection);
122
             startRemoteStats(event.peerconnection);
121
 //            CallStats.init(event);
123
 //            CallStats.init(event);
122
         });
124
         });
123
-        APP.xmpp.addListener(XMPPEvents.PEERCONNECTION_READY, function (session) {
125
+        APP.xmpp.addListener(XMPPEvents.PEERCONNECTION_READY,
126
+            function (session) {
124
             CallStats.init(session);
127
             CallStats.init(session);
125
         });
128
         });
126
         APP.RTC.addListener(RTCEvents.AUDIO_MUTE, function (mute) {
129
         APP.RTC.addListener(RTCEvents.AUDIO_MUTE, function (mute) {

+ 2
- 1
modules/translation/translation.js View File

31
         var resPath = "lang/__ns__-__lng__.json";
31
         var resPath = "lang/__ns__-__lng__.json";
32
         if(lng === languages.EN)
32
         if(lng === languages.EN)
33
             resPath = "lang/__ns__.json";
33
             resPath = "lang/__ns__.json";
34
-        var url = i18n.functions.applyReplacement(resPath, { lng: lng, ns: ns });
34
+        var url = i18n.functions.applyReplacement(resPath,
35
+                                                 { lng: lng, ns: ns });
35
         i18n.functions.ajax({
36
         i18n.functions.ajax({
36
             url: url,
37
             url: url,
37
             success: function(data, status, xhr) {
38
             success: function(data, status, xhr) {

+ 1
- 0
modules/xmpp/JingleSessionPC.js View File

1
 /* jshint -W117 */
1
 /* jshint -W117 */
2
+/* jshint -W101 */
2
 var JingleSession = require("./JingleSession");
3
 var JingleSession = require("./JingleSession");
3
 var TraceablePeerConnection = require("./TraceablePeerConnection");
4
 var TraceablePeerConnection = require("./TraceablePeerConnection");
4
 var SDPDiffer = require("./SDPDiffer");
5
 var SDPDiffer = require("./SDPDiffer");

+ 1
- 0
modules/xmpp/SDP.js View File

1
+/* jshint -W101 */
1
 /* jshint -W117 */
2
 /* jshint -W117 */
2
 var SDPUtil = require("./SDPUtil");
3
 var SDPUtil = require("./SDPUtil");
3
 
4
 

+ 1
- 0
modules/xmpp/SDPUtil.js View File

1
+/* jshint -W101 */
1
 var SDPUtil = {
2
 var SDPUtil = {
2
     filter_special_chars: function (text) {
3
     filter_special_chars: function (text) {
3
         return text.replace(/[\\\/\{,\}\+]/g, "");
4
         return text.replace(/[\\\/\{,\}\+]/g, "");

+ 1
- 0
modules/xmpp/TraceablePeerConnection.js View File

1
 /* global $, config, mozRTCPeerConnection, RTCPeerConnection,
1
 /* global $, config, mozRTCPeerConnection, RTCPeerConnection,
2
     webkitRTCPeerConnection, RTCSessionDescription */
2
     webkitRTCPeerConnection, RTCSessionDescription */
3
+/* jshint -W101 */
3
 var RTC = require('../RTC/RTC');
4
 var RTC = require('../RTC/RTC');
4
 var RTCBrowserType = require("../RTC/RTCBrowserType.js");
5
 var RTCBrowserType = require("../RTC/RTCBrowserType.js");
5
 var XMPPEvents = require("../../service/xmpp/XMPPEvents");
6
 var XMPPEvents = require("../../service/xmpp/XMPPEvents");

+ 8
- 3
modules/xmpp/recording.js View File

50
             // TODO wait for an IQ with the real status, since this is
50
             // TODO wait for an IQ with the real status, since this is
51
             // provisional?
51
             // provisional?
52
             jireconRid = $(result).find('recording').attr('rid');
52
             jireconRid = $(result).find('recording').attr('rid');
53
-            console.log('Recording ' + ((state === 'on') ? 'started' : 'stopped') +
53
+            console.log('Recording ' +
54
+                ((state === 'on') ? 'started' : 'stopped') +
54
                 '(jirecon)' + result);
55
                 '(jirecon)' + result);
55
             recordingEnabled = state;
56
             recordingEnabled = state;
56
             if (state === 'off'){
57
             if (state === 'off'){
113
         useJirecon = config.hosts &&
114
         useJirecon = config.hosts &&
114
             (typeof config.hosts.jirecon != "undefined");
115
             (typeof config.hosts.jirecon != "undefined");
115
     },
116
     },
116
-    toggleRecording: function (tokenEmptyCallback, recordingStateChangeCallback, connection) {
117
+    toggleRecording: function (tokenEmptyCallback,
118
+                               recordingStateChangeCallback,
119
+                               connection) {
117
         if (!Moderator.isModerator()) {
120
         if (!Moderator.isModerator()) {
118
             console.log(
121
             console.log(
119
                     'non-focus, or conference not yet organized:' +
122
                     'non-focus, or conference not yet organized:' +
126
         if (!recordingToken && !useJirecon) {
129
         if (!recordingToken && !useJirecon) {
127
             tokenEmptyCallback(function (value) {
130
             tokenEmptyCallback(function (value) {
128
                 setRecordingToken(value);
131
                 setRecordingToken(value);
129
-                self.toggleRecording(tokenEmptyCallback, recordingStateChangeCallback, connection);
132
+                self.toggleRecording(tokenEmptyCallback,
133
+                                     recordingStateChangeCallback,
134
+                                     connection);
130
             });
135
             });
131
 
136
 
132
             return;
137
             return;

+ 1
- 0
modules/xmpp/strophe.jingle.js View File

1
 /* jshint -W117 */
1
 /* jshint -W117 */
2
+/* jshint -W101 */
2
 
3
 
3
 var JingleSession = require("./JingleSessionPC");
4
 var JingleSession = require("./JingleSessionPC");
4
 var XMPPEvents = require("../../service/xmpp/XMPPEvents");
5
 var XMPPEvents = require("../../service/xmpp/XMPPEvents");

+ 2
- 1
modules/xmpp/strophe.moderate.js View File

20
         },
20
         },
21
         setMute: function (jid, mute) {
21
         setMute: function (jid, mute) {
22
             console.info("set mute", mute);
22
             console.info("set mute", mute);
23
-            var iqToFocus = $iq({to: this.connection.emuc.focusMucJid, type: 'set'})
23
+            var iqToFocus =
24
+                $iq({to: this.connection.emuc.focusMucJid, type: 'set'})
24
                 .c('mute', {
25
                 .c('mute', {
25
                     xmlns: 'http://jitsi.org/jitmeet/audio',
26
                     xmlns: 'http://jitsi.org/jitmeet/audio',
26
                     jid: jid
27
                     jid: jid

+ 4
- 3
modules/xmpp/strophe.rayo.js View File

11
                 }
11
                 }
12
 
12
 
13
                 this.connection.addHandler(
13
                 this.connection.addHandler(
14
-                    this.onRayo.bind(this), this.RAYO_XMLNS, 'iq', 'set', null, null);
14
+                    this.onRayo.bind(this), this.RAYO_XMLNS, 'iq', 'set',
15
+                    null, null);
15
             },
16
             },
16
             onRayo: function (iq) {
17
             onRayo: function (iq) {
17
                 console.info("Rayo IQ", iq);
18
                 console.info("Rayo IQ", iq);
51
                         console.info('Dial result ', result);
52
                         console.info('Dial result ', result);
52
 
53
 
53
                         var resource = $(result).find('ref').attr('uri');
54
                         var resource = $(result).find('ref').attr('uri');
54
-                        this.call_resource = resource.substr('xmpp:'.length);
55
+                        self.call_resource = resource.substr('xmpp:'.length);
55
                         console.info(
56
                         console.info(
56
-                                "Received call resource: " + this.call_resource);
57
+                            "Received call resource: " + self.call_resource);
57
                     },
58
                     },
58
                     function (error) {
59
                     function (error) {
59
                         console.info('Dial error ', error);
60
                         console.info('Dial error ', error);

+ 1
- 0
modules/xmpp/xmpp.js View File

1
 /* global $, APP, config, Strophe, Base64, $msg */
1
 /* global $, APP, config, Strophe, Base64, $msg */
2
+/* jshint -W101 */
2
 var Moderator = require("./moderator");
3
 var Moderator = require("./moderator");
3
 var EventEmitter = require("events");
4
 var EventEmitter = require("events");
4
 var Recording = require("./recording");
5
 var Recording = require("./recording");

Loading…
Cancel
Save