twilio-video 2.22.2 → 3.0.0-preview.2
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 +106 -1
- package/README.md +1 -1
- package/dist/twilio-video.js +1751 -564
- package/dist/twilio-video.min.js +21 -20
- package/es5/connect.js +75 -13
- package/es5/connect.js.map +1 -1
- package/es5/createlocaltracks.js +0 -1
- package/es5/createlocaltracks.js.map +1 -1
- package/es5/localparticipant.js +20 -10
- package/es5/localparticipant.js.map +1 -1
- package/es5/media/track/audiotrack.js +6 -15
- package/es5/media/track/audiotrack.js.map +1 -1
- package/es5/media/track/index.js +2 -4
- package/es5/media/track/index.js.map +1 -1
- package/es5/media/track/localdatatrack.js +4 -1
- package/es5/media/track/localdatatrack.js.map +1 -1
- package/es5/media/track/localmediatrack.js +1 -0
- package/es5/media/track/localmediatrack.js.map +1 -1
- package/es5/media/track/mediatrack.js +63 -49
- package/es5/media/track/mediatrack.js.map +1 -1
- package/es5/media/track/receiver.js +3 -2
- package/es5/media/track/receiver.js.map +1 -1
- package/es5/media/track/remoteaudiotrack.js +27 -9
- package/es5/media/track/remoteaudiotrack.js.map +1 -1
- package/es5/media/track/remoteaudiotrackpublication.js +28 -2
- package/es5/media/track/remoteaudiotrackpublication.js.map +1 -1
- package/es5/media/track/remotedatatrack.js +1 -1
- package/es5/media/track/remotedatatrack.js.map +1 -1
- package/es5/media/track/remotemediatrack.js +93 -24
- package/es5/media/track/remotemediatrack.js.map +1 -1
- package/es5/media/track/remotetrackpublication.js +87 -15
- package/es5/media/track/remotetrackpublication.js.map +1 -1
- package/es5/media/track/remotevideotrack.js +39 -11
- package/es5/media/track/remotevideotrack.js.map +1 -1
- package/es5/media/track/remotevideotrackpublication.js +28 -2
- package/es5/media/track/remotevideotrackpublication.js.map +1 -1
- package/es5/media/track/sender.js +1 -1
- package/es5/media/track/sender.js.map +1 -1
- package/es5/media/track/transceiver.js +6 -1
- package/es5/media/track/transceiver.js.map +1 -1
- package/es5/media/track/videotrack.js +32 -16
- package/es5/media/track/videotrack.js.map +1 -1
- package/es5/participant.js +47 -76
- package/es5/participant.js.map +1 -1
- package/es5/remoteparticipant.js +18 -9
- package/es5/remoteparticipant.js.map +1 -1
- package/es5/room.js +22 -5
- package/es5/room.js.map +1 -1
- package/es5/signaling/remotetrackpublication.js +13 -8
- package/es5/signaling/remotetrackpublication.js.map +1 -1
- package/es5/signaling/track.js.map +1 -1
- package/es5/signaling/v2/cancelableroomsignalingpromise.js +6 -3
- package/es5/signaling/v2/cancelableroomsignalingpromise.js.map +1 -1
- package/es5/signaling/v2/localparticipant.js +3 -3
- package/es5/signaling/v2/peerconnection.js +16 -3
- package/es5/signaling/v2/peerconnection.js.map +1 -1
- package/es5/signaling/v2/peerconnectionmanager.js +12 -0
- package/es5/signaling/v2/peerconnectionmanager.js.map +1 -1
- package/es5/signaling/v2/remoteparticipant.js +13 -5
- package/es5/signaling/v2/remoteparticipant.js.map +1 -1
- package/es5/signaling/v2/remotetrackpublication.js +12 -1
- package/es5/signaling/v2/remotetrackpublication.js.map +1 -1
- package/es5/signaling/v2/room.js +183 -105
- package/es5/signaling/v2/room.js.map +1 -1
- package/es5/signaling/v2/twilioconnectiontransport.js +3 -1
- package/es5/signaling/v2/twilioconnectiontransport.js.map +1 -1
- package/es5/signaling/v3/remoteparticipant.js +70 -0
- package/es5/signaling/v3/remoteparticipant.js.map +1 -0
- package/es5/signaling/v3/remotetrackpublication.js +249 -0
- package/es5/signaling/v3/remotetrackpublication.js.map +1 -0
- package/es5/signaling/v3/room.js +237 -0
- package/es5/signaling/v3/room.js.map +1 -0
- package/es5/signaling/v3/tracksubscriptionssignaling.js +73 -0
- package/es5/signaling/v3/tracksubscriptionssignaling.js.map +1 -0
- package/es5/util/constants.js +7 -0
- package/es5/util/constants.js.map +1 -1
- package/es5/util/index.js +75 -13
- package/es5/util/index.js.map +1 -1
- package/es5/util/validate.js +10 -2
- package/es5/util/validate.js.map +1 -1
- package/es5/webrtc/getstats.js +11 -9
- package/es5/webrtc/getstats.js.map +1 -1
- package/es5/webrtc/index.js +6 -1
- package/es5/webrtc/index.js.map +1 -1
- package/lib/connect.js +82 -13
- package/lib/createlocaltracks.ts +1 -1
- package/lib/localparticipant.js +28 -10
- package/lib/media/track/audiotrack.js +6 -16
- package/lib/media/track/index.js +4 -6
- package/lib/media/track/localdatatrack.js +5 -1
- package/lib/media/track/localmediatrack.js +1 -0
- package/lib/media/track/mediatrack.js +64 -60
- package/lib/media/track/receiver.js +3 -2
- package/lib/media/track/remoteaudiotrack.js +27 -9
- package/lib/media/track/remoteaudiotrackpublication.js +30 -2
- package/lib/media/track/remotedatatrack.js +1 -1
- package/lib/media/track/remotemediatrack.js +97 -26
- package/lib/media/track/remotetrackpublication.js +70 -15
- package/lib/media/track/remotevideotrack.js +40 -11
- package/lib/media/track/remotevideotrackpublication.js +30 -2
- package/lib/media/track/sender.js +1 -1
- package/lib/media/track/transceiver.js +6 -1
- package/lib/media/track/videotrack.js +34 -22
- package/lib/participant.js +54 -74
- package/lib/remoteparticipant.js +18 -9
- package/lib/room.js +21 -5
- package/lib/signaling/remotetrackpublication.js +13 -8
- package/lib/signaling/track.js +0 -1
- package/lib/signaling/v2/cancelableroomsignalingpromise.js +6 -3
- package/lib/signaling/v2/localparticipant.js +3 -3
- package/lib/signaling/v2/peerconnection.js +14 -3
- package/lib/signaling/v2/peerconnectionmanager.js +13 -0
- package/lib/signaling/v2/remoteparticipant.js +12 -5
- package/lib/signaling/v2/remotetrackpublication.js +9 -1
- package/lib/signaling/v2/room.js +185 -122
- package/lib/signaling/v2/twilioconnectiontransport.js +3 -3
- package/lib/signaling/v3/remoteparticipant.js +76 -0
- package/lib/signaling/v3/remotetrackpublication.js +246 -0
- package/lib/signaling/v3/room.js +248 -0
- package/lib/signaling/v3/tracksubscriptionssignaling.js +61 -0
- package/lib/util/constants.js +8 -0
- package/lib/util/index.js +77 -13
- package/lib/util/validate.js +12 -2
- package/lib/webrtc/getstats.js +11 -9
- package/lib/webrtc/index.js +7 -1
- package/package.json +4 -2
- package/tsdef/RemoteAudioTrack.d.ts +11 -1
- package/tsdef/RemoteAudioTrackPublication.d.ts +8 -0
- package/tsdef/RemoteParticipant.d.ts +1 -1
- package/tsdef/RemoteTrackPublication.d.ts +4 -1
- package/tsdef/RemoteVideoTrack.d.ts +11 -1
- package/tsdef/RemoteVideoTrackPublication.d.ts +8 -0
- package/tsdef/Room.d.ts +1 -1
- package/tsdef/Track.d.ts +7 -0
- package/tsdef/index.d.ts +2 -2
- package/tsdef/twilio-video-tests.ts +4 -0
- package/tsdef/types.d.ts +18 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,112 @@
|
|
|
1
|
-
The Twilio Programmable Video SDKs use [Semantic Versioning](http://www.semver.org/). Twilio supports version N-1 for 12 months after the first GA release of version N. We recommend you upgrade to the latest version as soon as possible to avoid any breaking changes. Version 2.x is the
|
|
1
|
+
The Twilio Programmable Video SDKs use [Semantic Versioning](http://www.semver.org/). Twilio supports version N-1 for 12 months after the first GA release of version N. We recommend you upgrade to the latest version as soon as possible to avoid any breaking changes. Version 2.x is the latest Video JavaScript SDK.
|
|
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
|
+
3.0.0-preview.2 (August 18, 2022)
|
|
6
|
+
=================================
|
|
7
|
+
|
|
8
|
+
Changes
|
|
9
|
+
-------
|
|
10
|
+
|
|
11
|
+
- `Room.getStats()`, which was broken in `3.0.0-preview.1`, has been fixed in this release. Note that the values reported
|
|
12
|
+
are best-effort approximations based off of the raw WebRTC statistics. (VIDEO-8756)
|
|
13
|
+
|
|
14
|
+
3.0.0-preview.1 (July 25, 2022)
|
|
15
|
+
===============================
|
|
16
|
+
|
|
17
|
+
New Features
|
|
18
|
+
------------
|
|
19
|
+
|
|
20
|
+
**Large Rooms Pilot**
|
|
21
|
+
|
|
22
|
+
twilio-video.js now allows you to create and join a [Large Group Room](https://www.twilio.com/docs/video/large-group-rooms),
|
|
23
|
+
which supports a large number of Participants (> 50). This feature is in pilot, and requires that your account be enabled
|
|
24
|
+
in order to use it. **Note that the following API changes apply only for Large Rooms, and not for non-large Group Rooms and
|
|
25
|
+
Peer-to-Peer Rooms**.
|
|
26
|
+
|
|
27
|
+
- An audio and video RemoteTrack will now have an additional property called `switchOffReason`, which describes the
|
|
28
|
+
[reason](https://sdk.stage.twilio.com/js/video/releases/3.0.0-preview.1/docs/global.html#TrackSwitchOffReason) for
|
|
29
|
+
it being switched off. The `switchedOff` event will also have this reason string as a second argument. (VIDEO-8670, VIDEO-8748)
|
|
30
|
+
- An audio or video RemoteTrack's `mediaStreamTrack` is set to `null` whenever it is switched off. When it is switched
|
|
31
|
+
on, it is set to a MediaStreamTrack. (VIDEO-8668, VIDEO-8745)
|
|
32
|
+
- When the `switchOffReason` changes for an already switched off audio or video RemoteTrack, the `switchedOff` event is
|
|
33
|
+
raised. (VIDEO-8668, VIDEO-8745)
|
|
34
|
+
- A RemoteAudioTrack of a Participant that is not active in the Large Room will now be switched off. (VIDEO-8668)
|
|
35
|
+
- A RemoteVideoTrack will now be switched off if the number of switched on RemoteVideoTracks reached the limit set by the media server. (VIDEO-8745)
|
|
36
|
+
- Renamed BandwidthProfileOptions to BandwidthProfile. (VIDEO-8754)
|
|
37
|
+
- Renamed VideoBandwidthProfileOptions to VideoBandwidthProfile. (VIDEO-8753)
|
|
38
|
+
- The `isEnabled` property of the RemoteTrack is deprecated and scheduled for removal. Alternatively, you can determine if
|
|
39
|
+
a RemoteTrack is enabled by using the following expression. (VIDEO-8742, VIDEO-8750)
|
|
40
|
+
```js
|
|
41
|
+
const isEnabled = remoteTrack.switchOffReason !== 'disabled-by-publisher';
|
|
42
|
+
```
|
|
43
|
+
- The `disabled` and `enabled` events of the RemoteTrack are deprecated and scheduled for removal. Alternatively, you can
|
|
44
|
+
handle the `switchedOff` and `switchedOn` events as shown below. (VIDEO-8742, VIDEO-8750)
|
|
45
|
+
```js
|
|
46
|
+
let recentSwitchOffReason = remoteTrack.switchOffReason;
|
|
47
|
+
|
|
48
|
+
remoteTrack.on('switchedOff', switchOffReason => {
|
|
49
|
+
recentSwitchOffReason = switchOffReason;
|
|
50
|
+
if (switchOffReason === 'disabled-by-publisher') {
|
|
51
|
+
/* The RemoteTrack is disabled. */
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
remoteTrack.on('switchedOn', () => {
|
|
56
|
+
if (recentSwitchOffReason === 'disabled-by-publisher') {
|
|
57
|
+
/* The RemoteTrack is enabled. */
|
|
58
|
+
}
|
|
59
|
+
recentSwitchOffReason = null;
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
- The `isTrackEnabled` property of the RemoteTrackPublication is deprecated and scheduled for removal. Alternatively, you
|
|
63
|
+
can determine if a RemoteTrackPublication is enabled by using the following expression. (VIDEO-8743, VIDEO-8751)
|
|
64
|
+
```js
|
|
65
|
+
const { track } = remoteTrackPublication;
|
|
66
|
+
const isTrackEnabled = !(track && track.switchOffReason === 'disabled-by-publisher');
|
|
67
|
+
```
|
|
68
|
+
`isTrackEnabled` is now only valid for RemoteTracks that are subscribed to, and defaults to `true` for unsubscribed
|
|
69
|
+
RemoteTracks.
|
|
70
|
+
- The `trackDisabled` and `trackEnabled` events of the RemoteTrack are deprecated and scheduled for removal. Alternatively,
|
|
71
|
+
you can handle the `trackSwitchedOff` and `trackSwitchedOn` events as shown below. (VIDEO-8743, VIDEO-8751)
|
|
72
|
+
```js
|
|
73
|
+
const { track } = remoteTrackPublication;
|
|
74
|
+
let recentSwitchOffReason = track ? track.switchOffReason : null;
|
|
75
|
+
|
|
76
|
+
remoteTrackPublication.on('trackSwitchedOff', (track, switchOffReason) => {
|
|
77
|
+
recentSwitchOffReason = switchOffReason;
|
|
78
|
+
if (switchOffReason === 'disabled-by-publisher') {
|
|
79
|
+
/* The RemoteTrack is disabled. */
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
remoteTrackPublication.on('trackSwitchedOn', (track) => {
|
|
84
|
+
if (recentSwitchOffReason === 'disabled-by-publisher') {
|
|
85
|
+
/* The RemoteTrack is enabled. */
|
|
86
|
+
}
|
|
87
|
+
recentSwitchOffReason = null;
|
|
88
|
+
});
|
|
89
|
+
```
|
|
90
|
+
The `trackDisabled` and `trackEnabled` events are now only fired for subscribed RemoteTracks.
|
|
91
|
+
- Any audio and video Tracks shared while joining the Room will **no longer** be guaranteed to be published by the time
|
|
92
|
+
the CancelablePromise returned by `connect()` is resolved. The application will now have to listen to the "trackPublished"
|
|
93
|
+
event on the LocalParticipant. (VIDEO-8817)
|
|
94
|
+
```js
|
|
95
|
+
const room = await connect('token', {
|
|
96
|
+
audio: true,
|
|
97
|
+
video: true,
|
|
98
|
+
room: 'my-large-room'
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
room.localParticipant.on('trackPublished', publication => {
|
|
102
|
+
console.log(`Successfully published ${publication.kind} Track`);
|
|
103
|
+
});
|
|
104
|
+
```
|
|
105
|
+
- `Room.getStats()` is broken, and will be fixed in an upcoming release. For now, the Track-level stats returned by this
|
|
106
|
+
method will not be accurate.
|
|
107
|
+
- [PSTN Participants](https://www.twilio.com/docs/video/adding-programmable-voice-participants-video-rooms) cannot connect
|
|
108
|
+
to Large Rooms.
|
|
109
|
+
|
|
5
110
|
2.22.2 (July 25, 2022)
|
|
6
111
|
======================
|
|
7
112
|
|
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/
|
|
77
|
+
<script src="//sdk.twilio.com/js/video/releases/3.0.0-preview.2/twilio-video.min.js"></script>
|
|
78
78
|
|
|
79
79
|
```
|
|
80
80
|
|