twilio-video 2.20.0 → 2.21.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.
Files changed (108) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/COMMON_ISSUES.md +9 -2
  3. package/README.md +8 -9
  4. package/dist/twilio-video.js +2145 -2461
  5. package/dist/twilio-video.min.js +22 -22
  6. package/es5/connect.js +2 -4
  7. package/es5/connect.js.map +1 -1
  8. package/es5/createlocaltrack.js +0 -2
  9. package/es5/createlocaltrack.js.map +1 -1
  10. package/es5/createlocaltracks.js +152 -92
  11. package/es5/createlocaltracks.js.map +1 -1
  12. package/es5/index.js +19 -8
  13. package/es5/index.js.map +1 -1
  14. package/es5/localparticipant.js +1 -1
  15. package/es5/localparticipant.js.map +1 -1
  16. package/es5/media/track/localmediatrack.js +2 -2
  17. package/es5/media/track/localmediatrack.js.map +1 -1
  18. package/es5/media/track/localvideotrack.js +1 -1
  19. package/es5/media/track/localvideotrack.js.map +1 -1
  20. package/es5/media/track/mediatrack.js +2 -2
  21. package/es5/media/track/mediatrack.js.map +1 -1
  22. package/es5/media/track/remotemediatrack.js +1 -1
  23. package/es5/media/track/remotemediatrack.js.map +1 -1
  24. package/es5/signaling/v2/peerconnection.js +3 -3
  25. package/es5/signaling/v2/peerconnection.js.map +1 -1
  26. package/es5/signaling/v2/peerconnectionmanager.js +1 -1
  27. package/es5/signaling/v2/peerconnectionmanager.js.map +1 -1
  28. package/es5/stats/peerconnectionreportfactory.js +1 -1
  29. package/es5/stats/peerconnectionreportfactory.js.map +1 -1
  30. package/es5/util/index.js +1 -1
  31. package/es5/util/index.js.map +1 -1
  32. package/es5/util/sdp/issue8329.js +1 -1
  33. package/es5/util/sdp/issue8329.js.map +1 -1
  34. package/es5/util/support.js +1 -1
  35. package/es5/util/support.js.map +1 -1
  36. package/es5/webrtc/getstats.js +793 -0
  37. package/es5/webrtc/getstats.js.map +1 -0
  38. package/es5/webrtc/getusermedia.js +23 -0
  39. package/es5/webrtc/getusermedia.js.map +1 -0
  40. package/es5/webrtc/index.js +34 -0
  41. package/es5/webrtc/index.js.map +1 -0
  42. package/es5/webrtc/mediastream.js +11 -0
  43. package/es5/webrtc/mediastream.js.map +1 -0
  44. package/es5/webrtc/mediastreamtrack.js +11 -0
  45. package/es5/webrtc/mediastreamtrack.js.map +1 -0
  46. package/es5/webrtc/rtcicecandidate.js +11 -0
  47. package/es5/webrtc/rtcicecandidate.js.map +1 -0
  48. package/es5/webrtc/rtcpeerconnection/chrome.js +510 -0
  49. package/es5/webrtc/rtcpeerconnection/chrome.js.map +1 -0
  50. package/es5/webrtc/rtcpeerconnection/firefox.js +294 -0
  51. package/es5/webrtc/rtcpeerconnection/firefox.js.map +1 -0
  52. package/es5/webrtc/rtcpeerconnection/index.js +24 -0
  53. package/es5/webrtc/rtcpeerconnection/index.js.map +1 -0
  54. package/es5/webrtc/rtcpeerconnection/safari.js +348 -0
  55. package/es5/webrtc/rtcpeerconnection/safari.js.map +1 -0
  56. package/es5/webrtc/rtcrtpsender.js +37 -0
  57. package/es5/webrtc/rtcrtpsender.js.map +1 -0
  58. package/es5/webrtc/rtcsessiondescription/chrome.js +36 -0
  59. package/es5/webrtc/rtcsessiondescription/chrome.js.map +1 -0
  60. package/es5/webrtc/rtcsessiondescription/firefox.js +4 -0
  61. package/es5/webrtc/rtcsessiondescription/firefox.js.map +1 -0
  62. package/es5/webrtc/rtcsessiondescription/index.js +22 -0
  63. package/es5/webrtc/rtcsessiondescription/index.js.map +1 -0
  64. package/es5/webrtc/util/eventtarget.js +34 -0
  65. package/es5/webrtc/util/eventtarget.js.map +1 -0
  66. package/es5/webrtc/util/index.js +308 -0
  67. package/es5/webrtc/util/index.js.map +1 -0
  68. package/es5/webrtc/util/latch.js +105 -0
  69. package/es5/webrtc/util/latch.js.map +1 -0
  70. package/es5/webrtc/util/sdp.js +284 -0
  71. package/es5/webrtc/util/sdp.js.map +1 -0
  72. package/lib/connect.js +2 -4
  73. package/lib/createlocaltrack.js +0 -2
  74. package/lib/{createlocaltracks.js → createlocaltracks.ts} +65 -44
  75. package/lib/index.ts +18 -10
  76. package/lib/localparticipant.js +1 -1
  77. package/lib/media/track/localmediatrack.js +2 -2
  78. package/lib/media/track/localvideotrack.js +1 -1
  79. package/lib/media/track/mediatrack.js +2 -2
  80. package/lib/media/track/remotemediatrack.js +1 -1
  81. package/lib/signaling/v2/peerconnection.js +3 -3
  82. package/lib/signaling/v2/peerconnectionmanager.js +1 -1
  83. package/lib/stats/peerconnectionreportfactory.js +1 -1
  84. package/lib/util/index.js +1 -1
  85. package/lib/util/sdp/issue8329.js +1 -1
  86. package/lib/util/support.js +1 -1
  87. package/lib/webrtc/getstats.js +891 -0
  88. package/lib/webrtc/getusermedia.js +24 -0
  89. package/lib/webrtc/index.js +36 -0
  90. package/lib/webrtc/mediastream.js +10 -0
  91. package/lib/webrtc/mediastreamtrack.js +10 -0
  92. package/lib/webrtc/rtcicecandidate.js +10 -0
  93. package/lib/webrtc/rtcpeerconnection/chrome.js +562 -0
  94. package/lib/webrtc/rtcpeerconnection/firefox.js +331 -0
  95. package/lib/webrtc/rtcpeerconnection/index.js +23 -0
  96. package/lib/webrtc/rtcpeerconnection/safari.js +389 -0
  97. package/lib/webrtc/rtcrtpsender.js +39 -0
  98. package/lib/webrtc/rtcsessiondescription/chrome.js +39 -0
  99. package/lib/webrtc/rtcsessiondescription/firefox.js +4 -0
  100. package/lib/webrtc/rtcsessiondescription/index.js +21 -0
  101. package/lib/webrtc/util/eventtarget.js +39 -0
  102. package/lib/webrtc/util/index.js +335 -0
  103. package/lib/webrtc/util/latch.js +113 -0
  104. package/lib/webrtc/util/sdp.js +309 -0
  105. package/package.json +4 -5
  106. package/tsdef/ConnectOptionsInternal.d.ts +5 -0
  107. package/tsdef/twilio-video-tests.ts +8 -0
  108. package/tsdef/types.d.ts +3 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,40 @@ 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.21.1 (March 22, 2022)
