twilio-video 2.20.1 → 2.21.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.
Files changed (142) hide show
  1. package/.eslintrc.json +2 -1
  2. package/CHANGELOG.md +38 -0
  3. package/COMMON_ISSUES.md +9 -2
  4. package/README.md +8 -9
  5. package/dist/twilio-video.js +2619 -5420
  6. package/dist/twilio-video.min.js +20 -22
  7. package/es5/connect.js +2 -4
  8. package/es5/connect.js.map +1 -1
  9. package/es5/createlocaltrack.js +0 -2
  10. package/es5/createlocaltrack.js.map +1 -1
  11. package/es5/createlocaltracks.js +152 -92
  12. package/es5/createlocaltracks.js.map +1 -1
  13. package/es5/index.js +19 -8
  14. package/es5/index.js.map +1 -1
  15. package/es5/localparticipant.js +1 -1
  16. package/es5/localparticipant.js.map +1 -1
  17. package/es5/media/track/es5/localaudiotrack.js +1 -1
  18. package/es5/media/track/es5/localaudiotrack.js.map +1 -1
  19. package/es5/media/track/es5/localdatatrack.js +1 -1
  20. package/es5/media/track/es5/localdatatrack.js.map +1 -1
  21. package/es5/media/track/es5/localvideotrack.js +1 -1
  22. package/es5/media/track/es5/localvideotrack.js.map +1 -1
  23. package/es5/media/track/localmediatrack.js +2 -2
  24. package/es5/media/track/localmediatrack.js.map +1 -1
  25. package/es5/media/track/localvideotrack.js +1 -1
  26. package/es5/media/track/localvideotrack.js.map +1 -1
  27. package/es5/media/track/mediatrack.js +2 -2
  28. package/es5/media/track/mediatrack.js.map +1 -1
  29. package/es5/media/track/remotemediatrack.js +1 -1
  30. package/es5/media/track/remotemediatrack.js.map +1 -1
  31. package/es5/media/track/videotrack.js +1 -0
  32. package/es5/media/track/videotrack.js.map +1 -1
  33. package/es5/signaling/v2/peerconnection.js +8 -7
  34. package/es5/signaling/v2/peerconnection.js.map +1 -1
  35. package/es5/signaling/v2/peerconnectionmanager.js +1 -1
  36. package/es5/signaling/v2/peerconnectionmanager.js.map +1 -1
  37. package/es5/signaling/v2/twilioconnectiontransport.js +3 -4
  38. package/es5/signaling/v2/twilioconnectiontransport.js.map +1 -1
  39. package/es5/stats/peerconnectionreportfactory.js +1 -1
  40. package/es5/stats/peerconnectionreportfactory.js.map +1 -1
  41. package/es5/twilioconnection.js +1 -1
  42. package/es5/twilioconnection.js.map +1 -1
  43. package/es5/util/backoff.js +83 -0
  44. package/es5/util/backoff.js.map +1 -0
  45. package/es5/util/browserdetection.js +26 -0
  46. package/es5/util/browserdetection.js.map +1 -1
  47. package/es5/util/constants.js +16 -5
  48. package/es5/util/constants.js.map +1 -1
  49. package/es5/util/index.js +1 -1
  50. package/es5/util/index.js.map +1 -1
  51. package/es5/util/insightspublisher/index.js +22 -2
  52. package/es5/util/insightspublisher/index.js.map +1 -1
  53. package/es5/util/sdp/issue8329.js +1 -1
  54. package/es5/util/sdp/issue8329.js.map +1 -1
  55. package/es5/util/support.js +1 -1
  56. package/es5/util/support.js.map +1 -1
  57. package/es5/vendor/inherits.js +34 -0
  58. package/es5/vendor/inherits.js.map +1 -0
  59. package/es5/webrtc/getstats.js +793 -0
  60. package/es5/webrtc/getstats.js.map +1 -0
  61. package/es5/webrtc/getusermedia.js +23 -0
  62. package/es5/webrtc/getusermedia.js.map +1 -0
  63. package/es5/webrtc/index.js +34 -0
  64. package/es5/webrtc/index.js.map +1 -0
  65. package/es5/webrtc/mediastream.js +11 -0
  66. package/es5/webrtc/mediastream.js.map +1 -0
  67. package/es5/webrtc/mediastreamtrack.js +11 -0
  68. package/es5/webrtc/mediastreamtrack.js.map +1 -0
  69. package/es5/webrtc/rtcicecandidate.js +11 -0
  70. package/es5/webrtc/rtcicecandidate.js.map +1 -0
  71. package/es5/webrtc/rtcpeerconnection/chrome.js +510 -0
  72. package/es5/webrtc/rtcpeerconnection/chrome.js.map +1 -0
  73. package/es5/webrtc/rtcpeerconnection/firefox.js +294 -0
  74. package/es5/webrtc/rtcpeerconnection/firefox.js.map +1 -0
  75. package/es5/webrtc/rtcpeerconnection/index.js +24 -0
  76. package/es5/webrtc/rtcpeerconnection/index.js.map +1 -0
  77. package/es5/webrtc/rtcpeerconnection/safari.js +348 -0
  78. package/es5/webrtc/rtcpeerconnection/safari.js.map +1 -0
  79. package/es5/webrtc/rtcrtpsender.js +37 -0
  80. package/es5/webrtc/rtcrtpsender.js.map +1 -0
  81. package/es5/webrtc/rtcsessiondescription/chrome.js +36 -0
  82. package/es5/webrtc/rtcsessiondescription/chrome.js.map +1 -0
  83. package/es5/webrtc/rtcsessiondescription/firefox.js +4 -0
  84. package/es5/webrtc/rtcsessiondescription/firefox.js.map +1 -0
  85. package/es5/webrtc/rtcsessiondescription/index.js +22 -0
  86. package/es5/webrtc/rtcsessiondescription/index.js.map +1 -0
  87. package/es5/webrtc/util/eventtarget.js +34 -0
  88. package/es5/webrtc/util/eventtarget.js.map +1 -0
  89. package/es5/webrtc/util/index.js +308 -0
  90. package/es5/webrtc/util/index.js.map +1 -0
  91. package/es5/webrtc/util/latch.js +105 -0
  92. package/es5/webrtc/util/latch.js.map +1 -0
  93. package/es5/webrtc/util/sdp.js +284 -0
  94. package/es5/webrtc/util/sdp.js.map +1 -0
  95. package/lib/connect.js +2 -4
  96. package/lib/createlocaltrack.js +0 -2
  97. package/lib/{createlocaltracks.js → createlocaltracks.ts} +65 -44
  98. package/lib/index.ts +18 -10
  99. package/lib/localparticipant.js +1 -1
  100. package/lib/media/track/es5/localaudiotrack.js +1 -2
  101. package/lib/media/track/es5/localdatatrack.js +1 -1
  102. package/lib/media/track/es5/localvideotrack.js +1 -1
  103. package/lib/media/track/localmediatrack.js +2 -2
  104. package/lib/media/track/localvideotrack.js +1 -1
  105. package/lib/media/track/mediatrack.js +2 -2
  106. package/lib/media/track/remotemediatrack.js +1 -1
  107. package/lib/media/track/videotrack.js +1 -0
  108. package/lib/signaling/v2/peerconnection.js +8 -8
  109. package/lib/signaling/v2/peerconnectionmanager.js +1 -1
  110. package/lib/signaling/v2/twilioconnectiontransport.js +3 -5
  111. package/lib/stats/peerconnectionreportfactory.js +1 -1
  112. package/lib/twilioconnection.js +1 -1
  113. package/lib/util/backoff.js +85 -0
  114. package/lib/util/browserdetection.js +29 -0
  115. package/lib/util/constants.js +17 -5
  116. package/lib/util/index.js +1 -1
  117. package/lib/util/insightspublisher/index.js +11 -2
  118. package/lib/util/sdp/issue8329.js +1 -1
  119. package/lib/util/support.js +1 -1
  120. package/lib/vendor/inherits.js +31 -0
  121. package/lib/webrtc/getstats.js +891 -0
  122. package/lib/webrtc/getusermedia.js +24 -0
  123. package/lib/webrtc/index.js +36 -0
  124. package/lib/webrtc/mediastream.js +10 -0
  125. package/lib/webrtc/mediastreamtrack.js +10 -0
  126. package/lib/webrtc/rtcicecandidate.js +10 -0
  127. package/lib/webrtc/rtcpeerconnection/chrome.js +562 -0
  128. package/lib/webrtc/rtcpeerconnection/firefox.js +331 -0
  129. package/lib/webrtc/rtcpeerconnection/index.js +23 -0
  130. package/lib/webrtc/rtcpeerconnection/safari.js +389 -0
  131. package/lib/webrtc/rtcrtpsender.js +39 -0
  132. package/lib/webrtc/rtcsessiondescription/chrome.js +39 -0
  133. package/lib/webrtc/rtcsessiondescription/firefox.js +4 -0
  134. package/lib/webrtc/rtcsessiondescription/index.js +21 -0
  135. package/lib/webrtc/util/eventtarget.js +39 -0
  136. package/lib/webrtc/util/index.js +335 -0
  137. package/lib/webrtc/util/latch.js +113 -0
  138. package/lib/webrtc/util/sdp.js +309 -0
  139. package/package.json +12 -14
  140. package/tsdef/ConnectOptionsInternal.d.ts +5 -0
  141. package/tsdef/twilio-video-tests.ts +8 -0
  142. package/tsdef/types.d.ts +3 -0
