twilio-video 2.27.0 → 2.28.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 +18 -0
- package/COMMON_ISSUES.md +12 -0
- package/README.md +1 -1
- package/dist/twilio-video.js +50 -25
- package/dist/twilio-video.min.js +20 -20
- package/es5/localparticipant.js +3 -1
- package/es5/localparticipant.js.map +1 -1
- package/es5/media/track/localaudiotrack.js +24 -0
- package/es5/media/track/localaudiotrack.js.map +1 -1
- package/es5/media/track/localmediatrack.js +17 -7
- package/es5/media/track/localmediatrack.js.map +1 -1
- package/es5/media/track/localvideotrack.js +0 -2
- package/es5/media/track/localvideotrack.js.map +1 -1
- package/es5/util/index.js +0 -11
- package/es5/util/index.js.map +1 -1
- package/lib/localparticipant.js +3 -1
- package/lib/media/track/localaudiotrack.js +27 -1
- package/lib/media/track/localmediatrack.js +24 -9
- package/lib/media/track/localvideotrack.js +0 -2
- package/lib/util/index.js +0 -13
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@ The Twilio Programmable Video SDKs use [Semantic Versioning](http://www.semver.o
|
|
|
2
2
|
|
|
3
3
|
**Version 1.x reached End of Life on September 8th, 2021.** See the changelog entry [here](https://www.twilio.com/changelog/end-of-life-complete-for-unsupported-versions-of-the-programmable-video-sdk). Support for the 1.x version ended on December 4th, 2020.
|
|
4
4
|
|
|
5
|
+
2.28.1 (October 3, 2023)
|
|
6
|
+
========================
|
|
7
|
+
|
|
8
|
+
Bug Fixes
|
|
9
|
+
---------
|
|
10
|
+
|
|
11
|
+
- Previously, a Chrome iOS 17 Participant's local audio (Krisp noise cancellation enabled) did not recover after foregrounding the browser following the playing of a YouTube video (or some other application which requires microphone permissions). We work around this by permanently disabling the Krisp noise cancellation upon foregrounding the browser. (VIDEO-13006)
|
|
12
|
+
|
|
13
|
+
2.28.0 (September 14, 2023)
|
|
14
|
+
===========================
|
|
15
|
+
|
|
16
|
+
Bug Fixes
|
|
17
|
+
---------
|
|
18
|
+
|
|
19
|
+
- Fixed a bug where a Chrome iOS 17 Participant's local and remote media (Krisp Noise Cancellation enabled) failed to recover after interacting with a PSTN call in full-screen mode. (VIDEO-13011)
|
|
20
|
+
- Fixed a bug where a Chrome iOS 17 Participant's audio with Krisp Noise Cancellation did not recover after interacting with a system popup. (VIDEO-13012)
|
|
21
|
+
- Fixed a bug where a Chrome iOS 17 Participant's audio with Krisp Noise Cancellation did not recover after invoking Siri. (VIDEO-13013)
|
|
22
|
+
|
|
5
23
|
2.27.0 (March 21, 2023)
|
|
6
24
|
=======================
|
|
7
25
|
|
package/COMMON_ISSUES.md
CHANGED
|
@@ -33,6 +33,12 @@ before opening a new issue. We recommend regularly upgrading to the latest versi
|
|
|
33
33
|
|
|
34
34
|
### Chrome mobile
|
|
35
35
|
<details>
|
|
36
|
+
<summary>iOS 17: Media issues</summary>
|
|
37
|
+
<p>
|
|
38
|
+
Please refer to this [GitHub Issue](https://github.com/twilio/twilio-video.js/issues/2023) for details.
|
|
39
|
+
</p>
|
|
40
|
+
</details>
|
|
41
|
+
<details>
|
|
36
42
|
<summary>Android 11: Participants are unable to connect to a room due to ICE gathering failures on certain devices</summary>
|
|
37
43
|
<p>
|
|
38
44
|
|
|
@@ -93,6 +99,12 @@ transform: scaleX(-1)
|
|
|
93
99
|
|
|
94
100
|
### Safari mobile
|
|
95
101
|
<details>
|
|
102
|
+
<summary>iOS 17: Media issues</summary>
|
|
103
|
+
<p>
|
|
104
|
+
Please refer to this [GitHub Issue](https://github.com/twilio/twilio-video.js/issues/2023) for details.
|
|
105
|
+
</p>
|
|
106
|
+
</details>
|
|
107
|
+
<details>
|
|
96
108
|
<summary>iOS 15: Echo issues on iOS 15 devices after attaching video tracks</summary>
|
|
97
109
|
<p>
|
|
98
110
|
|
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ Releases of twilio-video.js are hosted on a CDN, and you can include these
|
|
|
74
74
|
directly in your web app using a <script> tag.
|
|
75
75
|
|
|
76
76
|
```html
|
|
77
|
-
<script src="//sdk.twilio.com/js/video/releases/2.
|
|
77
|
+
<script src="//sdk.twilio.com/js/video/releases/2.28.1/twilio-video.min.js"></script>
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
Using this method, twilio-video.js will set a browser global:
|
package/dist/twilio-video.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! twilio-video.js 2.
|
|
1
|
+
/*! twilio-video.js 2.28.1
|
|
2
2
|
|
|
3
3
|
The following license applies to all parts of this software except as
|
|
4
4
|
documented below.
|
|
@@ -2627,7 +2627,9 @@ var LocalParticipant = /** @class */ (function (_super) {
|
|
|
2627
2627
|
* @event LocalParticipant#trackPublicationFailed
|
|
2628
2628
|
*/
|
|
2629
2629
|
/**
|
|
2630
|
-
* A {@link LocalTrack} was successfully published.
|
|
2630
|
+
* A {@link LocalTrack} that was added using {@link LocalParticipant#publishTrack} was successfully published. This event
|
|
2631
|
+
* is not raised for {@link LocalTrack}s added in {@link ConnectOptions}<code>.tracks</code> or auto-created within
|
|
2632
|
+
* <a href="module-twilio-video.html#.connect__anchor"><code>{@link connect}</code></a>.
|
|
2631
2633
|
* @param {LocalTrackPublication} publication - The resulting
|
|
2632
2634
|
* {@link LocalTrackPublication} for the published {@link LocalTrack}
|
|
2633
2635
|
* @event LocalParticipant#trackPublished
|
|
@@ -3042,6 +3044,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3042
3044
|
};
|
|
3043
3045
|
})();
|
|
3044
3046
|
var isIOS = require('../../util/browserdetection').isIOS;
|
|
3047
|
+
var detectSilentAudio = require('../../util/detectsilentaudio');
|
|
3048
|
+
var isIOSChrome = require('../../webrtc/util').isIOSChrome;
|
|
3045
3049
|
var AudioTrack = require('./audiotrack');
|
|
3046
3050
|
var mixinLocalMediaTrack = require('./localmediatrack');
|
|
3047
3051
|
var LocalMediaAudioTrack = mixinLocalMediaTrack(AudioTrack);
|
|
@@ -3224,6 +3228,28 @@ var LocalAudioTrack = /** @class */ (function (_super) {
|
|
|
3224
3228
|
_this._maybeRestartOnDefaultDeviceChange();
|
|
3225
3229
|
});
|
|
3226
3230
|
};
|
|
3231
|
+
/**
|
|
3232
|
+
* NOTE(mmalavalli): On iOS 17 Chrome, a LocalAudioTrack with Krisp Noise Cancellation
|
|
3233
|
+
* enabled that is restarted due to foregrounding the browser is silent for as-of-yet
|
|
3234
|
+
* unknown reason. We work around this by discarding the Krisp MediaStreamTrack and using
|
|
3235
|
+
* the source MediaStreamTrack. (VIDEO-13006)
|
|
3236
|
+
* @private
|
|
3237
|
+
*/
|
|
3238
|
+
LocalAudioTrack.prototype._setMediaStreamTrack = function (mediaStreamTrack) {
|
|
3239
|
+
var _this = this;
|
|
3240
|
+
var _a = this, log = _a._log, noiseCancellation = _a.noiseCancellation;
|
|
3241
|
+
var promise = _super.prototype._setMediaStreamTrack.call(this, mediaStreamTrack);
|
|
3242
|
+
if (isIOSChrome() && !!noiseCancellation) {
|
|
3243
|
+
log.debug('iOS Chrome detected, checking if the restarted Krisp audio is silent');
|
|
3244
|
+
promise = promise.then(function () { return detectSilentAudio(_this._dummyEl); }).then(function (isSilent) {
|
|
3245
|
+
log.debug("Krisp audio is " + (isSilent ? 'silent, using source audio' : 'not silent'));
|
|
3246
|
+
return isSilent && noiseCancellation.disablePermanently().then(function () {
|
|
3247
|
+
return _super.prototype._setMediaStreamTrack.call(_this, noiseCancellation.sourceTrack);
|
|
3248
|
+
});
|
|
3249
|
+
});
|
|
3250
|
+
}
|
|
3251
|
+
return promise;
|
|
3252
|
+
};
|
|
3227
3253
|
/**
|
|
3228
3254
|
* Disable the {@link LocalAudioTrack}. This is equivalent to muting the audio source.
|
|
3229
3255
|
* @returns {this}
|
|
@@ -3343,7 +3369,7 @@ var LocalAudioTrack = /** @class */ (function (_super) {
|
|
|
3343
3369
|
*/
|
|
3344
3370
|
module.exports = LocalAudioTrack;
|
|
3345
3371
|
|
|
3346
|
-
},{"../../util/browserdetection":123,"./audiotrack":14,"./localmediatrack":24}],21:[function(require,module,exports){
|
|
3372
|
+
},{"../../util/browserdetection":123,"../../util/detectsilentaudio":126,"../../webrtc/util":170,"./audiotrack":14,"./localmediatrack":24}],21:[function(require,module,exports){
|
|
3347
3373
|
'use strict';
|
|
3348
3374
|
var __extends = (this && this.__extends) || (function () {
|
|
3349
3375
|
var extendStatics = function (d, b) {
|
|
@@ -3593,7 +3619,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3593
3619
|
})();
|
|
3594
3620
|
var getUserMedia = require('../../webrtc').getUserMedia;
|
|
3595
3621
|
var isIOS = require('../../util/browserdetection').isIOS;
|
|
3596
|
-
var _a = require('../../util'), capitalize = _a.capitalize, defer = _a.defer,
|
|
3622
|
+
var _a = require('../../util'), capitalize = _a.capitalize, defer = _a.defer, waitForSometime = _a.waitForSometime, waitForEvent = _a.waitForEvent;
|
|
3597
3623
|
var ILLEGAL_INVOKE = require('../../util/constants').typeErrors.ILLEGAL_INVOKE;
|
|
3598
3624
|
var detectSilentAudio = require('../../util/detectsilentaudio');
|
|
3599
3625
|
var detectSilentVideo = require('../../util/detectsilentvideo');
|
|
@@ -3622,7 +3648,6 @@ function mixinLocalMediaTrack(AudioOrVideoTrack) {
|
|
|
3622
3648
|
function LocalMediaTrack(mediaStreamTrack, options) {
|
|
3623
3649
|
var _this = this;
|
|
3624
3650
|
var workaroundWebKitBug1208516 = isIOS()
|
|
3625
|
-
&& isUserMediaTrack(mediaStreamTrack)
|
|
3626
3651
|
&& typeof document === 'object'
|
|
3627
3652
|
&& typeof document.addEventListener === 'function'
|
|
3628
3653
|
&& typeof document.visibilityState === 'string';
|
|
@@ -3668,6 +3693,9 @@ function mixinLocalMediaTrack(AudioOrVideoTrack) {
|
|
|
3668
3693
|
_isCreatedByCreateLocalTracks: {
|
|
3669
3694
|
value: options.isCreatedByCreateLocalTracks
|
|
3670
3695
|
},
|
|
3696
|
+
_noiseCancellation: {
|
|
3697
|
+
value: options.noiseCancellation || null
|
|
3698
|
+
},
|
|
3671
3699
|
_trackSender: {
|
|
3672
3700
|
value: mediaTrackSender
|
|
3673
3701
|
},
|
|
@@ -3856,9 +3884,16 @@ function mixinLocalMediaTrack(AudioOrVideoTrack) {
|
|
|
3856
3884
|
* @returns {function} Clean up listeners attached by the workaround
|
|
3857
3885
|
*/
|
|
3858
3886
|
function restartWhenInadvertentlyStopped(localMediaTrack) {
|
|
3859
|
-
var log = localMediaTrack._log, kind = localMediaTrack.kind;
|
|
3860
|
-
var detectSilence = {
|
|
3861
|
-
|
|
3887
|
+
var log = localMediaTrack._log, kind = localMediaTrack.kind, noiseCancellation = localMediaTrack._noiseCancellation;
|
|
3888
|
+
var detectSilence = {
|
|
3889
|
+
audio: detectSilentAudio,
|
|
3890
|
+
video: detectSilentVideo
|
|
3891
|
+
}[kind];
|
|
3892
|
+
var getSourceMediaStreamTrack = function () { return noiseCancellation
|
|
3893
|
+
? noiseCancellation.sourceTrack
|
|
3894
|
+
: localMediaTrack.mediaStreamTrack; };
|
|
3895
|
+
var el = localMediaTrack._dummyEl;
|
|
3896
|
+
var mediaStreamTrack = getSourceMediaStreamTrack();
|
|
3862
3897
|
var trackChangeInProgress = null;
|
|
3863
3898
|
function checkSilence() {
|
|
3864
3899
|
// The dummy element is paused, so play it and then detect silence.
|
|
@@ -3880,8 +3915,9 @@ function restartWhenInadvertentlyStopped(localMediaTrack) {
|
|
|
3880
3915
|
});
|
|
3881
3916
|
}
|
|
3882
3917
|
function shouldReacquireTrack() {
|
|
3883
|
-
var _workaroundWebKitBug1208516Cleanup = localMediaTrack._workaroundWebKitBug1208516Cleanup, isStopped = localMediaTrack.isStopped
|
|
3918
|
+
var _workaroundWebKitBug1208516Cleanup = localMediaTrack._workaroundWebKitBug1208516Cleanup, isStopped = localMediaTrack.isStopped;
|
|
3884
3919
|
var isInadvertentlyStopped = isStopped && !!_workaroundWebKitBug1208516Cleanup;
|
|
3920
|
+
var muted = getSourceMediaStreamTrack().muted;
|
|
3885
3921
|
// NOTE(mmalavalli): Restart the LocalMediaTrack if:
|
|
3886
3922
|
// 1. The app is foregrounded, and
|
|
3887
3923
|
// 2. A restart is not already in progress, and
|
|
@@ -3902,7 +3938,7 @@ function restartWhenInadvertentlyStopped(localMediaTrack) {
|
|
|
3902
3938
|
localMediaTrack._restart().finally(function () {
|
|
3903
3939
|
el = localMediaTrack._dummyEl;
|
|
3904
3940
|
removeMediaStreamTrackListeners();
|
|
3905
|
-
mediaStreamTrack =
|
|
3941
|
+
mediaStreamTrack = getSourceMediaStreamTrack();
|
|
3906
3942
|
addMediaStreamTrackListeners();
|
|
3907
3943
|
trackChangeInProgress.resolve();
|
|
3908
3944
|
trackChangeInProgress = null;
|
|
@@ -4146,7 +4182,6 @@ var isIOS = require('../../util/browserdetection').isIOS;
|
|
|
4146
4182
|
var detectSilentVideo = require('../../util/detectsilentvideo');
|
|
4147
4183
|
var mixinLocalMediaTrack = require('./localmediatrack');
|
|
4148
4184
|
var VideoTrack = require('./videotrack');
|
|
4149
|
-
var isUserMediaTrack = require('../../util').isUserMediaTrack;
|
|
4150
4185
|
var LocalMediaVideoTrack = mixinLocalMediaTrack(VideoTrack);
|
|
4151
4186
|
/**
|
|
4152
4187
|
* A {@link LocalVideoTrack} is a {@link VideoTrack} representing video that
|
|
@@ -4180,7 +4215,6 @@ var LocalVideoTrack = /** @class */ (function (_super) {
|
|
|
4180
4215
|
var _this = this;
|
|
4181
4216
|
options = Object.assign({
|
|
4182
4217
|
workaroundSilentLocalVideo: isIOS()
|
|
4183
|
-
&& isUserMediaTrack(mediaStreamTrack)
|
|
4184
4218
|
&& typeof document !== 'undefined'
|
|
4185
4219
|
&& typeof document.createElement === 'function'
|
|
4186
4220
|
}, options);
|
|
@@ -4494,7 +4528,7 @@ function workaroundSilentLocalVideo(localVideoTrack, doc) {
|
|
|
4494
4528
|
*/
|
|
4495
4529
|
module.exports = LocalVideoTrack;
|
|
4496
4530
|
|
|
4497
|
-
},{"../../util
|
|
4531
|
+
},{"../../util/browserdetection":123,"../../util/detectsilentvideo":127,"./localmediatrack":24,"./videotrack":43}],27:[function(require,module,exports){
|
|
4498
4532
|
'use strict';
|
|
4499
4533
|
var __extends = (this && this.__extends) || (function () {
|
|
4500
4534
|
var extendStatics = function (d, b) {
|
|
@@ -22664,16 +22698,6 @@ function isChromeScreenShareTrack(track) {
|
|
|
22664
22698
|
// we will check for label that starts with "screen:D" where D being a digit.
|
|
22665
22699
|
return util.guessBrowser() === 'chrome' && track.kind === 'video' && 'displaySurface' in track.getSettings();
|
|
22666
22700
|
}
|
|
22667
|
-
/**
|
|
22668
|
-
* returns true if given MediaStreamTrack is a user media track
|
|
22669
|
-
* @private
|
|
22670
|
-
* @param {MediaStreamTrack} track
|
|
22671
|
-
* @returns {boolean}
|
|
22672
|
-
*/
|
|
22673
|
-
function isUserMediaTrack(track) {
|
|
22674
|
-
// NOTE(mpatwardhan): tracks obtained from getUserMedia have a deviceId in its settings.
|
|
22675
|
-
return typeof track.getSettings().deviceId === 'string';
|
|
22676
|
-
}
|
|
22677
22701
|
/**
|
|
22678
22702
|
* Returns a promise that resolve after timeoutMS have passed.
|
|
22679
22703
|
* @param {number} timeoutMS - time to wait in milliseconds.
|
|
@@ -22729,7 +22753,6 @@ exports.trackPublicationClass = trackPublicationClass;
|
|
|
22729
22753
|
exports.valueToJSON = valueToJSON;
|
|
22730
22754
|
exports.withJitter = withJitter;
|
|
22731
22755
|
exports.isChromeScreenShareTrack = isChromeScreenShareTrack;
|
|
22732
|
-
exports.isUserMediaTrack = isUserMediaTrack;
|
|
22733
22756
|
exports.waitForSometime = waitForSometime;
|
|
22734
22757
|
exports.waitForEvent = waitForEvent;
|
|
22735
22758
|
|
|
@@ -30152,7 +30175,7 @@ module.exports={
|
|
|
30152
30175
|
"name": "twilio-video",
|
|
30153
30176
|
"title": "Twilio Video",
|
|
30154
30177
|
"description": "Twilio Video JavaScript Library",
|
|
30155
|
-
"version": "2.
|
|
30178
|
+
"version": "2.28.1",
|
|
30156
30179
|
"homepage": "https://twilio.com",
|
|
30157
30180
|
"author": "Mark Andrus Roberts <mroberts@twilio.com>",
|
|
30158
30181
|
"contributors": [
|
|
@@ -30174,6 +30197,8 @@ module.exports={
|
|
|
30174
30197
|
},
|
|
30175
30198
|
"devDependencies": {
|
|
30176
30199
|
"@babel/core": "^7.14.2",
|
|
30200
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
30201
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
30177
30202
|
"@babel/preset-env": "^7.14.2",
|
|
30178
30203
|
"@babel/preset-typescript": "^7.13.0",
|
|
30179
30204
|
"@types/express": "^4.11.0",
|