twilio-video 2.21.2 → 2.22.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.
- package/CHANGELOG.md +77 -0
- package/COMMON_ISSUES.md +34 -0
- package/README.md +1 -1
- package/dist/twilio-video.js +376 -124
- package/dist/twilio-video.min.js +20 -20
- package/es5/connect.js +9 -0
- package/es5/connect.js.map +1 -1
- package/es5/localparticipant.js +57 -33
- package/es5/localparticipant.js.map +1 -1
- package/es5/media/track/localtrackpublication.js +56 -4
- package/es5/media/track/localtrackpublication.js.map +1 -1
- package/es5/room.js +59 -0
- package/es5/room.js.map +1 -1
- package/es5/signaling/v2/cancelableroomsignalingpromise.js +2 -1
- package/es5/signaling/v2/cancelableroomsignalingpromise.js.map +1 -1
- package/es5/signaling/v2/localparticipant.js +13 -1
- package/es5/signaling/v2/localparticipant.js.map +1 -1
- package/es5/signaling/v2/localtrackpublication.js +38 -2
- package/es5/signaling/v2/localtrackpublication.js.map +1 -1
- package/es5/signaling/v2/peerconnection.js +23 -7
- package/es5/signaling/v2/peerconnection.js.map +1 -1
- package/es5/signaling/v2/room.js +9 -0
- package/es5/signaling/v2/room.js.map +1 -1
- package/es5/signaling/v2/twilioconnectiontransport.js +8 -1
- package/es5/signaling/v2/twilioconnectiontransport.js.map +1 -1
- package/es5/util/constants.js +4 -2
- package/es5/util/constants.js.map +1 -1
- package/es5/util/index.js +11 -0
- package/es5/util/index.js.map +1 -1
- package/es5/util/twiliowarning.js +12 -0
- package/es5/util/twiliowarning.js.map +1 -0
- package/lib/connect.js +9 -0
- package/lib/localparticipant.js +64 -37
- package/lib/media/track/localtrackpublication.js +32 -4
- package/lib/room.js +53 -0
- package/lib/signaling/v2/cancelableroomsignalingpromise.js +2 -0
- package/lib/signaling/v2/localparticipant.js +15 -1
- package/lib/signaling/v2/localtrackpublication.js +38 -1
- package/lib/signaling/v2/peerconnection.js +22 -7
- package/lib/signaling/v2/room.js +10 -0
- package/lib/signaling/v2/twilioconnectiontransport.js +10 -0
- package/lib/util/constants.js +4 -2
- package/lib/util/index.js +11 -0
- package/lib/util/twiliowarning.js +13 -0
- package/package.json +9 -8
- package/tsdef/LocalParticipant.d.ts +2 -0
- package/tsdef/LocalTrackPublication.d.ts +2 -0
- package/tsdef/Room.d.ts +4 -1
- package/tsdef/twilio-video-tests.ts +38 -0
- package/tsdef/types.d.ts +3 -0
package/dist/twilio-video.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! twilio-video.js 2.
|
|
1
|
+
/*! twilio-video.js 2.22.1
|
|
2
2
|
|
|
3
3
|
The following license applies to all parts of this software except as
|
|
4
4
|
documented below.
|
|
@@ -495,6 +495,15 @@ function connect(token, options) {
|
|
|
495
495
|
* for the {@link LocalParticipant} to {@link NetworkQualityVerbosity}<code style="padding:0 0">#minimal</code>
|
|
496
496
|
* and the {@link NetworkQualityVerbosity} for {@link RemoteParticipant}s to
|
|
497
497
|
* {@link NetworkQualityVerbosity}<code style="padding:0 0">#none</code>.
|
|
498
|
+
* @property {Array<string>} [notifyWarnings=[]] - The SDK raises warning events when it
|
|
499
|
+
* detects certain conditions. You can implement callbacks on these events to act on them, or to alert
|
|
500
|
+
* the user of an issue. Subsequently, "warningsCleared" event is raised when conditions have returned
|
|
501
|
+
* to normal. You can listen to these events by specifying an array of warning. By default,
|
|
502
|
+
* this array is empty and no warning events will be raised.
|
|
503
|
+
* Possible values include <code>recording-media-lost</code>, which is raised when the media server
|
|
504
|
+
* has not detected any media on the published track that is being recorded in the past 30 seconds.
|
|
505
|
+
* This usually happens when there are network interruptions or when the track has stopped.
|
|
506
|
+
* This warning is raised by {@link LocalTrackPublication}, {@link LocalParticipant}, and {@link Room} object.
|
|
498
507
|
* @property {string} [region='gll'] - Preferred signaling region; By default, you will be connected to the
|
|
499
508
|
* nearest signaling server determined by latency based routing. Setting a value other
|
|
500
509
|
* than <code style="padding:0 0">gll</code> bypasses routing and guarantees that signaling traffic will be
|
|
@@ -990,7 +999,7 @@ function normalizeCodecSettings(nameOrSettings) {
|
|
|
990
999
|
}
|
|
991
1000
|
module.exports = connect;
|
|
992
1001
|
|
|
993
|
-
},{"./cancelableroompromise":1,"./encodingparameters":9,"./localparticipant":12,"./media/track/es5":14,"./networkqualityconfiguration":42,"./room":54,"./signaling/v2":68,"./util":128,"./util/cancelablepromise":121,"./util/constants":122,"./util/eventobserver":126,"./util/insightspublisher":129,"./util/insightspublisher/null":130,"./util/log":132,"./util/validate":
|
|
1002
|
+
},{"./cancelableroompromise":1,"./encodingparameters":9,"./localparticipant":12,"./media/track/es5":14,"./networkqualityconfiguration":42,"./room":54,"./signaling/v2":68,"./util":128,"./util/cancelablepromise":121,"./util/constants":122,"./util/eventobserver":126,"./util/insightspublisher":129,"./util/insightspublisher/null":130,"./util/log":132,"./util/validate":146,"./webrtc":154,"./webrtc/util":167}],3:[function(require,module,exports){
|
|
994
1003
|
'use strict';
|
|
995
1004
|
var _a = require('./util/constants'), DEFAULT_LOG_LEVEL = _a.DEFAULT_LOG_LEVEL, DEFAULT_LOGGER_NAME = _a.DEFAULT_LOGGER_NAME;
|
|
996
1005
|
/**
|
|
@@ -1322,7 +1331,7 @@ function createLocalTracks(options) {
|
|
|
1322
1331
|
}
|
|
1323
1332
|
exports.createLocalTracks = createLocalTracks;
|
|
1324
1333
|
|
|
1325
|
-
},{"./media/track/es5":14,"./util":128,"./util/constants":122,"./util/log":132,"./webaudio/workaround180748":
|
|
1334
|
+
},{"./media/track/es5":14,"./util":128,"./util/constants":122,"./util/log":132,"./webaudio/workaround180748":151,"./webrtc":154}],5:[function(require,module,exports){
|
|
1326
1335
|
'use strict';
|
|
1327
1336
|
var __extends = (this && this.__extends) || (function () {
|
|
1328
1337
|
var extendStatics = function (d, b) {
|
|
@@ -1678,7 +1687,7 @@ var DataTransport = /** @class */ (function (_super) {
|
|
|
1678
1687
|
*/
|
|
1679
1688
|
module.exports = DataTransport;
|
|
1680
1689
|
|
|
1681
|
-
},{"events":
|
|
1690
|
+
},{"events":170}],9:[function(require,module,exports){
|
|
1682
1691
|
'use strict';
|
|
1683
1692
|
var __extends = (this && this.__extends) || (function () {
|
|
1684
1693
|
var extendStatics = function (d, b) {
|
|
@@ -1776,13 +1785,13 @@ var EncodingParametersImpl = /** @class */ (function (_super) {
|
|
|
1776
1785
|
*/
|
|
1777
1786
|
module.exports = EncodingParametersImpl;
|
|
1778
1787
|
|
|
1779
|
-
},{"events":
|
|
1788
|
+
},{"events":170}],10:[function(require,module,exports){
|
|
1780
1789
|
'use strict';
|
|
1781
1790
|
var EventEmitter = require('events').EventEmitter;
|
|
1782
1791
|
var hidePrivateAndCertainPublicPropertiesInClass = require('./util').hidePrivateAndCertainPublicPropertiesInClass;
|
|
1783
1792
|
module.exports = hidePrivateAndCertainPublicPropertiesInClass(EventEmitter, ['domain']);
|
|
1784
1793
|
|
|
1785
|
-
},{"./util":128,"events":
|
|
1794
|
+
},{"./util":128,"events":170}],11:[function(require,module,exports){
|
|
1786
1795
|
'use strict';
|
|
1787
1796
|
var __assign = (this && this.__assign) || function () {
|
|
1788
1797
|
__assign = Object.assign || function(t) {
|
|
@@ -1856,7 +1865,7 @@ module.exports = {
|
|
|
1856
1865
|
LocalDataTrack: LocalDataTrack
|
|
1857
1866
|
};
|
|
1858
1867
|
|
|
1859
|
-
},{"../package.json":
|
|
1868
|
+
},{"../package.json":171,"./connect":2,"./createlocaltrack":3,"./createlocaltracks":4,"./media/track/es5":14,"./preflight/preflighttest":48,"./util/support":141,"./vendor/loglevel":148}],12:[function(require,module,exports){
|
|
1860
1869
|
'use strict';
|
|
1861
1870
|
var __extends = (this && this.__extends) || (function () {
|
|
1862
1871
|
var extendStatics = function (d, b) {
|
|
@@ -1906,6 +1915,8 @@ var Participant = require('./participant');
|
|
|
1906
1915
|
* @emits LocalParticipant#trackPublished
|
|
1907
1916
|
* @emits LocalParticipant#trackStarted
|
|
1908
1917
|
* @emits LocalParticipant#trackStopped
|
|
1918
|
+
* @emits LocalParticipant#trackWarning
|
|
1919
|
+
* @emits LocalParticipant#trackWarningsCleared
|
|
1909
1920
|
*/
|
|
1910
1921
|
var LocalParticipant = /** @class */ (function (_super) {
|
|
1911
1922
|
__extends(LocalParticipant, _super);
|
|
@@ -2034,59 +2045,47 @@ var LocalParticipant = /** @class */ (function (_super) {
|
|
|
2034
2045
|
if (this.state === 'disconnected') {
|
|
2035
2046
|
return;
|
|
2036
2047
|
}
|
|
2037
|
-
var
|
|
2038
|
-
|
|
2039
|
-
var trackSignaling = signaling.getPublication(localTrack._trackSender);
|
|
2048
|
+
var localTrackDisabled = function (localTrack) {
|
|
2049
|
+
var trackSignaling = _this._signaling.getPublication(localTrack._trackSender);
|
|
2040
2050
|
if (trackSignaling) {
|
|
2041
2051
|
trackSignaling.disable();
|
|
2042
2052
|
log.debug("Disabled the " + trackClass(localTrack, true) + ":", localTrack.id);
|
|
2043
2053
|
}
|
|
2044
|
-
}
|
|
2045
|
-
function
|
|
2046
|
-
var trackSignaling =
|
|
2054
|
+
};
|
|
2055
|
+
var localTrackEnabled = function (localTrack) {
|
|
2056
|
+
var trackSignaling = _this._signaling.getPublication(localTrack._trackSender);
|
|
2047
2057
|
if (trackSignaling) {
|
|
2048
2058
|
trackSignaling.enable();
|
|
2049
2059
|
log.debug("Enabled the " + trackClass(localTrack, true) + ":", localTrack.id);
|
|
2050
2060
|
}
|
|
2051
|
-
}
|
|
2052
|
-
function
|
|
2061
|
+
};
|
|
2062
|
+
var localTrackStopped = function (localTrack) {
|
|
2053
2063
|
// NOTE(mroberts): We shouldn't need to check for `stop`, since DataTracks
|
|
2054
2064
|
// do not emit "stopped".
|
|
2055
|
-
var trackSignaling =
|
|
2065
|
+
var trackSignaling = _this._signaling.getPublication(localTrack._trackSender);
|
|
2056
2066
|
if (trackSignaling) {
|
|
2057
2067
|
trackSignaling.stop();
|
|
2058
2068
|
}
|
|
2059
2069
|
return trackSignaling;
|
|
2060
|
-
}
|
|
2061
|
-
|
|
2062
|
-
this.on('trackEnabled', localTrackEnabled);
|
|
2063
|
-
this.on('trackStopped', localTrackStopped);
|
|
2064
|
-
this._tracks.forEach(function (track) {
|
|
2065
|
-
_this._addLocalTrack(track, trackPriority.PRIORITY_STANDARD);
|
|
2066
|
-
_this._getOrCreateLocalTrackPublication(track).catch(function (error) {
|
|
2067
|
-
// Just log a warning for now.
|
|
2068
|
-
log.warn("Failed to get or create LocalTrackPublication for " + track + ":", error);
|
|
2069
|
-
});
|
|
2070
|
-
});
|
|
2071
|
-
var self = this;
|
|
2072
|
-
signaling.on('stateChanged', function stateChanged(state) {
|
|
2070
|
+
};
|
|
2071
|
+
var stateChanged = function (state) {
|
|
2073
2072
|
log.debug('Transitioned to state:', state);
|
|
2074
2073
|
if (state === 'disconnected') {
|
|
2075
2074
|
log.debug('Removing LocalTrack event listeners');
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2075
|
+
_this._signaling.removeListener('stateChanged', stateChanged);
|
|
2076
|
+
_this.removeListener('trackDisabled', localTrackDisabled);
|
|
2077
|
+
_this.removeListener('trackEnabled', localTrackEnabled);
|
|
2078
|
+
_this.removeListener('trackStopped', localTrackStopped);
|
|
2080
2079
|
// NOTE(mmalavalli): Remove the stale MediaTrackSender clones so that we
|
|
2081
2080
|
// do not call replaceTrack() on their RTCRtpSenders.
|
|
2082
|
-
|
|
2081
|
+
_this._tracks.forEach(function (track) {
|
|
2083
2082
|
var trackSignaling = localTrackStopped(track);
|
|
2084
2083
|
if (trackSignaling) {
|
|
2085
2084
|
track._trackSender.removeClone(trackSignaling._trackTransceiver);
|
|
2086
2085
|
}
|
|
2087
2086
|
});
|
|
2088
|
-
log.info("LocalParticipant disconnected. Stopping " +
|
|
2089
|
-
|
|
2087
|
+
log.info("LocalParticipant disconnected. Stopping " + _this._tracksToStop.size + " automatically-acquired LocalTracks");
|
|
2088
|
+
_this._tracksToStop.forEach(function (track) {
|
|
2090
2089
|
track.stop();
|
|
2091
2090
|
});
|
|
2092
2091
|
}
|
|
@@ -2097,8 +2096,19 @@ var LocalParticipant = /** @class */ (function (_super) {
|
|
|
2097
2096
|
log.info('reconnected');
|
|
2098
2097
|
// NOTE(mpatwardhan): `stateChanged` can get emitted with StateMachine locked.
|
|
2099
2098
|
// Do not signal public events synchronously with lock held.
|
|
2100
|
-
setTimeout(function () { return
|
|
2099
|
+
setTimeout(function () { return _this.emit('reconnected'); }, 0);
|
|
2101
2100
|
}
|
|
2101
|
+
};
|
|
2102
|
+
this.on('trackDisabled', localTrackDisabled);
|
|
2103
|
+
this.on('trackEnabled', localTrackEnabled);
|
|
2104
|
+
this.on('trackStopped', localTrackStopped);
|
|
2105
|
+
this._signaling.on('stateChanged', stateChanged);
|
|
2106
|
+
this._tracks.forEach(function (track) {
|
|
2107
|
+
_this._addLocalTrack(track, trackPriority.PRIORITY_STANDARD);
|
|
2108
|
+
_this._getOrCreateLocalTrackPublication(track).catch(function (error) {
|
|
2109
|
+
// Just log a warning for now.
|
|
2110
|
+
log.warn("Failed to get or create LocalTrackPublication for " + track + ":", error);
|
|
2111
|
+
});
|
|
2102
2112
|
});
|
|
2103
2113
|
};
|
|
2104
2114
|
/**
|
|
@@ -2117,9 +2127,6 @@ var LocalParticipant = /** @class */ (function (_super) {
|
|
|
2117
2127
|
if (!trackSignaling) {
|
|
2118
2128
|
return Promise.reject(new Error("Unexpected error: The " + localTrack + " cannot be published"));
|
|
2119
2129
|
}
|
|
2120
|
-
function unpublish(publication) {
|
|
2121
|
-
self.unpublishTrack(publication.track);
|
|
2122
|
-
}
|
|
2123
2130
|
return new Promise(function (resolve, reject) {
|
|
2124
2131
|
function updated() {
|
|
2125
2132
|
var error = trackSignaling.error;
|
|
@@ -2150,10 +2157,23 @@ var LocalParticipant = /** @class */ (function (_super) {
|
|
|
2150
2157
|
LocalVideoTrackPublication: self._LocalVideoTrackPublication
|
|
2151
2158
|
};
|
|
2152
2159
|
localTrackPublication = getTrackPublication(self.tracks, localTrack);
|
|
2160
|
+
var warningHandler = function (twilioWarningName) {
|
|
2161
|
+
return self.emit('trackWarning', twilioWarningName, localTrackPublication);
|
|
2162
|
+
};
|
|
2163
|
+
var warningsClearedHandler = function () {
|
|
2164
|
+
return self.emit('trackWarningsCleared', localTrackPublication);
|
|
2165
|
+
};
|
|
2166
|
+
var unpublish = function (publication) {
|
|
2167
|
+
localTrackPublication.removeListener('trackWarning', warningHandler);
|
|
2168
|
+
localTrackPublication.removeListener('trackWarningsCleared', warningsClearedHandler);
|
|
2169
|
+
self.unpublishTrack(publication.track);
|
|
2170
|
+
};
|
|
2153
2171
|
if (!localTrackPublication) {
|
|
2154
2172
|
localTrackPublication = asLocalTrackPublication(localTrack, trackSignaling, unpublish, options);
|
|
2155
2173
|
self._addTrackPublication(localTrackPublication);
|
|
2156
2174
|
}
|
|
2175
|
+
localTrackPublication.on('warning', warningHandler);
|
|
2176
|
+
localTrackPublication.on('warningsCleared', warningsClearedHandler);
|
|
2157
2177
|
var state = self._signaling.state;
|
|
2158
2178
|
if (state === 'connected' || state === 'connecting') {
|
|
2159
2179
|
if (localTrack._processorEventObserver) {
|
|
@@ -2488,6 +2508,19 @@ var LocalParticipant = /** @class */ (function (_super) {
|
|
|
2488
2508
|
* @param {LocalTrack} track - The {@link LocalTrack} that stopped
|
|
2489
2509
|
* @event LocalParticipant#trackStopped
|
|
2490
2510
|
*/
|
|
2511
|
+
/**
|
|
2512
|
+
* One of the {@link LocalParticipant}'s {@link LocalTrackPublication}s encountered a warning.
|
|
2513
|
+
* This event is only raised if you enabled warnings using <code>notifyWarnings</code> in <code>ConnectOptions</code>.
|
|
2514
|
+
* @param {string} name - The warning that was raised.
|
|
2515
|
+
* @param {LocalTrackPublication} publication - The {@link LocalTrackPublication} that encountered the warning.
|
|
2516
|
+
* @event LocalParticipant#trackWarning
|
|
2517
|
+
*/
|
|
2518
|
+
/**
|
|
2519
|
+
* One of the {@link LocalParticipant}'s {@link LocalTrackPublication}s cleared all warnings.
|
|
2520
|
+
* This event is only raised if you enabled warnings using <code>notifyWarnings</code> in <code>ConnectOptions</code>.
|
|
2521
|
+
* @param {LocalTrackPublication} publication - The {@link LocalTrackPublication} that cleared all warnings.
|
|
2522
|
+
* @event LocalParticipant#trackWarningsCleared
|
|
2523
|
+
*/
|
|
2491
2524
|
/**
|
|
2492
2525
|
* Outgoing media encoding parameters.
|
|
2493
2526
|
* @typedef {object} EncodingParameters
|
|
@@ -2535,7 +2568,7 @@ function getTrackPublication(trackPublications, track) {
|
|
|
2535
2568
|
}
|
|
2536
2569
|
module.exports = LocalParticipant;
|
|
2537
2570
|
|
|
2538
|
-
},{"./media/track/es5":14,"./media/track/localaudiotrackpublication":20,"./media/track/localdatatrackpublication":22,"./media/track/localvideotrackpublication":26,"./participant":43,"./util":128,"./util/constants":122,"./util/validate":
|
|
2571
|
+
},{"./media/track/es5":14,"./media/track/localaudiotrackpublication":20,"./media/track/localdatatrackpublication":22,"./media/track/localvideotrackpublication":26,"./participant":43,"./util":128,"./util/constants":122,"./util/validate":146,"./webrtc":154}],13:[function(require,module,exports){
|
|
2539
2572
|
'use strict';
|
|
2540
2573
|
var __extends = (this && this.__extends) || (function () {
|
|
2541
2574
|
var extendStatics = function (d, b) {
|
|
@@ -2724,7 +2757,7 @@ function LocalAudioTrack(mediaStreamTrack, options) {
|
|
|
2724
2757
|
inherits(LocalAudioTrack, LocalAudioTrackClass);
|
|
2725
2758
|
module.exports = LocalAudioTrack;
|
|
2726
2759
|
|
|
2727
|
-
},{"../../../vendor/inherits":
|
|
2760
|
+
},{"../../../vendor/inherits":147,"../localaudiotrack":19}],16:[function(require,module,exports){
|
|
2728
2761
|
// eslint-disable-next-line no-warning-comments
|
|
2729
2762
|
// TODO(mroberts): Remove this when we go to the next major version. This is
|
|
2730
2763
|
// only in place so that we can support ES6 classes without requiring `new`.
|
|
@@ -2739,7 +2772,7 @@ function LocalDataTrack(options) {
|
|
|
2739
2772
|
inherits(LocalDataTrack, LocalDataTrackClass);
|
|
2740
2773
|
module.exports = LocalDataTrack;
|
|
2741
2774
|
|
|
2742
|
-
},{"../../../vendor/inherits":
|
|
2775
|
+
},{"../../../vendor/inherits":147,"../localdatatrack":21}],17:[function(require,module,exports){
|
|
2743
2776
|
// eslint-disable-next-line no-warning-comments
|
|
2744
2777
|
// TODO(mroberts): Remove this when we go to the next major version. This is
|
|
2745
2778
|
// only in place so that we can support ES6 classes without requiring `new`.
|
|
@@ -2754,7 +2787,7 @@ function LocalVideoTrack(mediaStreamTrack, options) {
|
|
|
2754
2787
|
inherits(LocalVideoTrack, LocalVideoTrackClass);
|
|
2755
2788
|
module.exports = LocalVideoTrack;
|
|
2756
2789
|
|
|
2757
|
-
},{"../../../vendor/inherits":
|
|
2790
|
+
},{"../../../vendor/inherits":147,"../localvideotrack":25}],18:[function(require,module,exports){
|
|
2758
2791
|
'use strict';
|
|
2759
2792
|
var __extends = (this && this.__extends) || (function () {
|
|
2760
2793
|
var extendStatics = function (d, b) {
|
|
@@ -3611,7 +3644,7 @@ function restartWhenInadvertentlyStopped(localMediaTrack) {
|
|
|
3611
3644
|
}
|
|
3612
3645
|
module.exports = mixinLocalMediaTrack;
|
|
3613
3646
|
|
|
3614
|
-
},{"../../util":128,"../../util/constants":122,"../../util/detectsilentaudio":123,"../../util/detectsilentvideo":124,"../../util/documentvisibilitymonitor.js":125,"../../util/localmediarestartdeferreds":131,"../../webaudio/workaround180748":
|
|
3647
|
+
},{"../../util":128,"../../util/constants":122,"../../util/detectsilentaudio":123,"../../util/detectsilentvideo":124,"../../util/documentvisibilitymonitor.js":125,"../../util/localmediarestartdeferreds":131,"../../webaudio/workaround180748":151,"../../webrtc":154,"../../webrtc/util":167,"./sender":37}],24:[function(require,module,exports){
|
|
3615
3648
|
/* eslint new-cap:0 */
|
|
3616
3649
|
'use strict';
|
|
3617
3650
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -3629,6 +3662,27 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3629
3662
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3630
3663
|
};
|
|
3631
3664
|
})();
|
|
3665
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
3666
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
3667
|
+
if (!m) return o;
|
|
3668
|
+
var i = m.call(o), r, ar = [], e;
|
|
3669
|
+
try {
|
|
3670
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
3671
|
+
}
|
|
3672
|
+
catch (error) { e = { error: error }; }
|
|
3673
|
+
finally {
|
|
3674
|
+
try {
|
|
3675
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
3676
|
+
}
|
|
3677
|
+
finally { if (e) throw e.error; }
|
|
3678
|
+
}
|
|
3679
|
+
return ar;
|
|
3680
|
+
};
|
|
3681
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
3682
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
3683
|
+
to[j] = from[i];
|
|
3684
|
+
return to;
|
|
3685
|
+
};
|
|
3632
3686
|
var TrackPublication = require('./trackpublication');
|
|
3633
3687
|
var _a = require('../../util/constants'), E = _a.typeErrors, trackPriority = _a.trackPriority;
|
|
3634
3688
|
/**
|
|
@@ -3640,6 +3694,8 @@ var _a = require('../../util/constants'), E = _a.typeErrors, trackPriority = _a.
|
|
|
3640
3694
|
* @property {Track.Kind} kind - kind of the published {@link LocalTrack}
|
|
3641
3695
|
* @property {Track.Priority} priority - the publish priority of the {@link LocalTrack}
|
|
3642
3696
|
* @property {LocalTrack} track - the {@link LocalTrack}
|
|
3697
|
+
* @emits LocalTrackPublication#warning
|
|
3698
|
+
* @emits LocalTrackPublication#warningsCleared
|
|
3643
3699
|
*/
|
|
3644
3700
|
var LocalTrackPublication = /** @class */ (function (_super) {
|
|
3645
3701
|
__extends(LocalTrackPublication, _super);
|
|
@@ -3656,6 +3712,15 @@ var LocalTrackPublication = /** @class */ (function (_super) {
|
|
|
3656
3712
|
function LocalTrackPublication(signaling, track, unpublish, options) {
|
|
3657
3713
|
var _this = _super.call(this, track.name, signaling.sid, options) || this;
|
|
3658
3714
|
Object.defineProperties(_this, {
|
|
3715
|
+
_reemitSignalingEvent: {
|
|
3716
|
+
value: function () {
|
|
3717
|
+
var args = [];
|
|
3718
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3719
|
+
args[_i] = arguments[_i];
|
|
3720
|
+
}
|
|
3721
|
+
return _this.emit.apply(_this, __spreadArray([args && args.length ? 'warning' : 'warningsCleared'], __read(args)));
|
|
3722
|
+
}
|
|
3723
|
+
},
|
|
3659
3724
|
_reemitTrackEvent: {
|
|
3660
3725
|
value: function () { return _this.emit(_this.isTrackEnabled
|
|
3661
3726
|
? 'trackEnabled'
|
|
@@ -3688,8 +3753,12 @@ var LocalTrackPublication = /** @class */ (function (_super) {
|
|
|
3688
3753
|
value: track
|
|
3689
3754
|
}
|
|
3690
3755
|
});
|
|
3691
|
-
|
|
3692
|
-
|
|
3756
|
+
['disabled', 'enabled'].forEach(function (name) {
|
|
3757
|
+
return track.on(name, _this._reemitTrackEvent);
|
|
3758
|
+
});
|
|
3759
|
+
['warning', 'warningsCleared'].forEach(function (name) {
|
|
3760
|
+
return signaling.on(name, _this._reemitSignalingEvent);
|
|
3761
|
+
});
|
|
3693
3762
|
return _this;
|
|
3694
3763
|
}
|
|
3695
3764
|
LocalTrackPublication.prototype.toString = function () {
|
|
@@ -3716,13 +3785,29 @@ var LocalTrackPublication = /** @class */ (function (_super) {
|
|
|
3716
3785
|
* @returns {this}
|
|
3717
3786
|
*/
|
|
3718
3787
|
LocalTrackPublication.prototype.unpublish = function () {
|
|
3719
|
-
|
|
3720
|
-
|
|
3788
|
+
var _this = this;
|
|
3789
|
+
['disabled', 'enabled'].forEach(function (name) {
|
|
3790
|
+
return _this.track.removeListener(name, _this._reemitTrackEvent);
|
|
3791
|
+
});
|
|
3792
|
+
['warning', 'warningsCleared'].forEach(function (name) {
|
|
3793
|
+
return _this._signaling.removeListener(name, _this._reemitSignalingEvent);
|
|
3794
|
+
});
|
|
3721
3795
|
this._unpublish(this);
|
|
3722
3796
|
return this;
|
|
3723
3797
|
};
|
|
3724
3798
|
return LocalTrackPublication;
|
|
3725
3799
|
}(TrackPublication));
|
|
3800
|
+
/**
|
|
3801
|
+
* The published {@link LocalTrack} encountered a warning.
|
|
3802
|
+
* This event is only raised if you enabled warnings using <code>notifyWarnings</code> in <code>ConnectOptions</code>.
|
|
3803
|
+
* @event LocalTrackPublication#warning
|
|
3804
|
+
* @param {string} name - The warning that was raised.
|
|
3805
|
+
*/
|
|
3806
|
+
/**
|
|
3807
|
+
* The published {@link LocalTrack} cleared all warnings.
|
|
3808
|
+
* This event is only raised if you enabled warnings using <code>notifyWarnings</code> in <code>ConnectOptions</code>.
|
|
3809
|
+
* @event LocalTrackPublication#warningsCleared
|
|
3810
|
+
*/
|
|
3726
3811
|
module.exports = LocalTrackPublication;
|
|
3727
3812
|
|
|
3728
3813
|
},{"../../util/constants":122,"./trackpublication":38}],25:[function(require,module,exports){
|
|
@@ -4072,7 +4157,7 @@ function workaroundSilentLocalVideo(localVideoTrack, doc) {
|
|
|
4072
4157
|
*/
|
|
4073
4158
|
module.exports = LocalVideoTrack;
|
|
4074
4159
|
|
|
4075
|
-
},{"../../util":128,"../../util/detectsilentvideo":124,"../../webrtc/util":
|
|
4160
|
+
},{"../../util":128,"../../util/detectsilentvideo":124,"../../webrtc/util":167,"./localmediatrack":23,"./videotrack":41}],26:[function(require,module,exports){
|
|
4076
4161
|
'use strict';
|
|
4077
4162
|
var __extends = (this && this.__extends) || (function () {
|
|
4078
4163
|
var extendStatics = function (d, b) {
|
|
@@ -4482,7 +4567,7 @@ function shimMediaElement(el, onUnintentionallyPaused) {
|
|
|
4482
4567
|
}
|
|
4483
4568
|
module.exports = MediaTrack;
|
|
4484
4569
|
|
|
4485
|
-
},{"../../util":128,"../../util/localmediarestartdeferreds":131,"../../webrtc":
|
|
4570
|
+
},{"../../util":128,"../../util/localmediarestartdeferreds":131,"../../webrtc":154,"../../webrtc/util":167,"./":18}],28:[function(require,module,exports){
|
|
4486
4571
|
'use strict';
|
|
4487
4572
|
var __extends = (this && this.__extends) || (function () {
|
|
4488
4573
|
var extendStatics = function (d, b) {
|
|
@@ -5222,7 +5307,7 @@ function playIfPausedWhileInBackground(remoteMediaTrack) {
|
|
|
5222
5307
|
*/
|
|
5223
5308
|
module.exports = mixinRemoteMediaTrack;
|
|
5224
5309
|
|
|
5225
|
-
},{"../../util/constants":122,"../../util/documentvisibilitymonitor.js":125,"../../webrtc/util":
|
|
5310
|
+
},{"../../util/constants":122,"../../util/documentvisibilitymonitor.js":125,"../../webrtc/util":167}],34:[function(require,module,exports){
|
|
5226
5311
|
'use strict';
|
|
5227
5312
|
var __extends = (this && this.__extends) || (function () {
|
|
5228
5313
|
var extendStatics = function (d, b) {
|
|
@@ -6391,7 +6476,7 @@ var VideoProcessorEventObserver = /** @class */ (function (_super) {
|
|
|
6391
6476
|
}(EventEmitter));
|
|
6392
6477
|
module.exports = VideoProcessorEventObserver;
|
|
6393
6478
|
|
|
6394
|
-
},{"../../util/constants":122,"events":
|
|
6479
|
+
},{"../../util/constants":122,"events":170}],41:[function(require,module,exports){
|
|
6395
6480
|
'use strict';
|
|
6396
6481
|
var __extends = (this && this.__extends) || (function () {
|
|
6397
6482
|
var extendStatics = function (d, b) {
|
|
@@ -7005,7 +7090,7 @@ var NetworkQualityConfigurationImpl = /** @class */ (function (_super) {
|
|
|
7005
7090
|
}(EventEmitter));
|
|
7006
7091
|
module.exports = NetworkQualityConfigurationImpl;
|
|
7007
7092
|
|
|
7008
|
-
},{"./util":128,"./util/constants":122,"events":
|
|
7093
|
+
},{"./util":128,"./util/constants":122,"events":170}],43:[function(require,module,exports){
|
|
7009
7094
|
'use strict';
|
|
7010
7095
|
var __extends = (this && this.__extends) || (function () {
|
|
7011
7096
|
var extendStatics = function (d, b) {
|
|
@@ -7824,7 +7909,7 @@ function getTurnCredentials(token, wsServer) {
|
|
|
7824
7909
|
}
|
|
7825
7910
|
exports.getTurnCredentials = getTurnCredentials;
|
|
7826
7911
|
|
|
7827
|
-
},{"../twilioconnection.js":117,"../util/constants":122,"../util/twilio-video-errors":143,"events":
|
|
7912
|
+
},{"../twilioconnection.js":117,"../util/constants":122,"../util/twilio-video-errors":143,"events":170}],46:[function(require,module,exports){
|
|
7828
7913
|
"use strict";
|
|
7829
7914
|
var __read = (this && this.__read) || function (o, n) {
|
|
7830
7915
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -8593,7 +8678,7 @@ function syntheticAudio() {
|
|
|
8593
8678
|
}
|
|
8594
8679
|
exports.syntheticAudio = syntheticAudio;
|
|
8595
8680
|
|
|
8596
|
-
},{"../webaudio/audiocontext":
|
|
8681
|
+
},{"../webaudio/audiocontext":149}],50:[function(require,module,exports){
|
|
8597
8682
|
"use strict";
|
|
8598
8683
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8599
8684
|
exports.syntheticVideo = void 0;
|
|
@@ -8758,7 +8843,7 @@ var QueueingEventEmitter = /** @class */ (function (_super) {
|
|
|
8758
8843
|
}(EventEmitter));
|
|
8759
8844
|
module.exports = QueueingEventEmitter;
|
|
8760
8845
|
|
|
8761
|
-
},{"events":
|
|
8846
|
+
},{"events":170}],53:[function(require,module,exports){
|
|
8762
8847
|
'use strict';
|
|
8763
8848
|
var __extends = (this && this.__extends) || (function () {
|
|
8764
8849
|
var extendStatics = function (d, b) {
|
|
@@ -9124,6 +9209,8 @@ var nInstances = 0;
|
|
|
9124
9209
|
* @emits Room#trackSwitchedOn
|
|
9125
9210
|
* @emits Room#trackUnpublished
|
|
9126
9211
|
* @emits Room#trackUnsubscribed
|
|
9212
|
+
* @emits Room#trackWarning
|
|
9213
|
+
* @emits Room#trackWarningsCleared
|
|
9127
9214
|
*/
|
|
9128
9215
|
var Room = /** @class */ (function (_super) {
|
|
9129
9216
|
__extends(Room, _super);
|
|
@@ -9198,6 +9285,7 @@ var Room = /** @class */ (function (_super) {
|
|
|
9198
9285
|
value: signaling.mediaRegion
|
|
9199
9286
|
}
|
|
9200
9287
|
});
|
|
9288
|
+
handleLocalParticipantEvents(_this, localParticipant);
|
|
9201
9289
|
handleRecordingEvents(_this, signaling.recording);
|
|
9202
9290
|
handleSignalingEvents(_this, signaling);
|
|
9203
9291
|
log.info('Created a new Room:', _this.name);
|
|
@@ -9501,6 +9589,40 @@ function rewriteLocalTrackIds(room, trackStats) {
|
|
|
9501
9589
|
* });
|
|
9502
9590
|
* });
|
|
9503
9591
|
*/
|
|
9592
|
+
/**
|
|
9593
|
+
* One of the {@link LocalParticipant}'s {@link LocalTrackPublication}s in the {@link Room} encountered a warning.
|
|
9594
|
+
* This event is only raised if you enabled warnings using <code>notifyWarnings</code> in <code>ConnectOptions</code>.
|
|
9595
|
+
* @param {string} name - The warning that was raised.
|
|
9596
|
+
* @param {LocalTrackPublication} publication - The {@link LocalTrackPublication} that encountered the warning.
|
|
9597
|
+
* @param {LocalParticipant} participant - The {@link LocalParticipant}
|
|
9598
|
+
* @event Room#trackWarning
|
|
9599
|
+
* @example
|
|
9600
|
+
* room.on('trackWarning', (name, publication, participant) => {
|
|
9601
|
+
* if (name === 'recording-media-lost') {
|
|
9602
|
+
* log(`LocalTrack ${publication.track.name} is not recording media.`,
|
|
9603
|
+
* name, publication, participant);
|
|
9604
|
+
*
|
|
9605
|
+
* // Wait a reasonable amount of time to clear the warning.
|
|
9606
|
+
* const timer = setTimeout(() => {
|
|
9607
|
+
* // If the warning is not cleared, you can manually
|
|
9608
|
+
* // reconnect to the room, or show a dialog to the user
|
|
9609
|
+
* }, 5000);
|
|
9610
|
+
*
|
|
9611
|
+
* room.once('trackWarningsCleared', (publication, participant) => {
|
|
9612
|
+
* log('LocalTrack warnings have cleared!',
|
|
9613
|
+
* publication, participant);
|
|
9614
|
+
* clearTimeout(timer);
|
|
9615
|
+
* });
|
|
9616
|
+
* }
|
|
9617
|
+
});
|
|
9618
|
+
*/
|
|
9619
|
+
/**
|
|
9620
|
+
* One of the {@link LocalParticipant}'s {@link LocalTrackPublication}s in the {@link Room} cleared all warnings.
|
|
9621
|
+
* This event is only raised if you enabled warnings using <code>notifyWarnings</code> in <code>ConnectOptions</code>.
|
|
9622
|
+
* @param {LocalTrackPublication} publication - The {@link LocalTrackPublication} that cleared all warnings.
|
|
9623
|
+
* @param {LocalParticipant} participant - The {@link LocalParticipant}
|
|
9624
|
+
* @event Room#trackWarningsCleared
|
|
9625
|
+
*/
|
|
9504
9626
|
function connectParticipant(room, participantSignaling) {
|
|
9505
9627
|
var log = room._log, clientTrackSwitchOffControl = room._clientTrackSwitchOffControl, contentPreferencesMode = room._contentPreferencesMode;
|
|
9506
9628
|
var participant = new RemoteParticipant(participantSignaling, { log: log, clientTrackSwitchOffControl: clientTrackSwitchOffControl, contentPreferencesMode: contentPreferencesMode });
|
|
@@ -9550,6 +9672,28 @@ function connectParticipant(room, participantSignaling) {
|
|
|
9550
9672
|
}
|
|
9551
9673
|
});
|
|
9552
9674
|
}
|
|
9675
|
+
function handleLocalParticipantEvents(room, localParticipant) {
|
|
9676
|
+
var events = ['trackWarning', 'trackWarningsCleared'].map(function (event) { return ({
|
|
9677
|
+
eventName: event,
|
|
9678
|
+
handler: function () {
|
|
9679
|
+
var args = [];
|
|
9680
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
9681
|
+
args[_i] = arguments[_i];
|
|
9682
|
+
}
|
|
9683
|
+
return room.emit.apply(room, __spreadArray([event], __read(__spreadArray(__spreadArray([], __read(args)), [localParticipant]))));
|
|
9684
|
+
},
|
|
9685
|
+
}); });
|
|
9686
|
+
events.forEach(function (_a) {
|
|
9687
|
+
var eventName = _a.eventName, handler = _a.handler;
|
|
9688
|
+
return localParticipant.on(eventName, handler);
|
|
9689
|
+
});
|
|
9690
|
+
room.once('disconnected', function () {
|
|
9691
|
+
return events.forEach(function (_a) {
|
|
9692
|
+
var eventName = _a.eventName, handler = _a.handler;
|
|
9693
|
+
return localParticipant.removeListener(eventName, handler);
|
|
9694
|
+
});
|
|
9695
|
+
});
|
|
9696
|
+
}
|
|
9553
9697
|
function handleRecordingEvents(room, recording) {
|
|
9554
9698
|
recording.on('updated', function updated() {
|
|
9555
9699
|
var started = recording.isEnabled;
|
|
@@ -10274,7 +10418,7 @@ var RecordingSignaling = /** @class */ (function (_super) {
|
|
|
10274
10418
|
*/
|
|
10275
10419
|
module.exports = RecordingSignaling;
|
|
10276
10420
|
|
|
10277
|
-
},{"events":
|
|
10421
|
+
},{"events":170}],60:[function(require,module,exports){
|
|
10278
10422
|
'use strict';
|
|
10279
10423
|
var __extends = (this && this.__extends) || (function () {
|
|
10280
10424
|
var extendStatics = function (d, b) {
|
|
@@ -10883,7 +11027,7 @@ var TrackSignaling = /** @class */ (function (_super) {
|
|
|
10883
11027
|
*/
|
|
10884
11028
|
module.exports = TrackSignaling;
|
|
10885
11029
|
|
|
10886
|
-
},{"events":
|
|
11030
|
+
},{"events":170}],64:[function(require,module,exports){
|
|
10887
11031
|
'use strict';
|
|
10888
11032
|
var CancelablePromise = require('../../util/cancelablepromise');
|
|
10889
11033
|
var DefaultPeerConnectionManager = require('./peerconnectionmanager');
|
|
@@ -10930,7 +11074,7 @@ function createCancelableRoomSignalingPromise(token, wsServer, localParticipant,
|
|
|
10930
11074
|
throw error;
|
|
10931
11075
|
});
|
|
10932
11076
|
};
|
|
10933
|
-
var automaticSubscription = options.automaticSubscription, bandwidthProfile = options.bandwidthProfile, dominantSpeaker = options.dominantSpeaker, environment = options.environment, eventObserver = options.eventObserver, loggerName = options.loggerName, logLevel = options.logLevel, name = options.name, networkMonitor = options.networkMonitor, networkQuality = options.networkQuality, realm = options.realm, sdpSemantics = options.sdpSemantics;
|
|
11077
|
+
var automaticSubscription = options.automaticSubscription, bandwidthProfile = options.bandwidthProfile, dominantSpeaker = options.dominantSpeaker, environment = options.environment, eventObserver = options.eventObserver, loggerName = options.loggerName, logLevel = options.logLevel, name = options.name, networkMonitor = options.networkMonitor, networkQuality = options.networkQuality, notifyWarnings = options.notifyWarnings, realm = options.realm, sdpSemantics = options.sdpSemantics;
|
|
10934
11078
|
// decide which msp channels to request
|
|
10935
11079
|
// dominantSpeaker, networkQuality
|
|
10936
11080
|
var trackPriority = !!bandwidthProfile;
|
|
@@ -10947,6 +11091,7 @@ function createCancelableRoomSignalingPromise(token, wsServer, localParticipant,
|
|
|
10947
11091
|
logLevel: logLevel,
|
|
10948
11092
|
networkMonitor: networkMonitor,
|
|
10949
11093
|
networkQuality: networkQuality,
|
|
11094
|
+
notifyWarnings: notifyWarnings,
|
|
10950
11095
|
iceServers: iceServers,
|
|
10951
11096
|
onIced: onIced,
|
|
10952
11097
|
realm: realm,
|
|
@@ -11516,6 +11661,18 @@ var LocalParticipantV2 = /** @class */ (function (_super) {
|
|
|
11516
11661
|
}, this);
|
|
11517
11662
|
return this;
|
|
11518
11663
|
};
|
|
11664
|
+
LocalParticipantV2.prototype.updateMediaStates = function (mediaStates) {
|
|
11665
|
+
if (!mediaStates || !mediaStates.tracks) {
|
|
11666
|
+
return this;
|
|
11667
|
+
}
|
|
11668
|
+
Array.from(this.tracks.values()).forEach(function (publication) {
|
|
11669
|
+
var states = mediaStates.tracks[publication.sid];
|
|
11670
|
+
if (states) {
|
|
11671
|
+
publication.updateMediaStates(states);
|
|
11672
|
+
}
|
|
11673
|
+
});
|
|
11674
|
+
return this;
|
|
11675
|
+
};
|
|
11519
11676
|
/**
|
|
11520
11677
|
* @protected
|
|
11521
11678
|
* @param {DataTrackSender|MediaTrackSender} trackSender
|
|
@@ -11524,7 +11681,7 @@ var LocalParticipantV2 = /** @class */ (function (_super) {
|
|
|
11524
11681
|
* @returns {LocalTrackPublicationV2}
|
|
11525
11682
|
*/
|
|
11526
11683
|
LocalParticipantV2.prototype._createLocalTrackPublicationSignaling = function (trackSender, name, priority) {
|
|
11527
|
-
return new this._LocalTrackPublicationV2(trackSender, name, priority);
|
|
11684
|
+
return new this._LocalTrackPublicationV2(trackSender, name, priority, { log: this._log });
|
|
11528
11685
|
};
|
|
11529
11686
|
/**
|
|
11530
11687
|
* Add a {@link LocalTrackPublicationV2} for the given {@link DataTrackSender}
|
|
@@ -11679,6 +11836,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
11679
11836
|
};
|
|
11680
11837
|
})();
|
|
11681
11838
|
var LocalTrackPublicationSignaling = require('../localtrackpublication');
|
|
11839
|
+
var TwilioWarning = require('../../util/twiliowarning');
|
|
11682
11840
|
var createTwilioError = require('../../util/twilio-video-errors').createTwilioError;
|
|
11683
11841
|
/**
|
|
11684
11842
|
* @extends LocalTrackPublicationSignaling
|
|
@@ -11690,9 +11848,20 @@ var LocalTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
11690
11848
|
* @param {DataTrackSender|MediaTrackSender} trackSender
|
|
11691
11849
|
* @param {string} name
|
|
11692
11850
|
* @param {Track.Priority} priority
|
|
11851
|
+
* @param {object} [options]
|
|
11693
11852
|
*/
|
|
11694
|
-
function LocalTrackPublicationV2(trackSender, name, priority) {
|
|
11695
|
-
|
|
11853
|
+
function LocalTrackPublicationV2(trackSender, name, priority, options) {
|
|
11854
|
+
var _this = _super.call(this, trackSender, name, priority) || this;
|
|
11855
|
+
Object.defineProperties(_this, {
|
|
11856
|
+
_log: {
|
|
11857
|
+
value: options.log.createLog('default', _this)
|
|
11858
|
+
},
|
|
11859
|
+
_mediaStates: {
|
|
11860
|
+
value: { recordings: null },
|
|
11861
|
+
writable: true
|
|
11862
|
+
}
|
|
11863
|
+
});
|
|
11864
|
+
return _this;
|
|
11696
11865
|
}
|
|
11697
11866
|
/**
|
|
11698
11867
|
* Get the {@link LocalTrackPublicationV2#Representation} of a given {@link TrackSignaling}.
|
|
@@ -11707,6 +11876,9 @@ var LocalTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
11707
11876
|
priority: this.updatedPriority
|
|
11708
11877
|
};
|
|
11709
11878
|
};
|
|
11879
|
+
LocalTrackPublicationV2.prototype.toString = function () {
|
|
11880
|
+
return "[LocalTrackPublicationV2: " + this.sid + "]";
|
|
11881
|
+
};
|
|
11710
11882
|
/**
|
|
11711
11883
|
* Compare the {@link LocalTrackPublicationV2} to a {@link LocalTrackPublicationV2#Representation} of itself
|
|
11712
11884
|
* and perform any updates necessary.
|
|
@@ -11729,6 +11901,27 @@ var LocalTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
11729
11901
|
}
|
|
11730
11902
|
return this;
|
|
11731
11903
|
};
|
|
11904
|
+
LocalTrackPublicationV2.prototype.updateMediaStates = function (mediaStates) {
|
|
11905
|
+
if (!mediaStates || !mediaStates.recordings ||
|
|
11906
|
+
this._mediaStates.recordings === mediaStates.recordings) {
|
|
11907
|
+
return this;
|
|
11908
|
+
}
|
|
11909
|
+
this._mediaStates.recordings = mediaStates.recordings;
|
|
11910
|
+
switch (this._mediaStates.recordings) {
|
|
11911
|
+
case 'OK':
|
|
11912
|
+
this._log.info('Warnings have cleared.');
|
|
11913
|
+
this.emit('warningsCleared');
|
|
11914
|
+
break;
|
|
11915
|
+
case 'NO_MEDIA':
|
|
11916
|
+
this._log.warn('Recording media lost.');
|
|
11917
|
+
this.emit('warning', TwilioWarning.recordingMediaLost);
|
|
11918
|
+
break;
|
|
11919
|
+
default:
|
|
11920
|
+
this._log.warn("Unknown media state detected: " + this._mediaStates.recordings);
|
|
11921
|
+
break;
|
|
11922
|
+
}
|
|
11923
|
+
return this;
|
|
11924
|
+
};
|
|
11732
11925
|
return LocalTrackPublicationV2;
|
|
11733
11926
|
}(LocalTrackPublicationSignaling));
|
|
11734
11927
|
/**
|
|
@@ -11743,7 +11936,7 @@ var LocalTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
11743
11936
|
*/
|
|
11744
11937
|
module.exports = LocalTrackPublicationV2;
|
|
11745
11938
|
|
|
11746
|
-
},{"../../util/twilio-video-errors":143,"../localtrackpublication":57}],71:[function(require,module,exports){
|
|
11939
|
+
},{"../../util/twilio-video-errors":143,"../../util/twiliowarning":145,"../localtrackpublication":57}],71:[function(require,module,exports){
|
|
11747
11940
|
/* eslint callback-return:0 */
|
|
11748
11941
|
'use strict';
|
|
11749
11942
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -11840,7 +12033,7 @@ var MediaSignaling = /** @class */ (function (_super) {
|
|
|
11840
12033
|
}(EventEmitter));
|
|
11841
12034
|
module.exports = MediaSignaling;
|
|
11842
12035
|
|
|
11843
|
-
},{"events":
|
|
12036
|
+
},{"events":170}],72:[function(require,module,exports){
|
|
11844
12037
|
/* eslint callback-return:0 */
|
|
11845
12038
|
'use strict';
|
|
11846
12039
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -11999,7 +12192,7 @@ function next(monitor) {
|
|
|
11999
12192
|
*/
|
|
12000
12193
|
module.exports = NetworkQualityMonitor;
|
|
12001
12194
|
|
|
12002
|
-
},{"../../stats/peerconnectionreportfactory":103,"events":
|
|
12195
|
+
},{"../../stats/peerconnectionreportfactory":103,"events":170}],73:[function(require,module,exports){
|
|
12003
12196
|
'use strict';
|
|
12004
12197
|
var __extends = (this && this.__extends) || (function () {
|
|
12005
12198
|
var extendStatics = function (d, b) {
|
|
@@ -14054,13 +14247,29 @@ function updateEncodingParameters(pcv2) {
|
|
|
14054
14247
|
else {
|
|
14055
14248
|
setMaxBitrate(params, maxBitrate);
|
|
14056
14249
|
}
|
|
14057
|
-
if (!isFirefox &&
|
|
14058
|
-
|
|
14059
|
-
|
|
14060
|
-
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
|
|
14250
|
+
if (!isFirefox && params.encodings.length > 0) {
|
|
14251
|
+
if (sender.track.kind === 'audio') {
|
|
14252
|
+
// NOTE(mmalavalli): "priority" is a per-sender property and not
|
|
14253
|
+
// a per-encoding-layer property. So, we set the value only on the first
|
|
14254
|
+
// encoding layer. Any attempt to set the value on subsequent encoding
|
|
14255
|
+
// layers (in the case of simulcast) will result in the Promise returned
|
|
14256
|
+
// by RTCRtpSender.setParameters() being rejected. With this, audio encoding
|
|
14257
|
+
// is prioritized the most.
|
|
14258
|
+
params.encodings[0].priority = 'high';
|
|
14259
|
+
}
|
|
14260
|
+
else if (pcv2._isChromeScreenShareTrack(sender.track)) {
|
|
14261
|
+
// NOTE(mmalavalli): Screen share encodings are prioritized more than those
|
|
14262
|
+
// of the camera.
|
|
14263
|
+
params.encodings[0].priority = 'medium';
|
|
14264
|
+
}
|
|
14265
|
+
if (pcv2._enableDscp) {
|
|
14266
|
+
// NOTE(mmalavalli): "networkPriority" is a per-sender property and not
|
|
14267
|
+
// a per-encoding-layer property. So, we set the value only on the first
|
|
14268
|
+
// encoding layer. Any attempt to set the value on subsequent encoding
|
|
14269
|
+
// layers (in the case of simulcast) will result in the Promise returned
|
|
14270
|
+
// by RTCRtpSender.setParameters() being rejected.
|
|
14271
|
+
params.encodings[0].networkPriority = 'high';
|
|
14272
|
+
}
|
|
14064
14273
|
}
|
|
14065
14274
|
// when a sender is reused, delete any active encodings set by server.
|
|
14066
14275
|
var trackReplaced = pcv2._rtpNewSenders.has(sender);
|
|
@@ -14101,7 +14310,7 @@ function setMaxBitrate(params, maxBitrate) {
|
|
|
14101
14310
|
}
|
|
14102
14311
|
module.exports = PeerConnectionV2;
|
|
14103
14312
|
|
|
14104
|
-
},{"../../data/receiver":5,"../../media/track/receiver":28,"../../statemachine":85,"../../util":128,"../../util/backoff":119,"../../util/constants":122,"../../util/log":132,"../../util/sdp":136,"../../util/sdp/issue8329":137,"../../util/sdp/trackmatcher":139,"../../util/timeout":142,"../../util/twilio-video-errors":143,"../../webrtc":
|
|
14313
|
+
},{"../../data/receiver":5,"../../media/track/receiver":28,"../../statemachine":85,"../../util":128,"../../util/backoff":119,"../../util/constants":122,"../../util/log":132,"../../util/sdp":136,"../../util/sdp/issue8329":137,"../../util/sdp/trackmatcher":139,"../../util/timeout":142,"../../util/twilio-video-errors":143,"../../webrtc":154,"../../webrtc/util":167,"./icebox":66,"./iceconnectionmonitor.js":67}],75:[function(require,module,exports){
|
|
14105
14314
|
'use strict';
|
|
14106
14315
|
var __extends = (this && this.__extends) || (function () {
|
|
14107
14316
|
var extendStatics = function (d, b) {
|
|
@@ -14669,7 +14878,7 @@ function updateConnectionState(pcm) {
|
|
|
14669
14878
|
}
|
|
14670
14879
|
module.exports = PeerConnectionManager;
|
|
14671
14880
|
|
|
14672
|
-
},{"../../media/track/sender":37,"../../queueingeventemitter":52,"../../util":128,"../../util/twilio-video-errors":143,"../../webaudio/audiocontext":
|
|
14881
|
+
},{"../../media/track/sender":37,"../../queueingeventemitter":52,"../../util":128,"../../util/twilio-video-errors":143,"../../webaudio/audiocontext":149,"../../webrtc/util":167,"./peerconnection":74}],76:[function(require,module,exports){
|
|
14673
14882
|
/* eslint callback-return:0 */
|
|
14674
14883
|
'use strict';
|
|
14675
14884
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -15227,6 +15436,10 @@ var RoomV2 = /** @class */ (function (_super) {
|
|
|
15227
15436
|
value: localParticipant.bandwidthProfileRevision,
|
|
15228
15437
|
writable: true
|
|
15229
15438
|
},
|
|
15439
|
+
_mediaStatesWarningsRevision: {
|
|
15440
|
+
value: 0,
|
|
15441
|
+
writable: true
|
|
15442
|
+
},
|
|
15230
15443
|
_networkQualityMonitor: {
|
|
15231
15444
|
value: null,
|
|
15232
15445
|
writable: true
|
|
@@ -15566,6 +15779,11 @@ var RoomV2 = /** @class */ (function (_super) {
|
|
|
15566
15779
|
mediaSignaling.setup(roomState.media_signaling[channel].transport.label);
|
|
15567
15780
|
}
|
|
15568
15781
|
});
|
|
15782
|
+
if (roomState.type === 'warning' && roomState.states &&
|
|
15783
|
+
roomState.states.revision > this._mediaStatesWarningsRevision) {
|
|
15784
|
+
this._mediaStatesWarningsRevision = roomState.states.revision;
|
|
15785
|
+
this.localParticipant.updateMediaStates(roomState.states);
|
|
15786
|
+
}
|
|
15569
15787
|
return this;
|
|
15570
15788
|
};
|
|
15571
15789
|
RoomV2.prototype._initPublisherHintSignaling = function () {
|
|
@@ -16129,7 +16347,7 @@ var DefaultBackoff = require('../../util/backoff');
|
|
|
16129
16347
|
var reconnectBackoffConfig = require('../../util/constants').reconnectBackoffConfig;
|
|
16130
16348
|
var Timeout = require('../../util/timeout');
|
|
16131
16349
|
var _a = require('../../util/constants'), SDK_NAME = _a.SDK_NAME, SDK_VERSION = _a.SDK_VERSION, SDP_FORMAT = _a.SDP_FORMAT;
|
|
16132
|
-
var _b = require('../../util'), createBandwidthProfilePayload = _b.createBandwidthProfilePayload, createMediaSignalingPayload = _b.createMediaSignalingPayload, createSubscribePayload = _b.createSubscribePayload, getUserAgent = _b.getUserAgent, isNonArrayObject = _b.isNonArrayObject;
|
|
16350
|
+
var _b = require('../../util'), createBandwidthProfilePayload = _b.createBandwidthProfilePayload, createMediaSignalingPayload = _b.createMediaSignalingPayload, createMediaWarningsPayload = _b.createMediaWarningsPayload, createSubscribePayload = _b.createSubscribePayload, getUserAgent = _b.getUserAgent, isNonArrayObject = _b.isNonArrayObject;
|
|
16133
16351
|
var _c = require('../../util/twilio-video-errors'), createTwilioError = _c.createTwilioError, RoomCompletedError = _c.RoomCompletedError, SignalingConnectionError = _c.SignalingConnectionError, SignalingServerBusyError = _c.SignalingServerBusyError;
|
|
16134
16352
|
var ICE_VERSION = 1;
|
|
16135
16353
|
var RSP_VERSION = 2;
|
|
@@ -16238,6 +16456,9 @@ var TwilioConnectionTransport = /** @class */ (function (_super) {
|
|
|
16238
16456
|
_networkQuality: {
|
|
16239
16457
|
value: isNonArrayObject(options.networkQuality) || options.networkQuality
|
|
16240
16458
|
},
|
|
16459
|
+
_notifyWarnings: {
|
|
16460
|
+
value: options.notifyWarnings
|
|
16461
|
+
},
|
|
16241
16462
|
_options: {
|
|
16242
16463
|
value: options
|
|
16243
16464
|
},
|
|
@@ -16322,6 +16543,9 @@ var TwilioConnectionTransport = /** @class */ (function (_super) {
|
|
|
16322
16543
|
if (this._bandwidthProfile) {
|
|
16323
16544
|
message.bandwidth_profile = createBandwidthProfilePayload(this._bandwidthProfile);
|
|
16324
16545
|
}
|
|
16546
|
+
if (this._notifyWarnings) {
|
|
16547
|
+
message.participant.media_warnings = createMediaWarningsPayload(this._notifyWarnings);
|
|
16548
|
+
}
|
|
16325
16549
|
message.media_signaling = createMediaSignalingPayload(this._dominantSpeaker, this._networkQuality, this._trackPriority, this._trackSwitchOff, this._adaptiveSimulcast, this._renderHints);
|
|
16326
16550
|
message.subscribe = createSubscribePayload(this._automaticSubscription);
|
|
16327
16551
|
message.format = SDP_FORMAT;
|
|
@@ -16592,6 +16816,7 @@ function setupTransport(transport) {
|
|
|
16592
16816
|
case 'connected':
|
|
16593
16817
|
case 'synced':
|
|
16594
16818
|
case 'update':
|
|
16819
|
+
case 'warning':
|
|
16595
16820
|
transport.emit('message', message);
|
|
16596
16821
|
return;
|
|
16597
16822
|
case 'disconnected':
|
|
@@ -17132,7 +17357,7 @@ function createUnreachableError(here, there) {
|
|
|
17132
17357
|
}
|
|
17133
17358
|
module.exports = StateMachine;
|
|
17134
17359
|
|
|
17135
|
-
},{"./util":128,"events":
|
|
17360
|
+
},{"./util":128,"events":170}],86:[function(require,module,exports){
|
|
17136
17361
|
/* eslint no-undefined:0 */
|
|
17137
17362
|
'use strict';
|
|
17138
17363
|
/**
|
|
@@ -18329,7 +18554,7 @@ function updateChrome(factory) {
|
|
|
18329
18554
|
}
|
|
18330
18555
|
module.exports = PeerConnectionReportFactory;
|
|
18331
18556
|
|
|
18332
|
-
},{"../webrtc/util":
|
|
18557
|
+
},{"../webrtc/util":167,"./icereportfactory":88,"./peerconnectionreport":102,"./receiverreportfactory":105,"./senderreportfactory":112}],104:[function(require,module,exports){
|
|
18333
18558
|
'use strict';
|
|
18334
18559
|
var __extends = (this && this.__extends) || (function () {
|
|
18335
18560
|
var extendStatics = function (d, b) {
|
|
@@ -19083,7 +19308,7 @@ var TrackTransceiver = /** @class */ (function (_super) {
|
|
|
19083
19308
|
*/
|
|
19084
19309
|
module.exports = TrackTransceiver;
|
|
19085
19310
|
|
|
19086
|
-
},{"events":
|
|
19311
|
+
},{"events":170}],117:[function(require,module,exports){
|
|
19087
19312
|
'use strict';
|
|
19088
19313
|
var __extends = (this && this.__extends) || (function () {
|
|
19089
19314
|
var extendStatics = function (d, b) {
|
|
@@ -19736,7 +19961,7 @@ TwilioConnection.CloseReason = CloseReason;
|
|
|
19736
19961
|
*/
|
|
19737
19962
|
module.exports = TwilioConnection;
|
|
19738
19963
|
|
|
19739
|
-
},{"./statemachine":85,"./util":128,"./util/log":132,"./util/networkmonitor":134,"./util/timeout":142,"ws":
|
|
19964
|
+
},{"./statemachine":85,"./util":128,"./util/log":132,"./util/networkmonitor":134,"./util/timeout":142,"ws":172}],118:[function(require,module,exports){
|
|
19740
19965
|
'use strict';
|
|
19741
19966
|
var defer = require('./').defer;
|
|
19742
19967
|
/**
|
|
@@ -20195,12 +20420,14 @@ module.exports.SDP_FORMAT = 'unified';
|
|
|
20195
20420
|
module.exports.hardwareDevicePublisheriPad = {
|
|
20196
20421
|
hwDeviceManufacturer: 'Apple',
|
|
20197
20422
|
hwDeviceModel: 'iPad',
|
|
20198
|
-
hwDeviceType: '
|
|
20423
|
+
hwDeviceType: 'tablet',
|
|
20424
|
+
platformName: 'iOS'
|
|
20199
20425
|
};
|
|
20200
20426
|
module.exports.hardwareDevicePublisheriPhone = {
|
|
20201
20427
|
hwDeviceManufacturer: 'Apple',
|
|
20202
20428
|
hwDeviceModel: 'iPhone',
|
|
20203
|
-
hwDeviceType: '
|
|
20429
|
+
hwDeviceType: 'mobile',
|
|
20430
|
+
platformName: 'iOS'
|
|
20204
20431
|
};
|
|
20205
20432
|
module.exports.DEFAULT_ENVIRONMENT = 'prod';
|
|
20206
20433
|
module.exports.DEFAULT_REALM = 'us1';
|
|
@@ -20285,7 +20512,7 @@ module.exports.videoContentPreferencesMode = {
|
|
|
20285
20512
|
MODE_MANUAL: 'manual'
|
|
20286
20513
|
};
|
|
20287
20514
|
|
|
20288
|
-
},{"../../package.json":
|
|
20515
|
+
},{"../../package.json":171}],123:[function(require,module,exports){
|
|
20289
20516
|
'use strict';
|
|
20290
20517
|
var detectSilence = require('../webaudio/detectsilence');
|
|
20291
20518
|
var N_ATTEMPTS = 3;
|
|
@@ -20326,7 +20553,7 @@ function detectSilentAudio(el) {
|
|
|
20326
20553
|
}
|
|
20327
20554
|
module.exports = detectSilentAudio;
|
|
20328
20555
|
|
|
20329
|
-
},{"../webaudio/audiocontext":
|
|
20556
|
+
},{"../webaudio/audiocontext":149,"../webaudio/detectsilence":150}],124:[function(require,module,exports){
|
|
20330
20557
|
'use strict';
|
|
20331
20558
|
// Cached copy of the <canvas> used to check silent video frames.
|
|
20332
20559
|
var canvas = null;
|
|
@@ -20605,7 +20832,7 @@ var EventObserver = /** @class */ (function (_super) {
|
|
|
20605
20832
|
*/
|
|
20606
20833
|
module.exports = EventObserver;
|
|
20607
20834
|
|
|
20608
|
-
},{"events":
|
|
20835
|
+
},{"events":170}],127:[function(require,module,exports){
|
|
20609
20836
|
'use strict';
|
|
20610
20837
|
var Filter = /** @class */ (function () {
|
|
20611
20838
|
function Filter(options) {
|
|
@@ -20691,6 +20918,7 @@ var constants = require('./constants');
|
|
|
20691
20918
|
var E = constants.typeErrors, trackPriority = constants.trackPriority;
|
|
20692
20919
|
var util = require('../webrtc/util');
|
|
20693
20920
|
var sessionSID = require('./sid').sessionSID;
|
|
20921
|
+
var TwilioWarning = require('./twiliowarning');
|
|
20694
20922
|
/**
|
|
20695
20923
|
* Return the given {@link LocalTrack} or a new {@link LocalTrack} for the
|
|
20696
20924
|
* given MediaStreamTrack.
|
|
@@ -21434,6 +21662,15 @@ function createSubscribePayload(automaticSubscription) {
|
|
|
21434
21662
|
revision: 1
|
|
21435
21663
|
};
|
|
21436
21664
|
}
|
|
21665
|
+
function createMediaWarningsPayload(notifyWarnings) {
|
|
21666
|
+
var _a;
|
|
21667
|
+
var mediaWarnings = (_a = {},
|
|
21668
|
+
_a[TwilioWarning.recordingMediaLost] = 'recordings',
|
|
21669
|
+
_a);
|
|
21670
|
+
return notifyWarnings
|
|
21671
|
+
.map(function (twilioWarningName) { return mediaWarnings[twilioWarningName]; })
|
|
21672
|
+
.filter(function (name) { return !!name; });
|
|
21673
|
+
}
|
|
21437
21674
|
/**
|
|
21438
21675
|
* Add random jitter to a given value in the range [-jitter, jitter].
|
|
21439
21676
|
* @private
|
|
@@ -21501,6 +21738,7 @@ function waitForEvent(eventTarget, event) {
|
|
|
21501
21738
|
exports.constants = constants;
|
|
21502
21739
|
exports.createBandwidthProfilePayload = createBandwidthProfilePayload;
|
|
21503
21740
|
exports.createMediaSignalingPayload = createMediaSignalingPayload;
|
|
21741
|
+
exports.createMediaWarningsPayload = createMediaWarningsPayload;
|
|
21504
21742
|
exports.createRoomConnectEventPayload = createRoomConnectEventPayload;
|
|
21505
21743
|
exports.createSubscribePayload = createSubscribePayload;
|
|
21506
21744
|
exports.asLocalTrack = asLocalTrack;
|
|
@@ -21535,7 +21773,7 @@ exports.isUserMediaTrack = isUserMediaTrack;
|
|
|
21535
21773
|
exports.waitForSometime = waitForSometime;
|
|
21536
21774
|
exports.waitForEvent = waitForEvent;
|
|
21537
21775
|
|
|
21538
|
-
},{"../webrtc/util":
|
|
21776
|
+
},{"../webrtc/util":167,"./constants":122,"./sid":140,"./twiliowarning":145}],129:[function(require,module,exports){
|
|
21539
21777
|
/* eslint-disable camelcase */
|
|
21540
21778
|
'use strict';
|
|
21541
21779
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -21830,7 +22068,7 @@ function reconnect(publisher, token, sdkName, sdkVersion, roomSid, participantSi
|
|
|
21830
22068
|
*/
|
|
21831
22069
|
module.exports = InsightsPublisher;
|
|
21832
22070
|
|
|
21833
|
-
},{"..":128,"../../util":128,"../browserdetection":120,"../constants":122,"events":
|
|
22071
|
+
},{"..":128,"../../util":128,"../browserdetection":120,"../constants":122,"events":170,"ws":172}],130:[function(require,module,exports){
|
|
21834
22072
|
// eslint-disable-next-line no-warning-comments
|
|
21835
22073
|
// TODO(mroberts): This should be described as implementing some
|
|
21836
22074
|
// InsightsPublisher interface.
|
|
@@ -22224,7 +22462,7 @@ function validateLogLevels(levels) {
|
|
|
22224
22462
|
}
|
|
22225
22463
|
module.exports = Log;
|
|
22226
22464
|
|
|
22227
|
-
},{"../vendor/loglevel":
|
|
22465
|
+
},{"../vendor/loglevel":148,"./constants":122}],133:[function(require,module,exports){
|
|
22228
22466
|
'use strict';
|
|
22229
22467
|
/**
|
|
22230
22468
|
* Calculates the moving average delta for the given pair ofsamples. A sample (S)
|
|
@@ -23154,7 +23392,7 @@ function addFmtpAttributeForRtxPt(mediaSection, rtxPt, pt) {
|
|
|
23154
23392
|
}
|
|
23155
23393
|
module.exports = workaround;
|
|
23156
23394
|
|
|
23157
|
-
},{"../../webrtc":
|
|
23395
|
+
},{"../../webrtc":154,"./":136}],138:[function(require,module,exports){
|
|
23158
23396
|
'use strict';
|
|
23159
23397
|
var __read = (this && this.__read) || function (o, n) {
|
|
23160
23398
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -23526,7 +23764,7 @@ function isSupported() {
|
|
|
23526
23764
|
}
|
|
23527
23765
|
module.exports = isSupported;
|
|
23528
23766
|
|
|
23529
|
-
},{"../webrtc/util":
|
|
23767
|
+
},{"../webrtc/util":167,"./browserdetection":120}],142:[function(require,module,exports){
|
|
23530
23768
|
'use strict';
|
|
23531
23769
|
/**
|
|
23532
23770
|
* A {@link Timeout} represents a resettable and clearable timeout.
|
|
@@ -24729,6 +24967,19 @@ module.exports = TwilioError;
|
|
|
24729
24967
|
|
|
24730
24968
|
},{}],145:[function(require,module,exports){
|
|
24731
24969
|
'use strict';
|
|
24970
|
+
/**
|
|
24971
|
+
* @private
|
|
24972
|
+
* Represents a warning encountered when
|
|
24973
|
+
* interacting with one of Twilio's services.
|
|
24974
|
+
*/
|
|
24975
|
+
// eslint-disable-next-line
|
|
24976
|
+
var TwilioWarning = {
|
|
24977
|
+
recordingMediaLost: 'recording-media-lost'
|
|
24978
|
+
};
|
|
24979
|
+
module.exports = TwilioWarning;
|
|
24980
|
+
|
|
24981
|
+
},{}],146:[function(require,module,exports){
|
|
24982
|
+
'use strict';
|
|
24732
24983
|
var isNonArrayObject = require('./').isNonArrayObject;
|
|
24733
24984
|
var _a = require('./constants'), E = _a.typeErrors, clientTrackSwitchOffControl = _a.clientTrackSwitchOffControl, videoContentPreferencesMode = _a.videoContentPreferencesMode, subscriptionMode = _a.subscriptionMode, trackPriority = _a.trackPriority, trackSwitchOffMode = _a.trackSwitchOffMode;
|
|
24734
24985
|
/**
|
|
@@ -24844,7 +25095,7 @@ exports.validateBandwidthProfile = validateBandwidthProfile;
|
|
|
24844
25095
|
exports.validateLocalTrack = validateLocalTrack;
|
|
24845
25096
|
exports.validateObject = validateObject;
|
|
24846
25097
|
|
|
24847
|
-
},{"./":128,"./constants":122}],
|
|
25098
|
+
},{"./":128,"./constants":122}],147:[function(require,module,exports){
|
|
24848
25099
|
/**
|
|
24849
25100
|
* Copyright (c) 2011-2022 Isaac Z. Schlueter
|
|
24850
25101
|
* Licensed under the ISC License.
|
|
@@ -24879,7 +25130,7 @@ module.exports = function inherits(ctor, superCtor) {
|
|
|
24879
25130
|
}
|
|
24880
25131
|
};
|
|
24881
25132
|
|
|
24882
|
-
},{}],
|
|
25133
|
+
},{}],148:[function(require,module,exports){
|
|
24883
25134
|
/**
|
|
24884
25135
|
* Copyright (c) 2013 Tim Perry
|
|
24885
25136
|
* Licensed under the MIT license.
|
|
@@ -25119,7 +25370,7 @@ defaultLogger.getLoggers = function getLoggers() {
|
|
|
25119
25370
|
defaultLogger['default'] = defaultLogger;
|
|
25120
25371
|
module.exports = defaultLogger;
|
|
25121
25372
|
|
|
25122
|
-
},{}],
|
|
25373
|
+
},{}],149:[function(require,module,exports){
|
|
25123
25374
|
/* globals webkitAudioContext, AudioContext */
|
|
25124
25375
|
'use strict';
|
|
25125
25376
|
var NativeAudioContext = typeof AudioContext !== 'undefined'
|
|
@@ -25202,7 +25453,7 @@ var AudioContextFactory = /** @class */ (function () {
|
|
|
25202
25453
|
}());
|
|
25203
25454
|
module.exports = new AudioContextFactory();
|
|
25204
25455
|
|
|
25205
|
-
},{}],
|
|
25456
|
+
},{}],150:[function(require,module,exports){
|
|
25206
25457
|
'use strict';
|
|
25207
25458
|
/**
|
|
25208
25459
|
* Return a Promise that resolves after `timeout` milliseconds.
|
|
@@ -25255,7 +25506,7 @@ function detectSilence(audioContext, stream, timeout) {
|
|
|
25255
25506
|
}
|
|
25256
25507
|
module.exports = detectSilence;
|
|
25257
25508
|
|
|
25258
|
-
},{}],
|
|
25509
|
+
},{}],151:[function(require,module,exports){
|
|
25259
25510
|
'use strict';
|
|
25260
25511
|
var detectSilence = require('./detectsilence');
|
|
25261
25512
|
/**
|
|
@@ -25325,7 +25576,7 @@ to get a new one, but we\'ve run out of retries; returning it anyway.');
|
|
|
25325
25576
|
}
|
|
25326
25577
|
module.exports = workaround;
|
|
25327
25578
|
|
|
25328
|
-
},{"./audiocontext":
|
|
25579
|
+
},{"./audiocontext":149,"./detectsilence":150}],152:[function(require,module,exports){
|
|
25329
25580
|
'use strict';
|
|
25330
25581
|
var flatMap = require('./util').flatMap;
|
|
25331
25582
|
var guessBrowser = require('./util').guessBrowser;
|
|
@@ -26119,7 +26370,7 @@ function standardizeFirefoxStats(response, isRemote) {
|
|
|
26119
26370
|
*/
|
|
26120
26371
|
module.exports = getStats;
|
|
26121
26372
|
|
|
26122
|
-
},{"./util":
|
|
26373
|
+
},{"./util":167,"./util/sdp":169}],153:[function(require,module,exports){
|
|
26123
26374
|
/* globals navigator */
|
|
26124
26375
|
'use strict';
|
|
26125
26376
|
/**
|
|
@@ -26143,7 +26394,7 @@ function getUserMedia(constraints) {
|
|
|
26143
26394
|
}
|
|
26144
26395
|
module.exports = getUserMedia;
|
|
26145
26396
|
|
|
26146
|
-
},{}],
|
|
26397
|
+
},{}],154:[function(require,module,exports){
|
|
26147
26398
|
'use strict';
|
|
26148
26399
|
var WebRTC = {};
|
|
26149
26400
|
Object.defineProperties(WebRTC, {
|
|
@@ -26178,7 +26429,7 @@ Object.defineProperties(WebRTC, {
|
|
|
26178
26429
|
});
|
|
26179
26430
|
module.exports = WebRTC;
|
|
26180
26431
|
|
|
26181
|
-
},{"./getstats":
|
|
26432
|
+
},{"./getstats":152,"./getusermedia":153,"./mediastream":155,"./mediastreamtrack":156,"./rtcicecandidate":157,"./rtcpeerconnection":160,"./rtcsessiondescription":165}],155:[function(require,module,exports){
|
|
26182
26433
|
/* globals MediaStream */
|
|
26183
26434
|
'use strict';
|
|
26184
26435
|
if (typeof MediaStream === 'function') {
|
|
@@ -26190,7 +26441,7 @@ else {
|
|
|
26190
26441
|
};
|
|
26191
26442
|
}
|
|
26192
26443
|
|
|
26193
|
-
},{}],
|
|
26444
|
+
},{}],156:[function(require,module,exports){
|
|
26194
26445
|
/* global MediaStreamTrack */
|
|
26195
26446
|
'use strict';
|
|
26196
26447
|
if (typeof MediaStreamTrack === 'function') {
|
|
@@ -26202,7 +26453,7 @@ else {
|
|
|
26202
26453
|
};
|
|
26203
26454
|
}
|
|
26204
26455
|
|
|
26205
|
-
},{}],
|
|
26456
|
+
},{}],157:[function(require,module,exports){
|
|
26206
26457
|
/* global RTCIceCandidate */
|
|
26207
26458
|
'use strict';
|
|
26208
26459
|
if (typeof RTCIceCandidate === 'function') {
|
|
@@ -26214,7 +26465,7 @@ else {
|
|
|
26214
26465
|
};
|
|
26215
26466
|
}
|
|
26216
26467
|
|
|
26217
|
-
},{}],
|
|
26468
|
+
},{}],158:[function(require,module,exports){
|
|
26218
26469
|
/* globals RTCDataChannel, RTCPeerConnection, RTCSessionDescription */
|
|
26219
26470
|
'use strict';
|
|
26220
26471
|
var ChromeRTCSessionDescription = require('../rtcsessiondescription/chrome');
|
|
@@ -26725,7 +26976,7 @@ function updateTrackIdsToSSRCs(sdpFormat, tracksToSSRCs, sdp) {
|
|
|
26725
26976
|
}
|
|
26726
26977
|
module.exports = ChromeRTCPeerConnection;
|
|
26727
26978
|
|
|
26728
|
-
},{"../../vendor/inherits":
|
|
26979
|
+
},{"../../vendor/inherits":147,"../mediastream":155,"../rtcrtpsender":162,"../rtcsessiondescription/chrome":163,"../util":167,"../util/eventtarget":166,"../util/latch":168,"../util/sdp":169}],159:[function(require,module,exports){
|
|
26729
26980
|
/* globals RTCPeerConnection */
|
|
26730
26981
|
'use strict';
|
|
26731
26982
|
var EventTarget = require('../util/eventtarget');
|
|
@@ -27020,7 +27271,7 @@ function overwriteWithInitiallyNegotiatedDtlsRole(description, dtlsRole) {
|
|
|
27020
27271
|
}
|
|
27021
27272
|
module.exports = FirefoxRTCPeerConnection;
|
|
27022
27273
|
|
|
27023
|
-
},{"../../vendor/inherits":
|
|
27274
|
+
},{"../../vendor/inherits":147,"../rtcsessiondescription/firefox":164,"../util":167,"../util/eventtarget":166,"../util/sdp":169}],160:[function(require,module,exports){
|
|
27024
27275
|
'use strict';
|
|
27025
27276
|
if (typeof RTCPeerConnection === 'function') {
|
|
27026
27277
|
var guessBrowser = require('../util').guessBrowser;
|
|
@@ -27045,7 +27296,7 @@ else {
|
|
|
27045
27296
|
};
|
|
27046
27297
|
}
|
|
27047
27298
|
|
|
27048
|
-
},{"../util":
|
|
27299
|
+
},{"../util":167,"./chrome":158,"./firefox":159,"./safari":161}],161:[function(require,module,exports){
|
|
27049
27300
|
/* globals RTCPeerConnection, RTCSessionDescription */
|
|
27050
27301
|
'use strict';
|
|
27051
27302
|
var EventTarget = require('../util/eventtarget');
|
|
@@ -27394,7 +27645,7 @@ function shimDataChannel(dataChannel) {
|
|
|
27394
27645
|
}
|
|
27395
27646
|
module.exports = SafariRTCPeerConnection;
|
|
27396
27647
|
|
|
27397
|
-
},{"../../vendor/inherits":
|
|
27648
|
+
},{"../../vendor/inherits":147,"../util":167,"../util/eventtarget":166,"../util/latch":168,"../util/sdp":169}],162:[function(require,module,exports){
|
|
27398
27649
|
'use strict';
|
|
27399
27650
|
/**
|
|
27400
27651
|
* RTCRtpSender shim.
|
|
@@ -27432,7 +27683,7 @@ function RTCRtpSenderShim(track) {
|
|
|
27432
27683
|
// using the RTCRtpSender APIs.
|
|
27433
27684
|
module.exports = RTCRtpSenderShim;
|
|
27434
27685
|
|
|
27435
|
-
},{}],
|
|
27686
|
+
},{}],163:[function(require,module,exports){
|
|
27436
27687
|
/* globals RTCSessionDescription */
|
|
27437
27688
|
'use strict';
|
|
27438
27689
|
// This class wraps Chrome's RTCSessionDescription implementation. It provides
|
|
@@ -27469,12 +27720,12 @@ function ChromeRTCSessionDescription(descriptionInitDict) {
|
|
|
27469
27720
|
}
|
|
27470
27721
|
module.exports = ChromeRTCSessionDescription;
|
|
27471
27722
|
|
|
27472
|
-
},{}],
|
|
27723
|
+
},{}],164:[function(require,module,exports){
|
|
27473
27724
|
/* globals RTCSessionDescription */
|
|
27474
27725
|
'use strict';
|
|
27475
27726
|
module.exports = RTCSessionDescription;
|
|
27476
27727
|
|
|
27477
|
-
},{}],
|
|
27728
|
+
},{}],165:[function(require,module,exports){
|
|
27478
27729
|
/* globals RTCSessionDescription */
|
|
27479
27730
|
'use strict';
|
|
27480
27731
|
if (typeof RTCSessionDescription === 'function') {
|
|
@@ -27497,7 +27748,7 @@ else {
|
|
|
27497
27748
|
};
|
|
27498
27749
|
}
|
|
27499
27750
|
|
|
27500
|
-
},{"../util":
|
|
27751
|
+
},{"../util":167,"./chrome":163,"./firefox":164}],166:[function(require,module,exports){
|
|
27501
27752
|
'use strict';
|
|
27502
27753
|
var EventEmitter = require('events').EventEmitter;
|
|
27503
27754
|
/**
|
|
@@ -27532,7 +27783,7 @@ EventTarget.prototype.removeEventListener = function removeEventListener() {
|
|
|
27532
27783
|
};
|
|
27533
27784
|
module.exports = EventTarget;
|
|
27534
27785
|
|
|
27535
|
-
},{"events":
|
|
27786
|
+
},{"events":170}],167:[function(require,module,exports){
|
|
27536
27787
|
'use strict';
|
|
27537
27788
|
/**
|
|
27538
27789
|
* Create a {@link Deferred}.
|
|
@@ -27841,7 +28092,7 @@ exports.makeUUID = makeUUID;
|
|
|
27841
28092
|
exports.proxyProperties = proxyProperties;
|
|
27842
28093
|
exports.support = support;
|
|
27843
28094
|
|
|
27844
|
-
},{}],
|
|
28095
|
+
},{}],168:[function(require,module,exports){
|
|
27845
28096
|
'use strict';
|
|
27846
28097
|
var defer = require('./').defer;
|
|
27847
28098
|
var states = {
|
|
@@ -27947,7 +28198,7 @@ function createUnreachableStateError(from, to) {
|
|
|
27947
28198
|
}
|
|
27948
28199
|
module.exports = Latch;
|
|
27949
28200
|
|
|
27950
|
-
},{"./":
|
|
28201
|
+
},{"./":167}],169:[function(require,module,exports){
|
|
27951
28202
|
/* globals RTCPeerConnection, RTCRtpTransceiver */
|
|
27952
28203
|
'use strict';
|
|
27953
28204
|
var flatMap = require('./').flatMap;
|
|
@@ -28232,7 +28483,7 @@ exports.getUnifiedPlanSSRCs = getUnifiedPlanSSRCs;
|
|
|
28232
28483
|
exports.updatePlanBTrackIdsToSSRCs = updatePlanBTrackIdsToSSRCs;
|
|
28233
28484
|
exports.updateUnifiedPlanTrackIdsToSSRCs = updateUnifiedPlanTrackIdsToSSRCs;
|
|
28234
28485
|
|
|
28235
|
-
},{"./":
|
|
28486
|
+
},{"./":167}],170:[function(require,module,exports){
|
|
28236
28487
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
28237
28488
|
//
|
|
28238
28489
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -28731,12 +28982,12 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
|
|
28731
28982
|
}
|
|
28732
28983
|
}
|
|
28733
28984
|
|
|
28734
|
-
},{}],
|
|
28985
|
+
},{}],171:[function(require,module,exports){
|
|
28735
28986
|
module.exports={
|
|
28736
28987
|
"name": "twilio-video",
|
|
28737
28988
|
"title": "Twilio Video",
|
|
28738
28989
|
"description": "Twilio Video JavaScript Library",
|
|
28739
|
-
"version": "2.
|
|
28990
|
+
"version": "2.22.1",
|
|
28740
28991
|
"homepage": "https://twilio.com",
|
|
28741
28992
|
"author": "Mark Andrus Roberts <mroberts@twilio.com>",
|
|
28742
28993
|
"contributors": [
|
|
@@ -28769,7 +29020,7 @@ module.exports={
|
|
|
28769
29020
|
"babel-cli": "^6.26.0",
|
|
28770
29021
|
"babel-preset-es2015": "^6.24.1",
|
|
28771
29022
|
"browserify": "^17.0.0",
|
|
28772
|
-
"cheerio": "^
|
|
29023
|
+
"cheerio": "^0.22.0",
|
|
28773
29024
|
"cors": "^2.8.5",
|
|
28774
29025
|
"electron": "^17.2.0",
|
|
28775
29026
|
"envify": "^4.0.0",
|
|
@@ -28781,13 +29032,13 @@ module.exports={
|
|
|
28781
29032
|
"eslint-plugin-standard": "^4.0.1",
|
|
28782
29033
|
"express": "^4.16.2",
|
|
28783
29034
|
"glob": "^7.1.7",
|
|
28784
|
-
"ink-docstrap": "^
|
|
29035
|
+
"ink-docstrap": "^1.3.2",
|
|
28785
29036
|
"inquirer": "^7.0.0",
|
|
28786
29037
|
"is-docker": "^2.0.0",
|
|
28787
29038
|
"jsdoc": "^3.5.5",
|
|
28788
29039
|
"jsdoc-babel": "^0.5.0",
|
|
28789
29040
|
"json-loader": "^0.5.7",
|
|
28790
|
-
"karma": "^
|
|
29041
|
+
"karma": "^5.0.2",
|
|
28791
29042
|
"karma-browserify": "^8.0.0",
|
|
28792
29043
|
"karma-chrome-launcher": "^2.0.0",
|
|
28793
29044
|
"karma-edgium-launcher": "^4.0.0-0",
|
|
@@ -28795,7 +29046,7 @@ module.exports={
|
|
|
28795
29046
|
"karma-firefox-launcher": "^1.3.0",
|
|
28796
29047
|
"karma-htmlfile-reporter": "^0.3.8",
|
|
28797
29048
|
"karma-junit-reporter": "^1.2.0",
|
|
28798
|
-
"karma-mocha": "^
|
|
29049
|
+
"karma-mocha": "^1.3.0",
|
|
28799
29050
|
"karma-safari-launcher": "^1.0.0",
|
|
28800
29051
|
"karma-spec-reporter": "0.0.32",
|
|
28801
29052
|
"karma-typescript": "^5.5.1",
|
|
@@ -28808,7 +29059,7 @@ module.exports={
|
|
|
28808
29059
|
"nyc": "^15.1.0",
|
|
28809
29060
|
"requirejs": "^2.3.3",
|
|
28810
29061
|
"rimraf": "^2.6.1",
|
|
28811
|
-
"simple-git": "^
|
|
29062
|
+
"simple-git": "^1.126.0",
|
|
28812
29063
|
"sinon": "^4.0.1",
|
|
28813
29064
|
"ts-node": "4.0.1",
|
|
28814
29065
|
"tslint": "5.8.0",
|
|
@@ -28816,9 +29067,9 @@ module.exports={
|
|
|
28816
29067
|
"twilio-release-tool": "^1.0.2",
|
|
28817
29068
|
"typescript": "4.2.2",
|
|
28818
29069
|
"uglify-js": "^2.8.22",
|
|
28819
|
-
"vinyl-fs": "^2.4.
|
|
29070
|
+
"vinyl-fs": "^2.4.4",
|
|
28820
29071
|
"vinyl-source-stream": "^1.1.0",
|
|
28821
|
-
"watchify": "^
|
|
29072
|
+
"watchify": "^3.11.1",
|
|
28822
29073
|
"webrtc-adapter": "^7.7.1"
|
|
28823
29074
|
},
|
|
28824
29075
|
"engines": {
|
|
@@ -28833,6 +29084,7 @@ module.exports={
|
|
|
28833
29084
|
"lint": "npm-run-all lint:js lint:ts",
|
|
28834
29085
|
"printVersion": "node --version && npm --version",
|
|
28835
29086
|
"test:unit": "npm-run-all printVersion build:es5 && nyc --report-dir=./coverage --include=lib/**/* --reporter=html --reporter=lcov --reporter=text mocha -r ts-node/register ./test/unit/*",
|
|
29087
|
+
"test:unit:quick": "nyc --report-dir=./coverage --include=lib/**/* --reporter=html --reporter=lcov mocha -r ts-node/register",
|
|
28836
29088
|
"test:serversiderender": "mocha ./test/serversiderender/index.js",
|
|
28837
29089
|
"test:integration:adapter": "node ./scripts/karma.js karma/integration.adapter.conf.js",
|
|
28838
29090
|
"test:integration": "npm run build:es5 && node ./scripts/karma.js karma/integration.conf.js",
|
|
@@ -28889,7 +29141,7 @@ module.exports={
|
|
|
28889
29141
|
}
|
|
28890
29142
|
}
|
|
28891
29143
|
|
|
28892
|
-
},{}],
|
|
29144
|
+
},{}],172:[function(require,module,exports){
|
|
28893
29145
|
module.exports = WebSocket;
|
|
28894
29146
|
|
|
28895
29147
|
},{}]},{},[11]);
|