Переглянути джерело

Merge pull request #239 from jitsi/es2015

Enable ES6/ES2015
master
hristoterezov 9 роки тому
джерело
коміт
56c4a456fa

+ 1
- 1
JitsiConference.js Переглянути файл

412
         track.videoType !== VideoType.DESKTOP)) {
412
         track.videoType !== VideoType.DESKTOP)) {
413
         // Report active device to statistics
413
         // Report active device to statistics
414
         var devices = RTC.getCurrentlyAvailableMediaDevices();
414
         var devices = RTC.getCurrentlyAvailableMediaDevices();
415
-        device = devices.find(function (d) {
415
+        var device = devices.find(function (d) {
416
             return d.kind === track.getTrack().kind + 'input'
416
             return d.kind === track.getTrack().kind + 'input'
417
                 && d.label === track.getTrack().label;
417
                 && d.label === track.getTrack().label;
418
         });
418
         });

+ 0
- 3
JitsiMeetJS.js Переглянути файл

337
     }
337
     }
338
 };
338
 };
339
 
339
 
340
-//Setups the promise object.
341
-window.Promise = window.Promise || require("es6-promise").Promise;
342
-
343
 module.exports = LibJitsiMeet;
340
 module.exports = LibJitsiMeet;

+ 1
- 1
modules/statistics/RTPStatsCollector.js Переглянути файл

504
     }
504
     }
505
 
505
 
506
     var getStatValue = this._getStatValue;
506
     var getStatValue = this._getStatValue;
507
-    byteSentStats = {};
507
+    var byteSentStats = {};
508
 
508
 
509
     for (var idx in this.currentStatsReport) {
509
     for (var idx in this.currentStatsReport) {
510
         var now = this.currentStatsReport[idx];
510
         var now = this.currentStatsReport[idx];

+ 1
- 1
modules/xmpp/SDPUtil.js Переглянути файл

2
 var RTCBrowserType = require("../RTC/RTCBrowserType");
2
 var RTCBrowserType = require("../RTC/RTCBrowserType");
3
 
3
 
4
 
4
 
5
-SDPUtil = {
5
+var SDPUtil = {
6
     filter_special_chars: function (text) {
6
     filter_special_chars: function (text) {
7
         // XXX Neither one of the falsy values (e.g. null, undefined, false,
7
         // XXX Neither one of the falsy values (e.g. null, undefined, false,
8
         // "", etc.) "contain" special chars.
8
         // "", etc.) "contain" special chars.

+ 1
- 1
modules/xmpp/TraceablePeerConnection.js Переглянути файл

488
         // Removing all cached ssrcs for the streams that are removed or
488
         // Removing all cached ssrcs for the streams that are removed or
489
         // muted.
489
         // muted.
490
         if(ssrcInfo && this.replaceSSRCs[ssrcInfo.mtype]) {
490
         if(ssrcInfo && this.replaceSSRCs[ssrcInfo.mtype]) {
491
-            for(i = 0; i < this.replaceSSRCs[ssrcInfo.mtype].length; i++) {
491
+            for(var i = 0; i < this.replaceSSRCs[ssrcInfo.mtype].length; i++) {
492
                 var op = this.replaceSSRCs[ssrcInfo.mtype][i];
492
                 var op = this.replaceSSRCs[ssrcInfo.mtype][i];
493
                 if(op.type === "unmute" &&
493
                 if(op.type === "unmute" &&
494
                     op.ssrc.ssrcs.join("_") ===
494
                     op.ssrc.ssrcs.join("_") ===

+ 13
- 1
package.json Переглянути файл

23
     "async": "0.9.0",
23
     "async": "0.9.0",
24
     "retry": "0.6.1",
24
     "retry": "0.6.1",
25
     "jssha": "1.5.0",
25
     "jssha": "1.5.0",
26
-    "es6-promise": "*",
27
     "jitsi-meet-logger": "git+https://github.com/jitsi/jitsi-meet-logger.git",
26
     "jitsi-meet-logger": "git+https://github.com/jitsi/jitsi-meet-logger.git",
28
     "strophe": "^1.2.2",
27
     "strophe": "^1.2.2",
29
     "strophejs-plugins": "^0.0.6",
28
     "strophejs-plugins": "^0.0.6",
31
     "current-executing-script": "*"
30
     "current-executing-script": "*"
32
   },
31
   },
33
   "devDependencies": {
32
   "devDependencies": {
33
+    "babelify": "*",
34
+    "babel-preset-es2015": "*",
35
+    "babel-polyfill": "*",
34
     "browserify": "11.1.x",
36
     "browserify": "11.1.x",
35
     "jshint": "^2.8.0",
37
     "jshint": "^2.8.0",
36
     "precommit-hook": "^3.0.0",
38
     "precommit-hook": "^3.0.0",
38
     "uglify-js": "2.4.24",
40
     "uglify-js": "2.4.24",
39
     "watchify": "^3.7.0"
41
     "watchify": "^3.7.0"
40
   },
42
   },
43
+  "babel": {
44
+    "presets": ["es2015"]
45
+  },
46
+  "browserify": {
47
+    "transform": [
48
+      ["babelify", {
49
+        "ignore": ["node_modules", "modules/RTC/adapter.screenshare.js"]
50
+      }]
51
+    ]
52
+  },
41
   "scripts": {
53
   "scripts": {
42
     "install": "npm run browserify && npm run version && npm run uglifyjs",
54
     "install": "npm run browserify && npm run version && npm run uglifyjs",
43
 
55
 

Завантаження…
Відмінити
Зберегти