6
+ =======================
7
+
8
+ Bug Fixes
9
+ ---------
10
+
11
+ - Fixed the issue where twilio-video.js does not build with the latest version of webpack and vite. (VIDEO-8609)
12
+
13
+ 2.21.0 (March 8, 2022)
14
+ ======================
15
+
16
+ New Features
17
+ ------------
18
+
19
+ - twilio-video.js now supports WKWebView and SFSafariViewController on iOS version 14.3 or later. The [`isSupported` flag](https://sdk.twilio.com/js/video/releases/2.20.1/docs/module-twilio-video.html) relies partly on the [User-Agent string](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent) to determine if twilio-video.js officially supports the user's browser. If your application modifies the default value for the User-Agent string, the new value should follow the [correct format](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent#syntax).
20
+
21
+ Additionally, for [iOS applications](https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_ios), your application will need to include the [camera usage description](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/plist/info/NSCameraUsageDescription), [microphone usage description](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW25) and [inline media playback](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1614793-allowsinlinemediaplayback) in order for the SDK to work on WKWebView.
22
+
23
+ Note: As with Safari, WKWebViews only support only one local media track of each kind at a time.
24
+
25
+ We also would like to thank @cbxp for his [contribution](https://github.com/twilio/twilio-webrtc.js/pull/133). (VIDEO-8374)
26
+
27
+ Known Issue
28
+ -----------
29
+
30
+ Some [common issues](https://github.com/twilio/twilio-video.js/blob/master/COMMON_ISSUES.md#safari-mobile) such as interruptions on mobile devices which includes, backgrounding the application, or switching between applications can sometimes cause VideoTracks to go black or AudioTracks to stop.
31
+
32
+ 2.20.1 (Feb 17, 2022)
33
+ =====================
34
+ Bug Fixes
35
+ ---------
36
+
37
+ - Fixed a bug that was introduced in 2.19.0 where the published LocalVideoTracks of Participants on older iOS versions 14.5 and below did not encode and transmit media. (VIDEO-8770)
38
+
5
39
  2.20.0 (February 10, 2022)
6
40
  ==========================
7
41
 
@@ -18,7 +52,7 @@ Thank you @morninng @eroidaaruqaj [#1622](https://github.com/twilio/twilio-video
18
52
 
19
53
  - [PreflightTestReport](https://sdk.twilio.com/js/video/releases/2.20.0/docs/global.html#PreflightTestReport) now includes a `progressEvents` property. This new property is an array of [PreflightProgress](https://sdk.twilio.com/js/video/releases/2.20.0/docs/global.html#PreflightProgress) events detected during the test. Use this information to determine which steps were completed and which ones were not.
20
54
 
21
- You can learn more about `runPreflight` usage in the documentation, [here](twilio.com/docs/video/troubleshooting/preflight-api).
55
+ You can learn more about `runPreflight` usage in the documentation, [here](https://twilio.com/docs/video/troubleshooting/preflight-api).
22
56
 
23
57
  Other changes in this release includes:
24
58
 
package/COMMON_ISSUES.md CHANGED
@@ -36,6 +36,13 @@ before opening a new issue. We recommend regularly upgrading to the latest versi
36
36
 
37
37
  ### Chrome mobile
38
38
  <details>
39
+ <summary>Android 11: Participants are unable to connect to a room due to ICE gathering failures on certain devices</summary>
40
+ <p>
41
+
42
+ Participants are unable to connect to a room on certain Android 11 devices due to a [Chromium bug](https://bugs.chromium.org/p/chromium/issues/detail?id=1240237) where the browser is unable to gather ice candidates. Please see this [github issue](https://github.com/twilio/twilio-video.js/issues/1701#issuecomment-1067533348) for more details and a potential solution to mitigate the issue.
43
+ </p>
44
+ </details>
45
+ <details>
39
46
  <summary>Android 12: Video distortion on Chrome when hardware acceleration is enabled</summary>
40
47
  <p>
41
48
 
@@ -188,10 +195,10 @@ before opening a new issue. We recommend regularly upgrading to the latest versi
188
195
  function attachAudioTrack(remoteAudioTrack) {
189
196
  const audioNode = audioContext.createMediaStreamSource(new MediaStream([remoteAudioTrack.mediaStreamTrack]));
190
197
  const gainNode = audioContext.createGain();
191
-
198
+
192
199
  // Adjust this value depending on your customers' preference
193
200
  gainNode.gain.value = 20;
194
-
201
+
195
202
  audioNode.connect(gainNode);
196
203
  gainNode.connect(audioContext.destination);
197
204
  }
package/README.md CHANGED
@@ -21,13 +21,13 @@ View [CHANGELOG.md](https://github.com/twilio/twilio-video.js/blob/master/CHANGE
21
21
  Browser Support
22
22
  ---------------
23
23
 
24
- | | Chrome | Edge (Chromium) | Firefox | Safari |
25
- | ------------|--------|-----------------|---------|--------|
26
- | **Android** | ✓ | - | ✓ | - |
27
- | **iOS** | ✓ | - | * | ✓ |
28
- | **Linux** | ✓ | - | ✓ | - |
29
- | **macOS** | ✓ | ✓ ** | ✓ | ✓ |
30
- | **Windows** | ✓ | ✓ ** | ✓ | - |
24
+ | | Chrome | Edge (Chromium) | Firefox | Safari | WebView |
25
+ | ------------|--------|-----------------|---------|--------|---------|
26
+ | **Android** | ✓ | - | ✓ | - | - |
27
+ | **iOS** | ✓ | - | * | ✓ | ✓ |
28
+ | **Linux** | ✓ | - | ✓ | - | - |
29
+ | **macOS** | ✓ | ✓ ** | ✓ | ✓ | - |
30
+ | **Windows** | ✓ | ✓ ** | ✓ | - | - |
31
31
 
32
32
  \*\* twilio-video.js supports the [Chromium-based Edge](https://www.microsoftedgeinsider.com/) browser.
33
33
 
@@ -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 &lt;script&gt; tag.
75
75
 
76
76
  ```html
77
- <script src="//sdk.twilio.com/js/video/releases/2.20.0/twilio-video.min.js"></script>
77
+ <script src="//sdk.twilio.com/js/video/releases/2.21.1/twilio-video.min.js"></script>
78
78
 
79
79
  ```
80
80
 
@@ -235,4 +235,3 @@ License
235
235
  -------
236
236
 
237
237
  See [LICENSE.md](https://github.com/twilio/twilio-video.js/blob/master/LICENSE.md).
238
-