package/.eslintrc.json CHANGED
@@ -15,7 +15,8 @@
15
15
  ],
16
16
  "globals": {
17
17
  "Atomics": "readonly",
18
- "SharedArrayBuffer": "readonly"
18
+ "SharedArrayBuffer": "readonly",
19
+ "globalThis": false
19
20
  },
20
21
  "parserOptions": {
21
22
  "ecmaVersion": 2018,
package/CHANGELOG.md CHANGED
@@ -2,6 +2,44 @@ 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.2 (June 1, 2022)
6
+ =====================
7
+
8
+ Bug Fixes
9
+ ---------
10
+
11
+ - Fixed an issue where some extraneous errors were logged to console when a video track was stopped. (VIDEO-9511)
12
+ - Fixed an issue where the `dimensionsChanged` event was not firing when the track dimensions first became available. (VIDEO-3576)
13
+ - Removed references to node dependencies that causes build errors on Angular and Vue. (VIDEO-9282)
14
+ - Fixed an issue where incorrect device was detected when using iPad in Desktop Website mode. (VIDEO-8282)
15
+
16
+ 2.21.1 (March 22, 2022)
17
+ =======================
18
+
19
+ Bug Fixes
20
+ ---------
21
+
22
+ - Fixed the issue where twilio-video.js does not build with the latest version of webpack and vite. (VIDEO-8609)
23
+
24
+ 2.21.0 (March 8, 2022)
25
+ ======================
26
+
27
+ New Features
28
+ ------------
29
+
30
+ - 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).
31
+
32
+ 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.
33
+
34
+ Note: As with Safari, WKWebViews only support only one local media track of each kind at a time.
35
+
36
+ We also would like to thank @cbxp for his [contribution](https://github.com/twilio/twilio-webrtc.js/pull/133). (VIDEO-8374)
37
+
38
+ Known Issue
39
+ -----------
40
+
41
+ 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.
42
+
5
43
  2.20.1 (Feb 17, 2022)
6
44
  =====================
7
45
  Bug Fixes
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.1/twilio-video.min.js"></script>
77
+ <script src="//sdk.twilio.com/js/video/releases/2.21.2/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
-