@techsee/techsee-media-service 0.5.9 → 0.6.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,39 +1,55 @@
1
- "use strict";
1
+ 'use strict';
2
2
 
3
3
  var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
4
4
 
5
5
  (function (f) {
6
- if ((typeof exports === "undefined" ? "undefined" : _typeof2(exports)) === "object" && typeof module !== "undefined") {
6
+ if ((typeof exports === 'undefined' ? 'undefined' : _typeof2(exports)) === 'object' && typeof module !== 'undefined') {
7
7
  module.exports = f();
8
- } else if (typeof define === "function" && define.amd) {
8
+ } else if (typeof define === 'function' && define.amd) {
9
9
  define([], f);
10
10
  } else {
11
- var g;if (typeof window !== "undefined") {
11
+ var g;
12
+ if (typeof window !== 'undefined') {
12
13
  g = window;
13
- } else if (typeof global !== "undefined") {
14
+ } else if (typeof global !== 'undefined') {
14
15
  g = global;
15
- } else if (typeof self !== "undefined") {
16
+ } else if (typeof self !== 'undefined') {
16
17
  g = self;
17
18
  } else {
18
19
  g = this;
19
- }g.webrtcIeShim = f();
20
+ }
21
+ g.webrtcIeShim = f();
20
22
  }
21
23
  })(function () {
22
- var define, module, exports;return function () {
24
+ var define, module, exports;
25
+ return function () {
23
26
  function r(e, n, t) {
24
27
  function o(i, f) {
25
28
  if (!n[i]) {
26
29
  if (!e[i]) {
27
- var c = "function" == typeof require && require;if (!f && c) return c(i, !0);if (u) return u(i, !0);var a = new Error("Cannot find module '" + i + "'");throw a.code = "MODULE_NOT_FOUND", a;
28
- }var p = n[i] = { exports: {} };e[i][0].call(p.exports, function (r) {
29
- var n = e[i][1][r];return o(n || r);
30
+ var c = 'function' == typeof require && require;
31
+ if (!f && c) return c(i, !0);
32
+ if (u) return u(i, !0);
33
+ var a = new Error('Cannot find module \'' + i + '\'');
34
+ throw a.code = 'MODULE_NOT_FOUND', a;
35
+ }
36
+ var p = n[i] = { exports: {} };
37
+ e[i][0].call(p.exports, function (r) {
38
+ var n = e[i][1][r];
39
+ return o(n || r);
30
40
  }, p, p.exports, r, e, n, t);
31
- }return n[i].exports;
32
- }for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) {
41
+ }
42
+ return n[i].exports;
43
+ }
44
+
45
+ for (var u = 'function' == typeof require && require, i = 0; i < t.length; i++) {
33
46
  o(t[i]);
34
47
  }return o;
35
- }return r;
36
- }()({ 1: [function (require, module, exports) {
48
+ }
49
+
50
+ return r;
51
+ }()({
52
+ 1: [function (require, module, exports) {
37
53
  exports.endianness = function () {
38
54
  return 'LE';
39
55
  };
@@ -96,7 +112,8 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
96
112
  exports.homedir = function () {
97
113
  return '/';
98
114
  };
99
- }, {}], 2: [function (require, module, exports) {
115
+ }, {}],
116
+ 2: [function (require, module, exports) {
100
117
  // shim for using process in browser
101
118
  var process = module.exports = {};
102
119
 
@@ -111,9 +128,11 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
111
128
  function defaultSetTimout() {
112
129
  throw new Error('setTimeout has not been defined');
113
130
  }
131
+
114
132
  function defaultClearTimeout() {
115
133
  throw new Error('clearTimeout has not been defined');
116
134
  }
135
+
117
136
  (function () {
118
137
  try {
119
138
  if (typeof setTimeout === 'function') {
@@ -134,6 +153,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
134
153
  cachedClearTimeout = defaultClearTimeout;
135
154
  }
136
155
  })();
156
+
137
157
  function runTimeout(fun) {
138
158
  if (cachedSetTimeout === setTimeout) {
139
159
  //normal enviroments in sane situations
@@ -157,6 +177,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
157
177
  }
158
178
  }
159
179
  }
180
+
160
181
  function runClearTimeout(marker) {
161
182
  if (cachedClearTimeout === clearTimeout) {
162
183
  //normal enviroments in sane situations
@@ -181,6 +202,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
181
202
  }
182
203
  }
183
204
  }
205
+
184
206
  var queue = [];
185
207
  var draining = false;
186
208
  var currentQueue;
@@ -243,6 +265,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
243
265
  this.fun = fun;
244
266
  this.array = array;
245
267
  }
268
+
246
269
  Item.prototype.run = function () {
247
270
  this.fun.apply(null, this.array);
248
271
  };
@@ -282,7 +305,8 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
282
305
  process.umask = function () {
283
306
  return 0;
284
307
  };
285
- }, {}], 3: [function (require, module, exports) {
308
+ }, {}],
309
+ 3: [function (require, module, exports) {
286
310
  'use strict';
287
311
 
288
312
  var browser = require('detect-browser').detect();
@@ -418,7 +442,23 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
418
442
  VideoRenderer.handle(videos[i]);
419
443
  }
420
444
  }
421
- }, { "./lib/EventTarget.js": 4, "./lib/MediaDevices.js": 6, "./lib/MediaStream.js": 7, "./lib/MediaStreamTrack.js": 8, "./lib/RTCDataChannel.js": 9, "./lib/RTCIceCandidate.js": 10, "./lib/RTCPeerConnection.js": 11, "./lib/RTCRtpReceiver.js": 12, "./lib/RTCRtpSender.js": 13, "./lib/RTCRtpTransceiver.js": 14, "./lib/RTCSessionDescription.js": 15, "./lib/VideoRenderer.js": 16, "./lib/WebRTCProxy.js": 17, "detect-browser": 18 }], 4: [function (require, module, exports) {
445
+ }, {
446
+ './lib/EventTarget.js': 4,
447
+ './lib/MediaDevices.js': 6,
448
+ './lib/MediaStream.js': 7,
449
+ './lib/MediaStreamTrack.js': 8,
450
+ './lib/RTCDataChannel.js': 9,
451
+ './lib/RTCIceCandidate.js': 10,
452
+ './lib/RTCPeerConnection.js': 11,
453
+ './lib/RTCRtpReceiver.js': 12,
454
+ './lib/RTCRtpSender.js': 13,
455
+ './lib/RTCRtpTransceiver.js': 14,
456
+ './lib/RTCSessionDescription.js': 15,
457
+ './lib/VideoRenderer.js': 16,
458
+ './lib/WebRTCProxy.js': 17,
459
+ 'detect-browser': 18
460
+ }],
461
+ 4: [function (require, module, exports) {
422
462
  /**
423
463
  * @author Toru Nagashima <https://github.com/mysticatea>
424
464
  * @copyright 2015 Toru Nagashima. All rights reserved.
@@ -445,10 +485,10 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
445
485
  * @private
446
486
  */
447
487
 
448
- var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
449
- return typeof obj === "undefined" ? "undefined" : _typeof2(obj);
488
+ var _typeof = typeof Symbol === 'function' && _typeof2(Symbol.iterator) === 'symbol' ? function (obj) {
489
+ return typeof obj === 'undefined' ? 'undefined' : _typeof2(obj);
450
490
  } : function (obj) {
451
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj);
491
+ return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj === 'undefined' ? 'undefined' : _typeof2(obj);
452
492
  };
453
493
 
454
494
  var privateData = new WeakMap();
@@ -468,7 +508,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
468
508
  */
469
509
  function pd(event) {
470
510
  var retv = privateData.get(event);
471
- console.assert(retv != null, "'this' is expected an Event object, but got", event);
511
+ console.assert(retv != null, '\'this\' is expected an Event object, but got', event);
472
512
  return retv;
473
513
  }
474
514
 
@@ -495,7 +535,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
495
535
  });
496
536
 
497
537
  // https://heycam.github.io/webidl/#Unforgeable
498
- Object.defineProperty(this, "isTrusted", { value: false, enumerable: true });
538
+ Object.defineProperty(this, 'isTrusted', { value: false, enumerable: true });
499
539
 
500
540
  // Define accessors
501
541
  var keys = Object.keys(event);
@@ -590,7 +630,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
590
630
  */
591
631
  stopPropagation: function stopPropagation() {
592
632
  var data = pd(this);
593
- if (typeof data.event.stopPropagation === "function") {
633
+ if (typeof data.event.stopPropagation === 'function') {
594
634
  data.event.stopPropagation();
595
635
  }
596
636
  },
@@ -603,7 +643,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
603
643
  var data = pd(this);
604
644
 
605
645
  data.stopped = true;
606
- if (typeof data.event.stopImmediatePropagation === "function") {
646
+ if (typeof data.event.stopImmediatePropagation === 'function') {
607
647
  data.event.stopImmediatePropagation();
608
648
  }
609
649
  },
@@ -631,7 +671,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
631
671
  preventDefault: function preventDefault() {
632
672
  var data = pd(this);
633
673
  if (data.passiveListener != null) {
634
- console.warn("Event#preventDefault() was called from a passive listener:", data.passiveListener);
674
+ console.warn('Event#preventDefault() was called from a passive listener:', data.passiveListener);
635
675
  return;
636
676
  }
637
677
  if (!data.event.cancelable) {
@@ -639,7 +679,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
639
679
  }
640
680
 
641
681
  data.canceled = true;
642
- if (typeof data.event.preventDefault === "function") {
682
+ if (typeof data.event.preventDefault === 'function') {
643
683
  data.event.preventDefault();
644
684
  }
645
685
  },
@@ -670,10 +710,10 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
670
710
  };
671
711
 
672
712
  // `constructor` is not enumerable.
673
- Object.defineProperty(Event.prototype, "constructor", { value: Event, configurable: true, writable: true });
713
+ Object.defineProperty(Event.prototype, 'constructor', { value: Event, configurable: true, writable: true });
674
714
 
675
715
  // Ensure `event instanceof window.Event` is `true`.
676
- if (typeof window !== "undefined" && typeof window.Event !== "undefined") {
716
+ if (typeof window !== 'undefined' && typeof window.Event !== 'undefined') {
677
717
  Object.setPrototypeOf(Event.prototype, window.Event.prototype);
678
718
 
679
719
  // Make association for wrappers.
@@ -745,7 +785,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
745
785
  var key = keys[i];
746
786
  if (!(key in BaseEvent.prototype)) {
747
787
  var descriptor = Object.getOwnPropertyDescriptor(proto, key);
748
- var isFunc = typeof descriptor.value === "function";
788
+ var isFunc = typeof descriptor.value === 'function';
749
789
  Object.defineProperty(CustomEvent.prototype, key, isFunc ? defineCallDescriptor(key) : defineRedirectDescriptor(key));
750
790
  }
751
791
  }
@@ -854,7 +894,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
854
894
  * @returns {boolean} `true` if the value is an object.
855
895
  */
856
896
  function isObject(x) {
857
- return x !== null && (typeof x === "undefined" ? "undefined" : _typeof(x)) === "object"; //eslint-disable-line no-restricted-syntax
897
+ return x !== null && (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object'; //eslint-disable-line no-restricted-syntax
858
898
  }
859
899
 
860
900
  /**
@@ -865,7 +905,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
865
905
  */
866
906
  function getListeners(eventTarget) {
867
907
  var listeners = listenersMap.get(eventTarget);
868
- console.assert(listeners != null, "'this' is expected an EventTarget object");
908
+ console.assert(listeners != null, '\'this\' is expected an EventTarget object');
869
909
  return listeners || new Map();
870
910
  }
871
911
 
@@ -889,7 +929,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
889
929
  return null;
890
930
  },
891
931
  set: function set(listener) {
892
- if (typeof listener !== "function" && !isObject(listener)) {
932
+ if (typeof listener !== 'function' && !isObject(listener)) {
893
933
  listener = null; // eslint-disable-line no-param-reassign
894
934
  }
895
935
  var listeners = getListeners(this);
@@ -943,7 +983,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
943
983
  * @returns {void}
944
984
  */
945
985
  function defineEventAttribute(eventTargetPrototype, eventName) {
946
- Object.defineProperty(eventTargetPrototype, "on" + eventName, defineEventAttributeDescriptor(eventName));
986
+ Object.defineProperty(eventTargetPrototype, 'on' + eventName, defineEventAttributeDescriptor(eventName));
947
987
  }
948
988
 
949
989
  /**
@@ -998,7 +1038,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
998
1038
  }
999
1039
  return defineCustomEventTarget(types);
1000
1040
  }
1001
- throw new TypeError("Cannot call a class as a function");
1041
+ throw new TypeError('Cannot call a class as a function');
1002
1042
  /*eslint-enable consistent-return */
1003
1043
  }
1004
1044
 
@@ -1015,8 +1055,8 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1015
1055
  if (listener == null) {
1016
1056
  return false;
1017
1057
  }
1018
- if (typeof listener !== "function" && !isObject(listener)) {
1019
- throw new TypeError("'listener' should be a function or an object.");
1058
+ if (typeof listener !== 'function' && !isObject(listener)) {
1059
+ throw new TypeError('\'listener\' should be a function or an object.');
1020
1060
  }
1021
1061
 
1022
1062
  var listeners = getListeners(this);
@@ -1097,8 +1137,8 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1097
1137
  * @returns {boolean} `false` if canceled.
1098
1138
  */
1099
1139
  dispatchEvent: function dispatchEvent(event) {
1100
- if (event == null || typeof event.type !== "string") {
1101
- throw new TypeError("\"event.type\" should be a string.");
1140
+ if (event == null || typeof event.type !== 'string') {
1141
+ throw new TypeError('"event.type" should be a string.');
1102
1142
  }
1103
1143
 
1104
1144
  // If listeners aren't registered, terminate.
@@ -1131,9 +1171,9 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1131
1171
 
1132
1172
  // Call this listener
1133
1173
  setPassiveListener(wrappedEvent, node.passive ? node.listener : null);
1134
- if (typeof node.listener === "function") {
1174
+ if (typeof node.listener === 'function') {
1135
1175
  node.listener.call(this, wrappedEvent);
1136
- } else if (node.listenerType !== ATTRIBUTE && typeof node.listener.handleEvent === "function") {
1176
+ } else if (node.listenerType !== ATTRIBUTE && typeof node.listener.handleEvent === 'function') {
1137
1177
  node.listener.handleEvent(wrappedEvent);
1138
1178
  }
1139
1179
 
@@ -1153,30 +1193,36 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1153
1193
  };
1154
1194
 
1155
1195
  // `constructor` is not enumerable.
1156
- Object.defineProperty(EventTarget.prototype, "constructor", { value: EventTarget, configurable: true, writable: true });
1196
+ Object.defineProperty(EventTarget.prototype, 'constructor', {
1197
+ value: EventTarget,
1198
+ configurable: true,
1199
+ writable: true
1200
+ });
1157
1201
 
1158
1202
  // Ensure `eventTarget instanceof window.EventTarget` is `true`.
1159
- if (typeof window !== "undefined" && typeof window.EventTarget !== "undefined") {
1203
+ if (typeof window !== 'undefined' && typeof window.EventTarget !== 'undefined') {
1160
1204
  Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype);
1161
1205
  }
1162
1206
 
1163
1207
  module.exports = EventTarget;
1164
- module.exports.EventTarget = module.exports["default"] = EventTarget;
1208
+ module.exports.EventTarget = module.exports['default'] = EventTarget;
1165
1209
  module.exports.defineEventAttribute = defineEventAttribute;
1166
- }, {}], 5: [function (require, module, exports) {
1167
- "use strict";
1210
+ }, {}],
1211
+ 5: [function (require, module, exports) {
1212
+ 'use strict';
1168
1213
 
1169
1214
  function InvalidStateError() {
1170
1215
  try {
1171
1216
  var xhr = new XMLHttpRequest();
1172
- xhr.responseType = "blob";
1217
+ xhr.responseType = 'blob';
1173
1218
  } catch (e) {
1174
1219
  return e;
1175
1220
  }
1176
1221
  }
1177
1222
 
1178
1223
  module.exports = InvalidStateError;
1179
- }, {}], 6: [function (require, module, exports) {
1224
+ }, {}],
1225
+ 6: [function (require, module, exports) {
1180
1226
  'use strict';
1181
1227
 
1182
1228
  var WebRTCProxy = require('./WebRTCProxy.js');
@@ -1186,14 +1232,14 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1186
1232
  var defineEventAttribute = require('./EventTarget.js').defineEventAttribute;
1187
1233
 
1188
1234
  /*
1189
- interface MediaDevices : EventTarget {
1190
- attribute EventHandler ondevicechange;
1191
- Promise<sequence<MediaDeviceInfo>> enumerateDevices();
1192
- }
1193
- partial interface MediaDevices {
1194
- MediaTrackSupportedConstraints getSupportedConstraints();
1195
- Promise<MediaStream> getUserMedia(optional MediaStreamConstraints constraints);
1196
- }
1235
+ interface MediaDevices : EventTarget {
1236
+ attribute EventHandler ondevicechange;
1237
+ Promise<sequence<MediaDeviceInfo>> enumerateDevices();
1238
+ }
1239
+ partial interface MediaDevices {
1240
+ MediaTrackSupportedConstraints getSupportedConstraints();
1241
+ Promise<MediaStream> getUserMedia(optional MediaStreamConstraints constraints);
1242
+ }
1197
1243
  */
1198
1244
  var MediaDevices = function MediaDevices() {
1199
1245
  //Init event targetr
@@ -1254,34 +1300,34 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1254
1300
  });
1255
1301
  Object.defineProperty(MediaDevices, 'prototype', { writable: false });
1256
1302
  module.exports = MediaDevices;
1257
- }, { "./EventTarget.js": 4, "./MediaStream.js": 7, "./MediaStreamTrack.js": 8, "./WebRTCProxy.js": 17 }], 7: [function (require, module, exports) {
1303
+ }, { './EventTarget.js': 4, './MediaStream.js': 7, './MediaStreamTrack.js': 8, './WebRTCProxy.js': 17 }],
1304
+ 7: [function (require, module, exports) {
1258
1305
  'use strict';
1259
1306
 
1260
- var MediaStreamTrack = require('./MediaStreamTrack');
1261
1307
  var EventTarget = require('./EventTarget.js').EventTarget;
1262
1308
  var defineEventAttribute = require('./EventTarget.js').defineEventAttribute;
1263
1309
  /*
1264
1310
  [Exposed=Window,
1265
- Constructor,
1266
- Constructor(MediaStream stream),
1267
- Constructor(sequence<MediaStreamTrack> tracks)]
1311
+ Constructor,
1312
+ Constructor(MediaStream stream),
1313
+ Constructor(sequence<MediaStreamTrack> tracks)]
1268
1314
  interface MediaStream : EventTarget {
1269
- readonly attribute DOMString id;
1270
- sequence<MediaStreamTrack> getAudioTracks();
1271
- sequence<MediaStreamTrack> getVideoTracks();
1272
- sequence<MediaStreamTrack> getTracks();
1273
- MediaStreamTrack? getTrackById(DOMString trackId);
1274
- void addTrack(MediaStreamTrack track);
1275
- void removeTrack(MediaStreamTrack track);
1276
- MediaStream clone();
1277
- readonly attribute boolean active;
1278
- attribute EventHandler onaddtrack;
1279
- attribute EventHandler onremovetrack;
1315
+ readonly attribute DOMString id;
1316
+ sequence<MediaStreamTrack> getAudioTracks();
1317
+ sequence<MediaStreamTrack> getVideoTracks();
1318
+ sequence<MediaStreamTrack> getTracks();
1319
+ MediaStreamTrack? getTrackById(DOMString trackId);
1320
+ void addTrack(MediaStreamTrack track);
1321
+ void removeTrack(MediaStreamTrack track);
1322
+ MediaStream clone();
1323
+ readonly attribute boolean active;
1324
+ attribute EventHandler onaddtrack;
1325
+ attribute EventHandler onremovetrack;
1280
1326
  };
1281
- */
1327
+ */
1282
1328
  var count = 0;
1283
1329
 
1284
- var MediaStream = function MediaStream(tracks, label) {
1330
+ var MediaStream = function MediaStream(label, tracks) {
1285
1331
  //Init event target
1286
1332
  EventTarget.call(this);
1287
1333
 
@@ -1290,25 +1336,19 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1290
1336
  tracks: {}
1291
1337
  };
1292
1338
 
1293
- //Actual WebRTC MediaStream supports MediaStream or array of MediaTracks as constructor input.
1294
- //Because of time constraints we implementing the support for array of tracks only.
1295
- if (tracks) {
1296
- if (!(tracks instanceof Array)) {
1297
- throw new Error('tracks should be an array of MediaStreamTrack');
1298
- }
1299
-
1300
- for (var i = 0; i < tracks.length; ++i) {
1301
- if (!(tracks[i] instanceof MediaStreamTrack)) {
1302
- throw new Error('Each item in tracks array should be an instance of MediaStreamTrack');
1303
- }
1304
- this.priv.tracks[tracks[i].id] = tracks[i];
1305
- }
1339
+ //Add input tracks to our map
1340
+ if (tracks) for (var i = 0; i < tracks.length; ++i) {
1341
+ this.priv.tracks[tracks[i].id] = tracks[i];
1306
1342
  }
1307
-
1308
1343
  var id = label || 'stream-' + count++;
1309
1344
 
1310
1345
  Object.defineProperty(this, 'id', { enumerable: true, configurable: false, writable: false, value: id });
1311
- Object.defineProperty(this, 'active', { enumerable: true, configurable: false, writable: false, value: true });
1346
+ Object.defineProperty(this, 'active', {
1347
+ enumerable: true,
1348
+ configurable: false,
1349
+ writable: false,
1350
+ value: true
1351
+ });
1312
1352
 
1313
1353
  return this;
1314
1354
  };
@@ -1333,7 +1373,8 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1333
1373
  if (this.priv.tracks[id].kind === 'audio') {
1334
1374
  arr.push(this.priv.tracks[id]);
1335
1375
  }
1336
- }return arr;
1376
+ }
1377
+ return arr;
1337
1378
  };
1338
1379
 
1339
1380
  MediaStream.prototype.getVideoTracks = function () {
@@ -1342,7 +1383,8 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1342
1383
  if (this.priv.tracks[id].kind === 'video') {
1343
1384
  arr.push(this.priv.tracks[id]);
1344
1385
  }
1345
- }return arr;
1386
+ }
1387
+ return arr;
1346
1388
  };
1347
1389
 
1348
1390
  MediaStream.prototype.getTracks = function () {
@@ -1400,7 +1442,8 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1400
1442
  });
1401
1443
  Object.defineProperty(MediaStream, 'prototype', { writable: false });
1402
1444
  module.exports = MediaStream;
1403
- }, { "./EventTarget.js": 4, "./MediaStreamTrack": 8 }], 8: [function (require, module, exports) {
1445
+ }, { './EventTarget.js': 4 }],
1446
+ 8: [function (require, module, exports) {
1404
1447
  'use strict';
1405
1448
 
1406
1449
  var EventTarget = require('./EventTarget.js').EventTarget;
@@ -1408,26 +1451,26 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1408
1451
  /*
1409
1452
  [Exposed=Window]
1410
1453
  interface MediaStreamTrack : EventTarget {
1411
- readonly attribute DOMString kind;
1412
- readonly attribute DOMString id;
1413
- readonly attribute DOMString label;
1414
- attribute boolean enabled;
1415
- readonly attribute boolean muted;
1416
- attribute EventHandler onmute;
1417
- attribute EventHandler onunmute;
1418
- readonly attribute MediaStreamTrackState readyState;
1419
- attribute EventHandler onended;
1420
- MediaStreamTrack clone();
1421
- void stop();
1422
- MediaTrackCapabilities getCapabilities();
1423
- MediaTrackConstraints getConstraints();
1424
- MediaTrackSettings getSettings();
1425
- Promise<void> applyConstraints(optional MediaTrackConstraints constraints);
1426
- attribute EventHandler onoverconstrained;
1427
- };
1428
- partial interface MediaStreamTrack {
1429
- readonly attribute boolean isolated;
1430
- attribute EventHandler onisolationchange;
1454
+ readonly attribute DOMString kind;
1455
+ readonly attribute DOMString id;
1456
+ readonly attribute DOMString label;
1457
+ attribute boolean enabled;
1458
+ readonly attribute boolean muted;
1459
+ attribute EventHandler onmute;
1460
+ attribute EventHandler onunmute;
1461
+ readonly attribute MediaStreamTrackState readyState;
1462
+ attribute EventHandler onended;
1463
+ MediaStreamTrack clone();
1464
+ void stop();
1465
+ MediaTrackCapabilities getCapabilities();
1466
+ MediaTrackConstraints getConstraints();
1467
+ MediaTrackSettings getSettings();
1468
+ Promise<void> applyConstraints(optional MediaTrackConstraints constraints);
1469
+ attribute EventHandler onoverconstrained;
1470
+ };
1471
+ partial interface MediaStreamTrack {
1472
+ readonly attribute boolean isolated;
1473
+ attribute EventHandler onisolationchange;
1431
1474
  };
1432
1475
  */
1433
1476
  var MediaStreamTrack = function MediaStreamTrack(track) {
@@ -1523,40 +1566,41 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1523
1566
  value: 'MediaStreamTrack'
1524
1567
  });
1525
1568
  module.exports = MediaStreamTrack;
1526
- }, { "./EventTarget.js": 4 }], 9: [function (require, module, exports) {
1527
- "use strict";
1569
+ }, { './EventTarget.js': 4 }],
1570
+ 9: [function (require, module, exports) {
1571
+ 'use strict';
1528
1572
 
1529
- var EventTarget = require("./EventTarget.js").EventTarget;
1530
- var defineEventAttribute = require("./EventTarget.js").defineEventAttribute;
1531
- var InvalidStateError = require("./InvalidStateError.js");
1573
+ var EventTarget = require('./EventTarget.js').EventTarget;
1574
+ var defineEventAttribute = require('./EventTarget.js').defineEventAttribute;
1575
+ var InvalidStateError = require('./InvalidStateError.js');
1532
1576
 
1533
1577
  /*
1534
- [Exposed=Window]
1535
- interface RTCRTCDataChannel : EventTarget {
1536
- readonly attribute USVString label;
1537
- readonly attribute boolean ordered;
1538
- readonly attribute unsigned short? maxPacketLifeTime;
1539
- readonly attribute unsigned short? maxRetransmits;
1540
- readonly attribute USVString protocol;
1541
- readonly attribute boolean negotiated;
1542
- readonly attribute unsigned short? id;
1543
- readonly attribute RTCPriorityType priority;
1544
- readonly attribute RTCRTCDataChannelState readyState;
1545
- readonly attribute unsigned long bufferedAmount;
1546
- attribute unsigned long bufferedAmountLowThreshold;
1547
- attribute EventHandler onopen;
1548
- attribute EventHandler onbufferedamountlow;
1549
- attribute EventHandler onerror;
1550
- attribute EventHandler onclose;
1551
- void close();
1552
- attribute EventHandler onmessage;
1553
- attribute DOMString binaryType;
1554
- void send(USVString data);
1555
- void send(Blob data);
1556
- void send(ArrayBuffer data);
1557
- void send(ArrayBufferView data);
1578
+ [Exposed=Window]
1579
+ interface RTCRTCDataChannel : EventTarget {
1580
+ readonly attribute USVString label;
1581
+ readonly attribute boolean ordered;
1582
+ readonly attribute unsigned short? maxPacketLifeTime;
1583
+ readonly attribute unsigned short? maxRetransmits;
1584
+ readonly attribute USVString protocol;
1585
+ readonly attribute boolean negotiated;
1586
+ readonly attribute unsigned short? id;
1587
+ readonly attribute RTCPriorityType priority;
1588
+ readonly attribute RTCRTCDataChannelState readyState;
1589
+ readonly attribute unsigned long bufferedAmount;
1590
+ attribute unsigned long bufferedAmountLowThreshold;
1591
+ attribute EventHandler onopen;
1592
+ attribute EventHandler onbufferedamountlow;
1593
+ attribute EventHandler onerror;
1594
+ attribute EventHandler onclose;
1595
+ void close();
1596
+ attribute EventHandler onmessage;
1597
+ attribute DOMString binaryType;
1598
+ void send(USVString data);
1599
+ void send(Blob data);
1600
+ void send(ArrayBuffer data);
1601
+ void send(ArrayBufferView data);
1558
1602
  };
1559
- */
1603
+ */
1560
1604
  var RTCDataChannel = function RTCDataChannel(dataChannel) {
1561
1605
  //Init event targetr
1562
1606
  EventTarget.call(this);
@@ -1564,40 +1608,59 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1564
1608
  //Private vars
1565
1609
  var self = this;
1566
1610
  var priv = this.priv = {
1567
- binaryType: "blob",
1611
+ binaryType: 'blob',
1568
1612
  dataChannel: dataChannel
1569
1613
  };
1570
1614
 
1571
1615
  //Read only properties
1572
- Object.defineProperty(this, 'label', { enumerable: true, configurable: false, get: function get() {
1616
+ Object.defineProperty(this, 'label', {
1617
+ enumerable: true, configurable: false, get: function get() {
1573
1618
  return priv.dataChannel.label;
1574
- } });
1575
- Object.defineProperty(this, 'ordered', { enumerable: true, configurable: false, get: function get() {
1619
+ }
1620
+ });
1621
+ Object.defineProperty(this, 'ordered', {
1622
+ enumerable: true, configurable: false, get: function get() {
1576
1623
  return priv.dataChannel.ordered;
1577
- } });
1578
- Object.defineProperty(this, 'maxPacketLifeTime', { enumerable: true, configurable: false, get: function get() {
1624
+ }
1625
+ });
1626
+ Object.defineProperty(this, 'maxPacketLifeTime', {
1627
+ enumerable: true, configurable: false, get: function get() {
1579
1628
  return priv.dataChannel.maxPacketLifeTime;
1580
- } });
1581
- Object.defineProperty(this, 'protocol', { enumerable: true, configurable: false, get: function get() {
1629
+ }
1630
+ });
1631
+ Object.defineProperty(this, 'protocol', {
1632
+ enumerable: true, configurable: false, get: function get() {
1582
1633
  return priv.dataChannel.protocol;
1583
- } });
1584
- Object.defineProperty(this, 'negotiated', { enumerable: true, configurable: false, get: function get() {
1634
+ }
1635
+ });
1636
+ Object.defineProperty(this, 'negotiated', {
1637
+ enumerable: true, configurable: false, get: function get() {
1585
1638
  return priv.dataChannel.negotiated;
1586
- } });
1587
- Object.defineProperty(this, 'id', { enumerable: true, configurable: false, get: function get() {
1639
+ }
1640
+ });
1641
+ Object.defineProperty(this, 'id', {
1642
+ enumerable: true, configurable: false, get: function get() {
1588
1643
  return priv.dataChannel.id;
1589
- } });
1590
- Object.defineProperty(this, 'priority', { enumerable: true, configurable: false, get: function get() {
1644
+ }
1645
+ });
1646
+ Object.defineProperty(this, 'priority', {
1647
+ enumerable: true, configurable: false, get: function get() {
1591
1648
  return priv.dataChannel.priority;
1592
- } });
1593
- Object.defineProperty(this, 'readyState', { enumerable: true, configurable: false, get: function get() {
1649
+ }
1650
+ });
1651
+ Object.defineProperty(this, 'readyState', {
1652
+ enumerable: true, configurable: false, get: function get() {
1594
1653
  return priv.dataChannel.readyState;
1595
- } });
1596
- Object.defineProperty(this, 'bufferedAmount', { enumerable: true, configurable: false, get: function get() {
1654
+ }
1655
+ });
1656
+ Object.defineProperty(this, 'bufferedAmount', {
1657
+ enumerable: true, configurable: false, get: function get() {
1597
1658
  return priv.dataChannel.bufferedAmount;
1598
- } });
1659
+ }
1660
+ });
1599
1661
  //Read & write
1600
- Object.defineProperty(this, 'bufferedAmountLowThreshold', { enumerable: true, configurable: false,
1662
+ Object.defineProperty(this, 'bufferedAmountLowThreshold', {
1663
+ enumerable: true, configurable: false,
1601
1664
  get: function get() {
1602
1665
  return priv.dataChannel.bufferedAmountLowThreshold;
1603
1666
  },
@@ -1605,18 +1668,19 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1605
1668
  return priv.dataChannel.bufferedAmountLowThreshold = bufferedAmountLowThreshold;
1606
1669
  }
1607
1670
  });
1608
- Object.defineProperty(this, 'binaryType', { enumerable: true, configurable: false,
1671
+ Object.defineProperty(this, 'binaryType', {
1672
+ enumerable: true, configurable: false,
1609
1673
  get: function get() {
1610
1674
  return priv.dataChannel.bufferedAmount;
1611
1675
  },
1612
1676
  set: function set(binaryType) {
1613
- if (binaryType !== "blob" && binaryType !== "arraybuffer") throw new SyntaxError();
1677
+ if (binaryType !== 'blob' && binaryType !== 'arraybuffer') throw new SyntaxError();
1614
1678
  return priv.binaryType = binaryType;
1615
1679
  }
1616
1680
  });
1617
1681
 
1618
1682
  function createEvent(name) {
1619
- var e = document.createEvent("Event");
1683
+ var e = document.createEvent('Event');
1620
1684
  e.initEvent(name, false, false);
1621
1685
  return e;
1622
1686
  }
@@ -1627,34 +1691,34 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1627
1691
 
1628
1692
  //Set event
1629
1693
  priv.dataChannel.onopen = function () {
1630
- fire("open");
1694
+ fire('open');
1631
1695
  };
1632
1696
  priv.dataChannel.onbufferedamountlow = function () {
1633
- fire("bufferedamountlow");
1697
+ fire('bufferedamountlow');
1634
1698
  };
1635
1699
  priv.dataChannel.onerror = function () {
1636
- fire("error");
1700
+ fire('error');
1637
1701
  };
1638
1702
  priv.dataChannel.onclose = function () {
1639
- fire("close");
1703
+ fire('close');
1640
1704
  };
1641
1705
  priv.dataChannel.onmessage = function (message) {
1642
1706
  //Create event
1643
- var event = createEvent("message");
1707
+ var event = createEvent('message');
1644
1708
 
1645
1709
  //Check if message is binary
1646
- if (typeof message !== "string") {
1710
+ if (typeof message !== 'string') {
1647
1711
  //Create uint array
1648
1712
  var array = new Uint8Array(message);
1649
1713
  //Check binary type
1650
- if (priv.binaryType === "blob") {
1714
+ if (priv.binaryType === 'blob') {
1651
1715
  //Create blob builder
1652
1716
  var builder = new MSBlobBuilder();
1653
1717
  //Append message
1654
1718
  builder.append(array);
1655
1719
  //Get blob
1656
1720
  event.data = builder.getBlob();
1657
- } else if (priv.binaryType === "arraybuffer") {
1721
+ } else if (priv.binaryType === 'arraybuffer') {
1658
1722
  //Get array buffer
1659
1723
  event.data = array.buffer;
1660
1724
  } else return;
@@ -1682,16 +1746,16 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1682
1746
  RTCDataChannel.__proto__ = EventTarget;
1683
1747
 
1684
1748
  // Define Event Handlers
1685
- defineEventAttribute(RTCDataChannel.prototype, "open");
1686
- defineEventAttribute(RTCDataChannel.prototype, "bufferedamountlow");
1687
- defineEventAttribute(RTCDataChannel.prototype, "error");
1688
- defineEventAttribute(RTCDataChannel.prototype, "close");
1689
- defineEventAttribute(RTCDataChannel.prototype, "message");
1749
+ defineEventAttribute(RTCDataChannel.prototype, 'open');
1750
+ defineEventAttribute(RTCDataChannel.prototype, 'bufferedamountlow');
1751
+ defineEventAttribute(RTCDataChannel.prototype, 'error');
1752
+ defineEventAttribute(RTCDataChannel.prototype, 'close');
1753
+ defineEventAttribute(RTCDataChannel.prototype, 'message');
1690
1754
 
1691
1755
  RTCDataChannel.prototype.send = function (data) {
1692
1756
  var self = this;
1693
1757
  //Check state
1694
- if (this.readyState !== "open") throw new InvalidStateError();
1758
+ if (this.readyState !== 'open') throw new InvalidStateError();
1695
1759
 
1696
1760
  try {
1697
1761
  //Check type
@@ -1708,7 +1772,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1708
1772
  } else if (data instanceof ArrayBuffer) {
1709
1773
  //Send it
1710
1774
  this.priv.dataChannel.send(array);
1711
- } else if (typeof data === "string") {
1775
+ } else if (typeof data === 'string') {
1712
1776
  //Send it
1713
1777
  this.priv.dataChannel.send(data);
1714
1778
  } else {
@@ -1723,32 +1787,38 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1723
1787
  this.priv.dataChannel.close();
1724
1788
  };
1725
1789
 
1726
- Object.defineProperty(RTCDataChannel, 'name', { enumerable: false, configurable: true, writable: false, value: "RTCDataChannel" });
1790
+ Object.defineProperty(RTCDataChannel, 'name', {
1791
+ enumerable: false,
1792
+ configurable: true,
1793
+ writable: false,
1794
+ value: 'RTCDataChannel'
1795
+ });
1727
1796
  Object.defineProperty(RTCDataChannel, 'prototype', { writable: false });
1728
1797
  module.exports = RTCDataChannel;
1729
- }, { "./EventTarget.js": 4, "./InvalidStateError.js": 5 }], 10: [function (require, module, exports) {
1730
- "use strict";
1798
+ }, { './EventTarget.js': 4, './InvalidStateError.js': 5 }],
1799
+ 10: [function (require, module, exports) {
1800
+ 'use strict';
1731
1801
 
1732
- var WebRTCProxy = require("./WebRTCProxy.js");
1802
+ var WebRTCProxy = require('./WebRTCProxy.js');
1733
1803
  /*
1734
1804
  interface RTCIceCandidate {
1735
- readonly attribute DOMString candidate;
1736
- readonly attribute DOMString? sdpMid;
1737
- readonly attribute unsigned short? sdpMLineIndex;
1738
- readonly attribute DOMString? foundation;
1739
- readonly attribute RTCIceComponent? component;
1740
- readonly attribute unsigned long? priority;
1741
- readonly attribute DOMString? ip;
1742
- readonly attribute RTCIceProtocol? protocol;
1743
- readonly attribute unsigned short? port;
1744
- readonly attribute RTCIceCandidateType? type;
1745
- readonly attribute RTCIceTcpCandidateType? tcpType;
1746
- readonly attribute DOMString? relatedAddress;
1747
- readonly attribute unsigned short? relatedPort;
1748
- readonly attribute DOMString? usernameFragment;
1749
- RTCIceCandidateInit toJSON();
1805
+ readonly attribute DOMString candidate;
1806
+ readonly attribute DOMString? sdpMid;
1807
+ readonly attribute unsigned short? sdpMLineIndex;
1808
+ readonly attribute DOMString? foundation;
1809
+ readonly attribute RTCIceComponent? component;
1810
+ readonly attribute unsigned long? priority;
1811
+ readonly attribute DOMString? ip;
1812
+ readonly attribute RTCIceProtocol? protocol;
1813
+ readonly attribute unsigned short? port;
1814
+ readonly attribute RTCIceCandidateType? type;
1815
+ readonly attribute RTCIceTcpCandidateType? tcpType;
1816
+ readonly attribute DOMString? relatedAddress;
1817
+ readonly attribute unsigned short? relatedPort;
1818
+ readonly attribute DOMString? usernameFragment;
1819
+ RTCIceCandidateInit toJSON();
1750
1820
  };
1751
- */
1821
+ */
1752
1822
  var RTCIceCandidate = function RTCIceCandidate(iceCandidateInit) {
1753
1823
  if (!iceCandidateInit) throw new TypeError();
1754
1824
 
@@ -1803,48 +1873,76 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1803
1873
  }
1804
1874
 
1805
1875
  //Direct attributes from init
1806
- Object.defineProperty(this, "candidate", { enumerable: true, configurable: false, get: function get() {
1876
+ Object.defineProperty(this, 'candidate', {
1877
+ enumerable: true, configurable: false, get: function get() {
1807
1878
  return candidate;
1808
- } });
1809
- Object.defineProperty(this, "sdpMid", { enumerable: true, configurable: false, get: function get() {
1879
+ }
1880
+ });
1881
+ Object.defineProperty(this, 'sdpMid', {
1882
+ enumerable: true, configurable: false, get: function get() {
1810
1883
  return sdpMid;
1811
- } });
1812
- Object.defineProperty(this, "sdpMLineIndex", { enumerable: true, configurable: false, get: function get() {
1884
+ }
1885
+ });
1886
+ Object.defineProperty(this, 'sdpMLineIndex', {
1887
+ enumerable: true, configurable: false, get: function get() {
1813
1888
  return sdpMLineIndex;
1814
- } });
1815
- Object.defineProperty(this, "foundation", { enumerable: true, configurable: false, get: function get() {
1889
+ }
1890
+ });
1891
+ Object.defineProperty(this, 'foundation', {
1892
+ enumerable: true, configurable: false, get: function get() {
1816
1893
  return foundation;
1817
- } });
1818
- Object.defineProperty(this, "component", { enumerable: true, configurable: false, get: function get() {
1894
+ }
1895
+ });
1896
+ Object.defineProperty(this, 'component', {
1897
+ enumerable: true, configurable: false, get: function get() {
1819
1898
  return component;
1820
- } });
1821
- Object.defineProperty(this, "priority", { enumerable: true, configurable: false, get: function get() {
1899
+ }
1900
+ });
1901
+ Object.defineProperty(this, 'priority', {
1902
+ enumerable: true, configurable: false, get: function get() {
1822
1903
  return priority;
1823
- } });
1824
- Object.defineProperty(this, "ip", { enumerable: true, configurable: false, get: function get() {
1904
+ }
1905
+ });
1906
+ Object.defineProperty(this, 'ip', {
1907
+ enumerable: true, configurable: false, get: function get() {
1825
1908
  return ip;
1826
- } });
1827
- Object.defineProperty(this, "protocol", { enumerable: true, configurable: false, get: function get() {
1909
+ }
1910
+ });
1911
+ Object.defineProperty(this, 'protocol', {
1912
+ enumerable: true, configurable: false, get: function get() {
1828
1913
  return protocol;
1829
- } });
1830
- Object.defineProperty(this, "port", { enumerable: true, configurable: false, get: function get() {
1914
+ }
1915
+ });
1916
+ Object.defineProperty(this, 'port', {
1917
+ enumerable: true, configurable: false, get: function get() {
1831
1918
  return port;
1832
- } });
1833
- Object.defineProperty(this, "type", { enumerable: true, configurable: false, get: function get() {
1919
+ }
1920
+ });
1921
+ Object.defineProperty(this, 'type', {
1922
+ enumerable: true, configurable: false, get: function get() {
1834
1923
  return type;
1835
- } });
1836
- Object.defineProperty(this, "tcpType", { enumerable: true, configurable: false, get: function get() {
1924
+ }
1925
+ });
1926
+ Object.defineProperty(this, 'tcpType', {
1927
+ enumerable: true, configurable: false, get: function get() {
1837
1928
  return tcpType;
1838
- } });
1839
- Object.defineProperty(this, "relatedAddress", { enumerable: true, configurable: false, get: function get() {
1929
+ }
1930
+ });
1931
+ Object.defineProperty(this, 'relatedAddress', {
1932
+ enumerable: true, configurable: false, get: function get() {
1840
1933
  return relatedAddress;
1841
- } });
1842
- Object.defineProperty(this, "relatedPort", { enumerable: true, configurable: false, get: function get() {
1934
+ }
1935
+ });
1936
+ Object.defineProperty(this, 'relatedPort', {
1937
+ enumerable: true, configurable: false, get: function get() {
1843
1938
  return relatedPort;
1844
- } });
1845
- Object.defineProperty(this, "usernameFragment", { enumerable: true, configurable: false, get: function get() {
1939
+ }
1940
+ });
1941
+ Object.defineProperty(this, 'usernameFragment', {
1942
+ enumerable: true, configurable: false, get: function get() {
1846
1943
  return usernameFragment;
1847
- } });
1944
+ }
1945
+ });
1848
1946
 
1849
1947
  return this;
1850
1948
  };
@@ -1858,111 +1956,120 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1858
1956
  };
1859
1957
  };
1860
1958
 
1861
- Object.defineProperty(RTCIceCandidate, 'name', { enumerable: false, configurable: true, writable: false, value: "RTCIceCandidate" });
1959
+ Object.defineProperty(RTCIceCandidate, 'name', {
1960
+ enumerable: false,
1961
+ configurable: true,
1962
+ writable: false,
1963
+ value: 'RTCIceCandidate'
1964
+ });
1862
1965
  Object.defineProperty(RTCIceCandidate, 'prototype', { writable: false });
1863
1966
  module.exports = RTCIceCandidate;
1864
- }, { "./WebRTCProxy.js": 17 }], 11: [function (require, module, exports) {
1865
- "use strict";
1967
+ }, { './WebRTCProxy.js': 17 }],
1968
+ 11: [function (require, module, exports) {
1969
+ 'use strict';
1866
1970
 
1867
1971
  var _extends = Object.assign || function (target) {
1868
1972
  for (var i = 1; i < arguments.length; i++) {
1869
- var source = arguments[i];for (var key in source) {
1973
+ var source = arguments[i];
1974
+ for (var key in source) {
1870
1975
  if (Object.prototype.hasOwnProperty.call(source, key)) {
1871
1976
  target[key] = source[key];
1872
1977
  }
1873
1978
  }
1874
- }return target;
1979
+ }
1980
+ return target;
1875
1981
  };
1876
1982
 
1877
- var WebRTCProxy = require("./WebRTCProxy.js");
1878
- var MediaStreamTrack = require("./MediaStreamTrack.js");
1879
- var RTCSessionDescription = require("./RTCSessionDescription.js");
1880
- var RTCIceCandidate = require("./RTCIceCandidate.js");
1881
- var RTCRtpSender = require("./RTCRtpSender.js");
1882
- var RTCRtpReceiver = require("./RTCRtpReceiver.js");
1883
- var RTCRtpTransceiver = require("./RTCRtpTransceiver.js");
1884
- var DataChannel = require("./RTCDataChannel.js");
1885
- var InvalidStateError = require("./InvalidStateError.js");
1886
- var EventTarget = require("./EventTarget.js").EventTarget;
1887
- var defineEventAttribute = require("./EventTarget.js").defineEventAttribute;
1983
+ var WebRTCProxy = require('./WebRTCProxy.js');
1984
+ var MediaStreamTrack = require('./MediaStreamTrack.js');
1985
+ var RTCSessionDescription = require('./RTCSessionDescription.js');
1986
+ var RTCIceCandidate = require('./RTCIceCandidate.js');
1987
+ var RTCRtpSender = require('./RTCRtpSender.js');
1988
+ var RTCRtpReceiver = require('./RTCRtpReceiver.js');
1989
+ var RTCRtpTransceiver = require('./RTCRtpTransceiver.js');
1990
+ var DataChannel = require('./RTCDataChannel.js');
1991
+ var InvalidStateError = require('./InvalidStateError.js');
1992
+ var EventTarget = require('./EventTarget.js').EventTarget;
1993
+ var defineEventAttribute = require('./EventTarget.js').defineEventAttribute;
1888
1994
 
1889
1995
  /*
1890
1996
  [Constructor(optional RTCConfiguration configuration),Exposed=Window]
1891
1997
  interface RTCPeerConnection : EventTarget {
1892
- Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions options);
1893
- Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions options);
1894
- Promise<void> setLocalDescription(RTCSessionDescriptionInit description);
1895
- readonly attribute RTCSessionDescription? localDescription;
1896
- readonly attribute RTCSessionDescription? currentLocalDescription;
1897
- readonly attribute RTCSessionDescription? pendingLocalDescription;
1898
- Promise<void> setRemoteDescription(RTCSessionDescriptionInit description);
1899
- readonly attribute RTCSessionDescription? remoteDescription;
1900
- readonly attribute RTCSessionDescription? currentRemoteDescription;
1901
- readonly attribute RTCSessionDescription? pendingRemoteDescription;
1902
- Promise<void> addIceCandidate((RTCIceCandidateInit or RTCIceCandidate) candidate);
1903
- readonly attribute RTCSignalingState signalingState;
1904
- readonly attribute RTCIceGatheringState iceGatheringState;
1905
- readonly attribute RTCIceConnectionState iceConnectionState;
1906
- readonly attribute RTCPeerConnectionState connectionState;
1907
- readonly attribute boolean? canTrickleIceCandidates;
1908
- static sequence<RTCIceServer> getDefaultIceServers();
1909
- RTCConfiguration getConfiguration();
1910
- void setConfiguration(RTCConfiguration configuration);
1911
- void close();
1912
- attribute EventHandler onnegotiationneeded;
1913
- attribute EventHandler onicecandidate;
1914
- attribute EventHandler onicecandidateerror;
1915
- attribute EventHandler onsignalingstatechange;
1916
- attribute EventHandler oniceconnectionstatechange;
1917
- attribute EventHandler onicegatheringstatechange;
1918
- attribute EventHandler onconnectionstatechange;
1998
+ Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions options);
1999
+ Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions options);
2000
+ Promise<void> setLocalDescription(RTCSessionDescriptionInit description);
2001
+ readonly attribute RTCSessionDescription? localDescription;
2002
+ readonly attribute RTCSessionDescription? currentLocalDescription;
2003
+ readonly attribute RTCSessionDescription? pendingLocalDescription;
2004
+ Promise<void> setRemoteDescription(RTCSessionDescriptionInit description);
2005
+ readonly attribute RTCSessionDescription? remoteDescription;
2006
+ readonly attribute RTCSessionDescription? currentRemoteDescription;
2007
+ readonly attribute RTCSessionDescription? pendingRemoteDescription;
2008
+ Promise<void> addIceCandidate((RTCIceCandidateInit or RTCIceCandidate) candidate);
2009
+ readonly attribute RTCSignalingState signalingState;
2010
+ readonly attribute RTCIceGatheringState iceGatheringState;
2011
+ readonly attribute RTCIceConnectionState iceConnectionState;
2012
+ readonly attribute RTCPeerConnectionState connectionState;
2013
+ readonly attribute boolean? canTrickleIceCandidates;
2014
+ static sequence<RTCIceServer> getDefaultIceServers();
2015
+ RTCConfiguration getConfiguration();
2016
+ void setConfiguration(RTCConfiguration configuration);
2017
+ void close();
2018
+ attribute EventHandler onnegotiationneeded;
2019
+ attribute EventHandler onicecandidate;
2020
+ attribute EventHandler onicecandidateerror;
2021
+ attribute EventHandler onsignalingstatechange;
2022
+ attribute EventHandler oniceconnectionstatechange;
2023
+ attribute EventHandler onicegatheringstatechange;
2024
+ attribute EventHandler onconnectionstatechange;
1919
2025
  };
1920
2026
  */
1921
2027
 
1922
- var RTCIceTransportPolicy = ["relay", "all"];
1923
- var RTCBundlePolicy = ["balanced", "max-compat", "max-bundle"];
1924
- var RTCRtcpMuxPolicy = ["negotiate", "require"];
1925
- var RTCIceCredentialType = ["password", "oauth"];
2028
+ var RTCIceTransportPolicy = ['relay', 'all'];
2029
+ var RTCBundlePolicy = ['balanced', 'max-compat', 'max-bundle'];
2030
+ var RTCRtcpMuxPolicy = ['negotiate', 'require'];
2031
+ var RTCIceCredentialType = ['password', 'oauth'];
1926
2032
 
1927
2033
  //Check if a value is valid in an enum
1928
2034
  function check(value, valid) {
1929
2035
  for (var i = 0; i < valid.length; ++i) {
1930
2036
  if (valid[i] === value) return;
1931
- }throw new TypeError(value + " not in " + JSON.stringify(valid));
2037
+ }
2038
+ throw new TypeError(value + ' not in ' + JSON.stringify(valid));
1932
2039
  }
1933
2040
 
1934
2041
  function checkRange(value, min, max) {
1935
- if (value < min || value > max) throw new TypeError(value + " not in [" + min + "," + max + "]");
2042
+ if (value < min || value > max) throw new TypeError(value + ' not in [' + min + ',' + max + ']');
1936
2043
  }
1937
2044
 
1938
2045
  function checkNotNull(value) {
1939
- if (value === null) throw new TypeError("Null not allowed");
2046
+ if (value === null) throw new TypeError('Null not allowed');
1940
2047
  }
1941
2048
 
1942
2049
  function checkArray(value) {
1943
- if (!Array.isArray(value)) throw new TypeError("Must be an array");
2050
+ if (!Array.isArray(value)) throw new TypeError('Must be an array');
1944
2051
  }
1945
2052
 
1946
2053
  function createRTCConfiguration(configuration) {
1947
2054
  /*
1948
2055
  *
1949
2056
  dictionary RTCConfiguration {
1950
- sequence<RTCIceServer> iceServers;
1951
- RTCIceTransportPolicy iceTransportPolicy = "all";
1952
- RTCBundlePolicy bundlePolicy = "balanced";
1953
- RTCRtcpMuxPolicy rtcpMuxPolicy = "require";
1954
- DOMString peerIdentity;
1955
- sequence<RTCCertificate> certificates;
1956
- [EnforceRange]
1957
- octet iceCandidatePoolSize = 0;
2057
+ sequence<RTCIceServer> iceServers;
2058
+ RTCIceTransportPolicy iceTransportPolicy = "all";
2059
+ RTCBundlePolicy bundlePolicy = "balanced";
2060
+ RTCRtcpMuxPolicy rtcpMuxPolicy = "require";
2061
+ DOMString peerIdentity;
2062
+ sequence<RTCCertificate> certificates;
2063
+ [EnforceRange]
2064
+ octet iceCandidatePoolSize = 0;
1958
2065
  };
1959
2066
  */
1960
2067
  //Set configuration with default values
1961
2068
  var sanitized = _extends({
1962
2069
  iceServers: undefined,
1963
- iceTransportPolicy: "all",
1964
- bundlePolicy: "balanced",
1965
- rtcpMuxPolicy: "require",
2070
+ iceTransportPolicy: 'all',
2071
+ bundlePolicy: 'balanced',
2072
+ rtcpMuxPolicy: 'require',
1966
2073
  iceCandidatePoolSize: 0,
1967
2074
  certificates: undefined
1968
2075
  },
@@ -1986,12 +2093,12 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
1986
2093
  */
1987
2094
  //Set defautls
1988
2095
  var iceServer = sanitized.iceServers[i] = _extends({
1989
- credentialType: "password"
2096
+ credentialType: 'password'
1990
2097
  }, sanitized.iceServers[i]);
1991
2098
  //Check it is not null
1992
2099
  checkNotNull(iceServer.urls);
1993
2100
  //If it is a sring fallback
1994
- if (typeof iceServer.urls === "string")
2101
+ if (typeof iceServer.urls === 'string')
1995
2102
  //Arraify
1996
2103
  iceServer.urls = [iceServer.urls];
1997
2104
  checkArray(iceServer.urls);
@@ -2024,62 +2131,85 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2024
2131
  priv.lastAnswer = null;
2025
2132
  priv.isClosed = false;
2026
2133
 
2027
- var signalingState = "stable";
2028
- var iceGatheringState = "new";
2029
- var iceConnectionState = "new";
2030
- var connectionState = "new";
2134
+ var signalingState = 'stable';
2135
+ var iceGatheringState = 'new';
2136
+ var iceConnectionState = 'new';
2137
+ var connectionState = 'new';
2031
2138
 
2032
2139
  //TODO: Implement this
2033
2140
  var canTrickleIceCandidates = null;
2034
2141
 
2035
2142
  function toSessionDescription(sdp) {
2036
- return typeof sdp === "unknown" ? new RTCSessionDescription(sdp.toArray()) : null;
2143
+ return typeof sdp === 'unknown' ? new RTCSessionDescription(sdp.toArray()) : null;
2037
2144
  }
2038
2145
 
2039
2146
  //Define read only properties for each attribute
2040
2147
  //The localDescription attribute must return pendingLocalDescription if it is not null and otherwise it must return currentLocalDescription .
2041
- Object.defineProperty(this, 'localDescription', { enumerable: true, configurable: false, get: function get() {
2148
+ Object.defineProperty(this, 'localDescription', {
2149
+ enumerable: true, configurable: false, get: function get() {
2042
2150
  return toSessionDescription(priv.pc.localDescription);
2043
- } });
2044
- Object.defineProperty(this, 'currentLocalDescription', { enumerable: true, configurable: false, get: function get() {
2151
+ }
2152
+ });
2153
+ Object.defineProperty(this, 'currentLocalDescription', {
2154
+ enumerable: true, configurable: false, get: function get() {
2045
2155
  return toSessionDescription(priv.pc.currentLocalDescription);
2046
- } });
2047
- Object.defineProperty(this, 'pendingLocalDescription', { enumerable: true, configurable: false, get: function get() {
2156
+ }
2157
+ });
2158
+ Object.defineProperty(this, 'pendingLocalDescription', {
2159
+ enumerable: true, configurable: false, get: function get() {
2048
2160
  return toSessionDescription(priv.pc.pendingLocalDescription);
2049
- } });
2161
+ }
2162
+ });
2050
2163
 
2051
- Object.defineProperty(this, 'remoteDescription', { enumerable: true, configurable: false, get: function get() {
2164
+ Object.defineProperty(this, 'remoteDescription', {
2165
+ enumerable: true, configurable: false, get: function get() {
2052
2166
  return toSessionDescription(priv.pc.remoteDescription);
2053
- } });
2054
- Object.defineProperty(this, 'currentRemoteDescription', { enumerable: true, configurable: false, get: function get() {
2167
+ }
2168
+ });
2169
+ Object.defineProperty(this, 'currentRemoteDescription', {
2170
+ enumerable: true, configurable: false, get: function get() {
2055
2171
  return toSessionDescription(priv.pc.currentRemoteDescription);
2056
- } });
2057
- Object.defineProperty(this, 'pendingRemoteDescription', { enumerable: true, configurable: false, get: function get() {
2172
+ }
2173
+ });
2174
+ Object.defineProperty(this, 'pendingRemoteDescription', {
2175
+ enumerable: true, configurable: false, get: function get() {
2058
2176
  return toSessionDescription(priv.pc.pendingRemoteDescription);
2059
- } });
2177
+ }
2178
+ });
2060
2179
 
2061
- Object.defineProperty(this, 'signalingState', { enumerable: true, configurable: false, get: function get() {
2180
+ Object.defineProperty(this, 'signalingState', {
2181
+ enumerable: true, configurable: false, get: function get() {
2062
2182
  return signalingState;
2063
- } });
2064
- Object.defineProperty(this, 'iceGatheringState', { enumerable: true, configurable: false, get: function get() {
2183
+ }
2184
+ });
2185
+ Object.defineProperty(this, 'iceGatheringState', {
2186
+ enumerable: true, configurable: false, get: function get() {
2065
2187
  return iceGatheringState;
2066
- } });
2067
- Object.defineProperty(this, 'iceConnectionState', { enumerable: true, configurable: false, get: function get() {
2188
+ }
2189
+ });
2190
+ Object.defineProperty(this, 'iceConnectionState', {
2191
+ enumerable: true, configurable: false, get: function get() {
2068
2192
  return iceConnectionState;
2069
- } });
2070
- Object.defineProperty(this, 'connectionState', { enumerable: true, configurable: false, get: function get() {
2193
+ }
2194
+ });
2195
+ Object.defineProperty(this, 'connectionState', {
2196
+ enumerable: true, configurable: false, get: function get() {
2071
2197
  return connectionState;
2072
- } });
2198
+ }
2199
+ });
2073
2200
 
2074
- Object.defineProperty(this, 'canTrickleIceCandidates', { enumerable: true, configurable: false, get: function get() {
2201
+ Object.defineProperty(this, 'canTrickleIceCandidates', {
2202
+ enumerable: true, configurable: false, get: function get() {
2075
2203
  return canTrickleIceCandidates;
2076
- } });
2204
+ }
2205
+ });
2077
2206
 
2078
2207
  function createEvent(name) {
2079
- var e = document.createEvent("Event");
2208
+ var e = document.createEvent('Event');
2080
2209
  e.initEvent(name, false, false);
2081
2210
  return e;
2082
2211
  }
2212
+
2083
2213
  function fire(name) {
2084
2214
  self.dispatchEvent(createEvent(name));
2085
2215
  }
@@ -2089,10 +2219,10 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2089
2219
 
2090
2220
  //Event handlers
2091
2221
  priv.pc.onnegotiationneeded = function () {
2092
- fire("negotiationneeded");
2222
+ fire('negotiationneeded');
2093
2223
  };
2094
2224
  priv.pc.onicecandidate = function (candidate, sdpMid, sdpMLineIndex, foundation, component, priority, ip, protocol, port, type, tcpType, relatedAddress, relatedPort, usernameFragment, url) {
2095
- var e = createEvent("icecandidate");
2225
+ var e = createEvent('icecandidate');
2096
2226
  if (candidate) e.candidate = new RTCIceCandidate({
2097
2227
  candidate: candidate,
2098
2228
  sdpMid: sdpMid,
@@ -2115,31 +2245,31 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2115
2245
  self.dispatchEvent(e);
2116
2246
  };
2117
2247
  priv.pc.onicecandidateerror = function () {
2118
- fire("icecandidateerror");
2248
+ fire('icecandidateerror');
2119
2249
  };
2120
2250
  priv.pc.onsignalingstatechange = function (state) {
2121
2251
  signalingState = state;
2122
- fire("signalingstatechange");
2123
- if ("closed" === state) {
2252
+ fire('signalingstatechange');
2253
+ if ('closed' === state) {
2124
2254
  priv.isClosed = true;
2125
2255
  delete priv.pc;
2126
2256
  }
2127
2257
  };
2128
2258
  priv.pc.oniceconnectionstatechange = function (state) {
2129
2259
  iceConnectionState = state;
2130
- fire("iceconnectionstatechange");
2260
+ fire('iceconnectionstatechange');
2131
2261
  };
2132
2262
  priv.pc.onicegatheringstatechange = function (state) {
2133
2263
  iceGatheringState = state;
2134
- fire("icegatheringstatechange");
2264
+ fire('icegatheringstatechange');
2135
2265
  };
2136
2266
  priv.pc.onconnectionstatechange = function (state) {
2137
2267
  connectionState = state;
2138
- fire("connectionState");
2268
+ fire('connectionState');
2139
2269
  };
2140
2270
  priv.pc.onaddstream = function (label) {
2141
2271
  //Create new stream
2142
- var stream = new MediaStream(null, label);
2272
+ var stream = new MediaStream(label);
2143
2273
 
2144
2274
  //Get remote stream tracks
2145
2275
  priv.pc.getRemoteStreamTracks(label, function () {
@@ -2156,7 +2286,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2156
2286
  //For each track in stream
2157
2287
  for (var i = 0; i < mediaStreamTracks.length; ++i) {
2158
2288
  //Create evnet
2159
- var event = createEvent("track");
2289
+ var event = createEvent('track');
2160
2290
  //Add data
2161
2291
  event.track = mediaStreamTracks[i];
2162
2292
  event.receiver = { track: mediaStreamTracks[i] };
@@ -2175,7 +2305,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2175
2305
 
2176
2306
  priv.pc.ondatachannel = function (dataChannel) {
2177
2307
  //Create event
2178
- var event = createEvent("datachannel");
2308
+ var event = createEvent('datachannel');
2179
2309
  //Create datachannel
2180
2310
  event.channel = new DataChannel(dataChannel);
2181
2311
  //Fire event
@@ -2194,14 +2324,14 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2194
2324
  RTCPeerConnection.__proto__ = EventTarget;
2195
2325
 
2196
2326
  // Define Event Handlers
2197
- defineEventAttribute(RTCPeerConnection.prototype, "negotiationneeded");
2198
- defineEventAttribute(RTCPeerConnection.prototype, "icecandidate");
2199
- defineEventAttribute(RTCPeerConnection.prototype, "icecandidateerror");
2200
- defineEventAttribute(RTCPeerConnection.prototype, "signalingstatechange");
2201
- defineEventAttribute(RTCPeerConnection.prototype, "iceconnectionstatechange");
2202
- defineEventAttribute(RTCPeerConnection.prototype, "icegatheringstatechange");
2203
- defineEventAttribute(RTCPeerConnection.prototype, "connectionstatechange");
2204
- defineEventAttribute(RTCPeerConnection.prototype, "addtrack");
2327
+ defineEventAttribute(RTCPeerConnection.prototype, 'negotiationneeded');
2328
+ defineEventAttribute(RTCPeerConnection.prototype, 'icecandidate');
2329
+ defineEventAttribute(RTCPeerConnection.prototype, 'icecandidateerror');
2330
+ defineEventAttribute(RTCPeerConnection.prototype, 'signalingstatechange');
2331
+ defineEventAttribute(RTCPeerConnection.prototype, 'iceconnectionstatechange');
2332
+ defineEventAttribute(RTCPeerConnection.prototype, 'icegatheringstatechange');
2333
+ defineEventAttribute(RTCPeerConnection.prototype, 'connectionstatechange');
2334
+ defineEventAttribute(RTCPeerConnection.prototype, 'addtrack');
2205
2335
 
2206
2336
  RTCPeerConnection.prototype.getConfiguration = function () {
2207
2337
  return this.priv.configuration;
@@ -2220,7 +2350,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2220
2350
  } catch (error) {
2221
2351
  //Launch InvalidModificationError
2222
2352
  var operationError = new Error(error);
2223
- operationError.name = "InvalidModificationError";
2353
+ operationError.name = 'InvalidModificationError';
2224
2354
  operationError.code = 13;
2225
2355
  throw operationError;
2226
2356
  }
@@ -2272,10 +2402,10 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2272
2402
  var priv = this.priv;
2273
2403
 
2274
2404
  //If description.sdp is the empty string and description.type is "answer" or "pranswer", set description.sdp to lastAnswer.
2275
- if (!description.sdp && ("answer" === description.type || "pranser" === description.type)) description.sdp = priv.lastAnswer;
2405
+ if (!description.sdp && ('answer' === description.type || 'pranser' === description.type)) description.sdp = priv.lastAnswer;
2276
2406
 
2277
2407
  //If description.sdp is the empty string and description.type is "offer", set description.sdp to lastOffer.
2278
- if (!description.sdp && "offer" === description.type) description.sdp = priv.lastOffer;
2408
+ if (!description.sdp && 'offer' === description.type) description.sdp = priv.lastOffer;
2279
2409
 
2280
2410
  return new Promise(function (resolve, reject) {
2281
2411
  if (!priv.pc || priv.isClosed) throw new InvalidStateError();
@@ -2302,7 +2432,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2302
2432
  //1. Let candidate be the method's argument.
2303
2433
  //2. Let connection be the ``[`RTCPeerConnection`](#dom-rtcpeerconnection)`` object on which the method was invoked.
2304
2434
  //3. If both sdpMid and sdpMLineIndex are `null`, return a promise [rejected](#dfn-rejected) with a newly [created](https://www.w3.org/TR/2016/REC-WebIDL-1-20161215/#dfn-create-exception) `TypeError`.
2305
- if (!candidate || typeof candidate.sdpMid !== "string" && typeof candidate.sdpMLineIndex !== "number") return Promise.reject(new TypeError());
2435
+ if (!candidate || typeof candidate.sdpMid !== 'string' && typeof candidate.sdpMLineIndex !== 'number') return Promise.reject(new TypeError());
2306
2436
 
2307
2437
  //4. Return the result of [enqueuing](#enqueue-an-operation) the following steps to connection's operation queue:
2308
2438
  return new Promise(function (resolve, reject) {
@@ -2335,7 +2465,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2335
2465
  } catch (error) {
2336
2466
  //Launch operation error
2337
2467
  var operationError = new Error(error);
2338
- operationError.name = "OperationError";
2468
+ operationError.name = 'OperationError';
2339
2469
  operationError.code = 0;
2340
2470
  throw operationError;
2341
2471
  }
@@ -2353,25 +2483,25 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2353
2483
  };
2354
2484
  /*
2355
2485
  partial interface RTCPeerConnection {
2356
- sequence<RTCRtpSender> getSenders();
2357
- sequence<RTCRtpReceiver> getReceivers();
2358
- sequence<RTCRtpTransceiver> getTransceivers();
2359
- RTCRtpSender addTrack(MediaStreamTrack track, MediaStream... streams);
2360
- void removeTrack(RTCRtpSender sender);
2361
- RTCRtpTransceiver addTransceiver((MediaStreamTrack or DOMString) trackOrKind, optional RTCRtpTransceiverInit init);
2362
- attribute EventHandler ontrack;
2486
+ sequence<RTCRtpSender> getSenders();
2487
+ sequence<RTCRtpReceiver> getReceivers();
2488
+ sequence<RTCRtpTransceiver> getTransceivers();
2489
+ RTCRtpSender addTrack(MediaStreamTrack track, MediaStream... streams);
2490
+ void removeTrack(RTCRtpSender sender);
2491
+ RTCRtpTransceiver addTransceiver((MediaStreamTrack or DOMString) trackOrKind, optional RTCRtpTransceiverInit init);
2492
+ attribute EventHandler ontrack;
2363
2493
  };
2364
2494
  */
2365
2495
  RTCPeerConnection.prototype.getSenders = function () {
2366
- throw "Not implemented";
2496
+ throw 'Not implemented';
2367
2497
  };
2368
2498
 
2369
2499
  RTCPeerConnection.prototype.getReceivers = function () {
2370
- throw "Not implemented";
2500
+ throw 'Not implemented';
2371
2501
  };
2372
2502
 
2373
2503
  RTCPeerConnection.prototype.getTransceivers = function () {
2374
- throw "Not implemented";
2504
+ throw 'Not implemented';
2375
2505
  };
2376
2506
 
2377
2507
  RTCPeerConnection.prototype.addTrack = function () {
@@ -2384,10 +2514,10 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2384
2514
  var streams = Array.prototype.slice.call(arguments, 1);
2385
2515
 
2386
2516
  //Ensure that we are attaching to at most 1, as it is not supported in libwebrtc
2387
- if (streams.length > 1) throw new Error("Adding track to more than one stream is not currently supported");
2517
+ if (streams.length > 1) throw new Error('Adding track to more than one stream is not currently supported');
2388
2518
 
2389
2519
  //Get stream label, as it is the only param needed by libwebrtc
2390
- var label = streams.length ? streams[0].id : "";
2520
+ var label = streams.length ? streams[0].id : '';
2391
2521
 
2392
2522
  //Add native track to native object it only needs the stream label not the stream
2393
2523
  var sender = priv.pc.addTrack(track.priv.track, label);
@@ -2418,8 +2548,8 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2418
2548
  };
2419
2549
 
2420
2550
  /*
2421
- * Legacy stream apis
2422
- */
2551
+ * Legacy stream apis
2552
+ */
2423
2553
  RTCPeerConnection.prototype.addStream = function (stream) {
2424
2554
  var tracks = stream.getTracks();
2425
2555
  for (var i = 0; i < tracks.length; ++i) {
@@ -2451,14 +2581,14 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2451
2581
  delete priv.senders[senderId];
2452
2582
  };
2453
2583
 
2454
- defineEventAttribute(RTCPeerConnection.prototype, "track");
2584
+ defineEventAttribute(RTCPeerConnection.prototype, 'track');
2455
2585
 
2456
2586
  /*
2457
2587
  partial interface RTCPeerConnection {
2458
- readonly attribute RTCSctpTransport? sctp;
2459
- RTCDataChannel createDataChannel(USVString label,
2460
- optional RTCDataChannelInit dataChannelDict);
2461
- attribute EventHandler ondatachannel;
2588
+ readonly attribute RTCSctpTransport? sctp;
2589
+ RTCDataChannel createDataChannel(USVString label,
2590
+ optional RTCDataChannelInit dataChannelDict);
2591
+ attribute EventHandler ondatachannel;
2462
2592
  };
2463
2593
  */
2464
2594
  RTCPeerConnection.prototype.createDataChannel = function (label, dataChannelDict) {
@@ -2467,7 +2597,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2467
2597
  if (!priv.pc || priv.isClosed) throw new InvalidStateError();
2468
2598
 
2469
2599
  //Check if we have a string label (can be empty)
2470
- if (typeof label !== "string") return new TypeError();
2600
+ if (typeof label !== 'string') return new TypeError();
2471
2601
 
2472
2602
  //Create native datachannel
2473
2603
  var dataChannel = priv.pc.createDataChannel(label, dataChannelDict);
@@ -2479,28 +2609,45 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2479
2609
  return new DataChannel(dataChannel);
2480
2610
  };
2481
2611
 
2482
- defineEventAttribute(RTCPeerConnection.prototype, "datachannel");
2612
+ defineEventAttribute(RTCPeerConnection.prototype, 'datachannel');
2483
2613
 
2484
- Object.defineProperty(RTCPeerConnection, 'RTCPeerConnection', { enumerable: false, configurable: true, writable: false, value: "RTCPeerConnection" });
2614
+ Object.defineProperty(RTCPeerConnection, 'RTCPeerConnection', {
2615
+ enumerable: false,
2616
+ configurable: true,
2617
+ writable: false,
2618
+ value: 'RTCPeerConnection'
2619
+ });
2485
2620
  Object.defineProperty(RTCPeerConnection, 'prototype', { writable: false });
2486
2621
  module.exports = RTCPeerConnection;
2487
- }, { "./EventTarget.js": 4, "./InvalidStateError.js": 5, "./MediaStreamTrack.js": 8, "./RTCDataChannel.js": 9, "./RTCIceCandidate.js": 10, "./RTCRtpReceiver.js": 12, "./RTCRtpSender.js": 13, "./RTCRtpTransceiver.js": 14, "./RTCSessionDescription.js": 15, "./WebRTCProxy.js": 17 }], 12: [function (require, module, exports) {
2622
+ }, {
2623
+ './EventTarget.js': 4,
2624
+ './InvalidStateError.js': 5,
2625
+ './MediaStreamTrack.js': 8,
2626
+ './RTCDataChannel.js': 9,
2627
+ './RTCIceCandidate.js': 10,
2628
+ './RTCRtpReceiver.js': 12,
2629
+ './RTCRtpSender.js': 13,
2630
+ './RTCRtpTransceiver.js': 14,
2631
+ './RTCSessionDescription.js': 15,
2632
+ './WebRTCProxy.js': 17
2633
+ }],
2634
+ 12: [function (require, module, exports) {
2488
2635
  'use strict';
2489
2636
 
2490
2637
  /*
2491
2638
  [Exposed=Window]
2492
2639
  interface RTCRtpReceiver {
2493
- readonly attribute MediaStreamTrack track;
2494
- readonly attribute RTCDtlsTransport? transport;
2495
- readonly attribute RTCDtlsTransport? rtcpTransport;
2496
- // Feature at risk
2497
- static RTCRtpCapabilities getCapabilities(DOMString kind);
2498
- RTCRtpParameters getParameters();
2499
- sequence<RTCRtpContributingSource> getContributingSources();
2500
- sequence<RTCRtpSynchronizationSource> getSynchronizationSources();
2501
- Promise<RTCStatsReport> getStats();
2502
- };
2503
- */
2640
+ readonly attribute MediaStreamTrack track;
2641
+ readonly attribute RTCDtlsTransport? transport;
2642
+ readonly attribute RTCDtlsTransport? rtcpTransport;
2643
+ // Feature at risk
2644
+ static RTCRtpCapabilities getCapabilities(DOMString kind);
2645
+ RTCRtpParameters getParameters();
2646
+ sequence<RTCRtpContributingSource> getContributingSources();
2647
+ sequence<RTCRtpSynchronizationSource> getSynchronizationSources();
2648
+ Promise<RTCStatsReport> getStats();
2649
+ };
2650
+ */
2504
2651
 
2505
2652
  var RTCRtpReceiver = function RTCRtpReceiver(track) {
2506
2653
  var priv = {
@@ -2552,21 +2699,22 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2552
2699
  });
2553
2700
  Object.defineProperty(RTCRtpReceiver, 'prototype', { writable: false });
2554
2701
  module.exports = RTCRtpReceiver;
2555
- }, {}], 13: [function (require, module, exports) {
2702
+ }, {}],
2703
+ 13: [function (require, module, exports) {
2556
2704
  'use strict';
2557
2705
 
2558
2706
  /*
2559
2707
  [Exposed=Window]
2560
2708
  interface RTCRtpSender {
2561
- readonly attribute MediaStreamTrack? track;
2562
- readonly attribute RTCDtlsTransport? transport;
2563
- readonly attribute RTCDtlsTransport? rtcpTransport;
2564
- // Feature at risk
2565
- static RTCRtpCapabilities getCapabilities(DOMString kind);
2566
- Promise<void> setParameters(optional RTCRtpParameters parameters);
2567
- RTCRtpParameters getParameters();
2568
- Promise<void> replaceTrack(MediaStreamTrack? withTrack);
2569
- Promise<RTCStatsReport> getStats();
2709
+ readonly attribute MediaStreamTrack? track;
2710
+ readonly attribute RTCDtlsTransport? transport;
2711
+ readonly attribute RTCDtlsTransport? rtcpTransport;
2712
+ // Feature at risk
2713
+ static RTCRtpCapabilities getCapabilities(DOMString kind);
2714
+ Promise<void> setParameters(optional RTCRtpParameters parameters);
2715
+ RTCRtpParameters getParameters();
2716
+ Promise<void> replaceTrack(MediaStreamTrack? withTrack);
2717
+ Promise<RTCStatsReport> getStats();
2570
2718
  };
2571
2719
  */
2572
2720
 
@@ -2577,60 +2725,72 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2577
2725
  track: track
2578
2726
  };
2579
2727
 
2580
- Object.defineProperty(this, 'track', { enumerable: true, configurable: false, get: function get() {
2728
+ Object.defineProperty(this, 'track', {
2729
+ enumerable: true, configurable: false, get: function get() {
2581
2730
  return priv.track;
2582
- } });
2583
- Object.defineProperty(this, 'transport', { enumerable: true, configurable: false, get: function get() {
2584
- new Error("Not supported yet");
2585
- } });
2586
- Object.defineProperty(this, 'rtcpTransport', { enumerable: true, configurable: false, get: function get() {
2587
- new Error("Not supported yet");
2588
- } });
2731
+ }
2732
+ });
2733
+ Object.defineProperty(this, 'transport', {
2734
+ enumerable: true, configurable: false, get: function get() {
2735
+ new Error('Not supported yet');
2736
+ }
2737
+ });
2738
+ Object.defineProperty(this, 'rtcpTransport', {
2739
+ enumerable: true, configurable: false, get: function get() {
2740
+ new Error('Not supported yet');
2741
+ }
2742
+ });
2589
2743
 
2590
2744
  return this;
2591
2745
  };
2592
2746
 
2593
2747
  RTCRtpSender.prototype.getCapabilities = function () {
2594
- throw new Error("Not supported yet");
2748
+ throw new Error('Not supported yet');
2595
2749
  };
2596
2750
 
2597
2751
  RTCRtpSender.prototype.setParameters = function () {
2598
- throw new Error("Not supported yet");
2752
+ throw new Error('Not supported yet');
2599
2753
  };
2600
2754
 
2601
2755
  RTCRtpSender.prototype.getParameters = function () {
2602
- throw new Error("Not supported yet");
2756
+ throw new Error('Not supported yet');
2603
2757
  };
2604
2758
 
2605
2759
  RTCRtpSender.prototype.replaceTrack = function () {
2606
- throw new Error("Not supported yet");
2760
+ throw new Error('Not supported yet');
2607
2761
  };
2608
2762
 
2609
2763
  RTCRtpSender.prototype.getStats = function () {
2610
- throw new Error("Not supported yet");
2764
+ throw new Error('Not supported yet');
2611
2765
  };
2612
2766
 
2613
- Object.defineProperty(RTCRtpSender, 'name', { enumerable: false, configurable: true, writable: false, value: "RTCRtpSender" });
2767
+ Object.defineProperty(RTCRtpSender, 'name', {
2768
+ enumerable: false,
2769
+ configurable: true,
2770
+ writable: false,
2771
+ value: 'RTCRtpSender'
2772
+ });
2614
2773
  Object.defineProperty(RTCRtpSender, 'prototype', { writable: false });
2615
2774
  module.exports = RTCRtpSender;
2616
- }, {}], 14: [function (require, module, exports) {
2617
- "use strict";
2775
+ }, {}],
2776
+ 14: [function (require, module, exports) {
2777
+ 'use strict';
2618
2778
 
2619
2779
  /*
2620
- [Exposed=Window]
2621
- interface RTCRtpTransceiver {
2622
- readonly attribute DOMString? mid;
2623
- [SameObject]
2624
- readonly attribute RTCRtpSender sender;
2625
- [SameObject]
2626
- readonly attribute RTCRtpReceiver receiver;
2627
- readonly attribute boolean stopped;
2628
- attribute RTCRtpTransceiverDirection direction;
2629
- readonly attribute RTCRtpTransceiverDirection? currentDirection;
2630
- void stop();
2631
- void setCodecPreferences(sequence<RTCRtpCodecCapability> codecs);
2632
- };
2633
- */
2780
+ [Exposed=Window]
2781
+ interface RTCRtpTransceiver {
2782
+ readonly attribute DOMString? mid;
2783
+ [SameObject]
2784
+ readonly attribute RTCRtpSender sender;
2785
+ [SameObject]
2786
+ readonly attribute RTCRtpReceiver receiver;
2787
+ readonly attribute boolean stopped;
2788
+ attribute RTCRtpTransceiverDirection direction;
2789
+ readonly attribute RTCRtpTransceiverDirection? currentDirection;
2790
+ void stop();
2791
+ void setCodecPreferences(sequence<RTCRtpCodecCapability> codecs);
2792
+ };
2793
+ */
2634
2794
 
2635
2795
  var RTPRtcTransceiver = function RTPRtcTransceiver(sender, receiver) {
2636
2796
 
@@ -2640,29 +2800,40 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2640
2800
  sender: sender,
2641
2801
  receiver: receiver,
2642
2802
  stopped: false,
2643
- direction: "sendrecv",
2644
- currentDirection: "sendrecv"
2803
+ direction: 'sendrecv',
2804
+ currentDirection: 'sendrecv'
2645
2805
  };
2646
2806
 
2647
2807
  //Read only
2648
- Object.defineProperty(this, "mid", { enumerable: true, configurable: false, get: function get() {
2808
+ Object.defineProperty(this, 'mid', {
2809
+ enumerable: true, configurable: false, get: function get() {
2649
2810
  return priv.mid;
2650
- } });
2651
- Object.defineProperty(this, "sender", { enumerable: true, configurable: false, get: function get() {
2811
+ }
2812
+ });
2813
+ Object.defineProperty(this, 'sender', {
2814
+ enumerable: true, configurable: false, get: function get() {
2652
2815
  return priv.sender;
2653
- } });
2654
- Object.defineProperty(this, "receiver", { enumerable: true, configurable: false, get: function get() {
2816
+ }
2817
+ });
2818
+ Object.defineProperty(this, 'receiver', {
2819
+ enumerable: true, configurable: false, get: function get() {
2655
2820
  return priv.receiver;
2656
- } });
2657
- Object.defineProperty(this, "stopped", { enumerable: true, configurable: false, get: function get() {
2821
+ }
2822
+ });
2823
+ Object.defineProperty(this, 'stopped', {
2824
+ enumerable: true, configurable: false, get: function get() {
2658
2825
  return priv.stopped;
2659
- } });
2660
- Object.defineProperty(this, "currentDirection", { enumerable: true, configurable: false, get: function get() {
2826
+ }
2827
+ });
2828
+ Object.defineProperty(this, 'currentDirection', {
2829
+ enumerable: true, configurable: false, get: function get() {
2661
2830
  return priv.currentDirection;
2662
- } });
2831
+ }
2832
+ });
2663
2833
 
2664
2834
  //REad and write
2665
- Object.defineProperty(this, "currentDirection", { enumerable: true, configurable: false,
2835
+ Object.defineProperty(this, 'currentDirection', {
2836
+ enumerable: true, configurable: false,
2666
2837
  get: function get() {
2667
2838
  return priv.direction;
2668
2839
  },
@@ -2675,28 +2846,34 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2675
2846
  };
2676
2847
 
2677
2848
  RTPRtcTransceiver.prototype.stop = function () {
2678
- throw "Not implemented";
2849
+ throw 'Not implemented';
2679
2850
  };
2680
2851
 
2681
- Object.defineProperty(RTPRtcTransceiver, 'name', { enumerable: false, configurable: true, writable: false, value: "RTPRtcTransceiver" });
2852
+ Object.defineProperty(RTPRtcTransceiver, 'name', {
2853
+ enumerable: false,
2854
+ configurable: true,
2855
+ writable: false,
2856
+ value: 'RTPRtcTransceiver'
2857
+ });
2682
2858
  Object.defineProperty(RTPRtcTransceiver, 'prototype', { writable: false });
2683
2859
  module.exports = RTPRtcTransceiver;
2684
- }, {}], 15: [function (require, module, exports) {
2685
- "use strict";
2860
+ }, {}],
2861
+ 15: [function (require, module, exports) {
2862
+ 'use strict';
2686
2863
 
2687
2864
  /*
2688
- [Constructor(RTCSessionDescriptionInit descriptionInitDict),
2689
- Exposed=Window]
2865
+ [Constructor(RTCSessionDescriptionInit descriptionInitDict),
2866
+ Exposed=Window]
2690
2867
  interface RTCSessionDescription {
2691
- readonly attribute RTCSdpType type;
2692
- readonly attribute DOMString sdp;
2693
- [Default] object toJSON();
2868
+ readonly attribute RTCSdpType type;
2869
+ readonly attribute DOMString sdp;
2870
+ [Default] object toJSON();
2694
2871
  };
2695
- dictionary RTCSessionDescriptionInit {
2696
- required RTCSdpType type;
2697
- DOMString sdp = "";
2872
+ dictionary RTCSessionDescriptionInit {
2873
+ required RTCSdpType type;
2874
+ DOMString sdp = "";
2698
2875
  };
2699
- */
2876
+ */
2700
2877
 
2701
2878
  function RTCSessionDescription(descriptionInitDict) {
2702
2879
  //Get values from dictionary
@@ -2705,12 +2882,16 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2705
2882
  var sdp = Array.isArray(descriptionInitDict) ? descriptionInitDict[1] : descriptionInitDict.sdp;
2706
2883
 
2707
2884
  //Direct attributes from init
2708
- Object.defineProperty(this, "type", { enumerable: true, configurable: false, get: function get() {
2885
+ Object.defineProperty(this, 'type', {
2886
+ enumerable: true, configurable: false, get: function get() {
2709
2887
  return type;
2710
- } });
2711
- Object.defineProperty(this, "sdp", { enumerable: true, configurable: false, get: function get() {
2888
+ }
2889
+ });
2890
+ Object.defineProperty(this, 'sdp', {
2891
+ enumerable: true, configurable: false, get: function get() {
2712
2892
  return sdp;
2713
- } });
2893
+ }
2894
+ });
2714
2895
 
2715
2896
  return this;
2716
2897
  };
@@ -2722,11 +2903,17 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2722
2903
  };
2723
2904
  };
2724
2905
 
2725
- Object.defineProperty(RTCSessionDescription, 'name', { enumerable: false, configurable: true, writable: false, value: "RTCSessionDescription" });
2906
+ Object.defineProperty(RTCSessionDescription, 'name', {
2907
+ enumerable: false,
2908
+ configurable: true,
2909
+ writable: false,
2910
+ value: 'RTCSessionDescription'
2911
+ });
2726
2912
  Object.defineProperty(RTCSessionDescription, 'prototype', { writable: false });
2727
2913
  module.exports = RTCSessionDescription;
2728
- }, {}], 16: [function (require, module, exports) {
2729
- "use strict";
2914
+ }, {}],
2915
+ 16: [function (require, module, exports) {
2916
+ 'use strict';
2730
2917
 
2731
2918
  // This obvserver checks when a video element has been set a srcObj
2732
2919
 
@@ -2738,7 +2925,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2738
2925
  }
2739
2926
  });
2740
2927
 
2741
- var CLASSID = "CLSID:B8E874D9-72BA-4E54-B59B-3513081DF516";
2928
+ var CLASSID = 'CLSID:B8E874D9-72BA-4E54-B59B-3513081DF516';
2742
2929
 
2743
2930
  function VideoRenderer(video) {
2744
2931
  var srcObject;
@@ -2747,7 +2934,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2747
2934
  this.video = video;
2748
2935
 
2749
2936
  //Create a new video renderer object
2750
- var object = this.object = document.createElement("object");
2937
+ var object = this.object = document.createElement('object');
2751
2938
  //Set csid
2752
2939
  this.object.classid = CLASSID;
2753
2940
  //Apped it hidden
@@ -2787,9 +2974,9 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2787
2974
  //Attach resize event
2788
2975
  object.onresize = function () {
2789
2976
  //Create event
2790
- var event = document.createEvent("Event");
2977
+ var event = document.createEvent('Event');
2791
2978
  //Init metadata or resize event
2792
- event.initEvent(needsmetadata ? "loadedmetadata" : "resize", false, false);
2979
+ event.initEvent(needsmetadata ? 'loadedmetadata' : 'resize', false, false);
2793
2980
  //Dispatch it
2794
2981
  video.dispatchEvent(event);
2795
2982
  //No more medatada event
@@ -2809,12 +2996,16 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2809
2996
  });
2810
2997
 
2811
2998
  // Override properties
2812
- Object.defineProperty(video, 'videoWidth', { enumerable: true, configurable: true, get: function get() {
2999
+ Object.defineProperty(video, 'videoWidth', {
3000
+ enumerable: true, configurable: true, get: function get() {
2813
3001
  return object.videoWidth;
2814
- } });
2815
- Object.defineProperty(video, 'videoHeight', { enumerable: true, configurable: true, get: function get() {
3002
+ }
3003
+ });
3004
+ Object.defineProperty(video, 'videoHeight', {
3005
+ enumerable: true, configurable: true, get: function get() {
2816
3006
  return object.videoHeight;
2817
- } });
3007
+ }
3008
+ });
2818
3009
  //TODO: clone attributes
2819
3010
  }
2820
3011
 
@@ -2869,7 +3060,8 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2869
3060
  };
2870
3061
 
2871
3062
  module.exports = VideoRenderer;
2872
- }, {}], 17: [function (require, module, exports) {
3063
+ }, {}],
3064
+ 17: [function (require, module, exports) {
2873
3065
  'use strict';
2874
3066
 
2875
3067
  var browser = require('detect-browser').detect();
@@ -2887,7 +3079,8 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
2887
3079
  }
2888
3080
 
2889
3081
  module.exports = WebRTCProxy;
2890
- }, { "detect-browser": 18 }], 18: [function (require, module, exports) {
3082
+ }, { 'detect-browser': 18 }],
3083
+ 18: [function (require, module, exports) {
2891
3084
  (function (process) {
2892
3085
  /**
2893
3086
  # detect-browser
@@ -3002,6 +3195,7 @@ var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbo
3002
3195
  parseUserAgent: parseUserAgent
3003
3196
  };
3004
3197
  }).call(this, require('_process'));
3005
- }, { "_process": 2, "os": 1 }] }, {}, [3])(3);
3198
+ }, { '_process': 2, 'os': 1 }]
3199
+ }, {}, [3])(3);
3006
3200
  });
3007
3201
  //# sourceMappingURL=webrtc-ie-shim.js.map