twilio-video 2.15.3 → 2.18.0

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 (345) hide show
  1. package/.eslintrc.json +13 -2
  2. package/CHANGELOG.md +91 -1
  3. package/COMMON_ISSUES.md +82 -39
  4. package/README.md +26 -20
  5. package/appveyor.yml +1 -1
  6. package/dist/twilio-video.js +17108 -19729
  7. package/dist/twilio-video.min.js +21 -24
  8. package/es5/cancelableroompromise.js +30 -33
  9. package/es5/cancelableroompromise.js.map +1 -0
  10. package/es5/connect.js +352 -430
  11. package/es5/connect.js.map +1 -0
  12. package/es5/createlocaltrack.js +21 -36
  13. package/es5/createlocaltrack.js.map +1 -0
  14. package/es5/createlocaltracks.js +71 -96
  15. package/es5/createlocaltracks.js.map +1 -0
  16. package/es5/data/receiver.js +50 -66
  17. package/es5/data/receiver.js.map +1 -0
  18. package/es5/data/sender.js +88 -124
  19. package/es5/data/sender.js.map +1 -0
  20. package/es5/data/transceiver.js +46 -45
  21. package/es5/data/transceiver.js.map +1 -0
  22. package/es5/data/transport.js +75 -93
  23. package/es5/data/transport.js.map +1 -0
  24. package/es5/encodingparameters.js +71 -84
  25. package/es5/encodingparameters.js.map +1 -0
  26. package/es5/eventemitter.js +4 -8
  27. package/es5/eventemitter.js.map +1 -0
  28. package/es5/eventtarget.js +42 -41
  29. package/es5/eventtarget.js.map +1 -0
  30. package/es5/index.js +46 -55
  31. package/es5/index.js.map +1 -0
  32. package/es5/localparticipant.js +412 -533
  33. package/es5/localparticipant.js.map +1 -0
  34. package/es5/media/track/audiotrack.js +108 -125
  35. package/es5/media/track/audiotrack.js.map +1 -0
  36. package/es5/media/track/es5/index.js +5 -5
  37. package/es5/media/track/es5/index.js.map +1 -0
  38. package/es5/media/track/es5/localaudiotrack.js +6 -11
  39. package/es5/media/track/es5/localaudiotrack.js.map +1 -0
  40. package/es5/media/track/es5/localdatatrack.js +6 -11
  41. package/es5/media/track/es5/localdatatrack.js.map +1 -0
  42. package/es5/media/track/es5/localvideotrack.js +6 -11
  43. package/es5/media/track/es5/localvideotrack.js.map +1 -0
  44. package/es5/media/track/index.js +61 -79
  45. package/es5/media/track/index.js.map +1 -0
  46. package/es5/media/track/localaudiotrack.js +59 -92
  47. package/es5/media/track/localaudiotrack.js.map +1 -0
  48. package/es5/media/track/localaudiotrackpublication.js +35 -39
  49. package/es5/media/track/localaudiotrackpublication.js.map +1 -0
  50. package/es5/media/track/localdatatrack.js +71 -79
  51. package/es5/media/track/localdatatrack.js.map +1 -0
  52. package/es5/media/track/localdatatrackpublication.js +35 -39
  53. package/es5/media/track/localdatatrackpublication.js.map +1 -0
  54. package/es5/media/track/localmediatrack.js +331 -417
  55. package/es5/media/track/localmediatrack.js.map +1 -0
  56. package/es5/media/track/localtrackpublication.js +87 -105
  57. package/es5/media/track/localtrackpublication.js.map +1 -0
  58. package/es5/media/track/localvideotrack.js +186 -259
  59. package/es5/media/track/localvideotrack.js.map +1 -0
  60. package/es5/media/track/localvideotrackpublication.js +35 -39
  61. package/es5/media/track/localvideotrackpublication.js.map +1 -0
  62. package/es5/media/track/mediatrack.js +291 -372
  63. package/es5/media/track/mediatrack.js.map +1 -0
  64. package/es5/media/track/receiver.js +29 -27
  65. package/es5/media/track/receiver.js.map +1 -0
  66. package/es5/media/track/remoteaudiotrack.js +40 -56
  67. package/es5/media/track/remoteaudiotrack.js.map +1 -0
  68. package/es5/media/track/remoteaudiotrackpublication.js +32 -41
  69. package/es5/media/track/remoteaudiotrackpublication.js.map +1 -0
  70. package/es5/media/track/remotedatatrack.js +128 -132
  71. package/es5/media/track/remotedatatrack.js.map +1 -0
  72. package/es5/media/track/remotedatatrackpublication.js +32 -39
  73. package/es5/media/track/remotedatatrackpublication.js.map +1 -0
  74. package/es5/media/track/remotemediatrack.js +242 -259
  75. package/es5/media/track/remotemediatrack.js.map +1 -0
  76. package/es5/media/track/remotetrackpublication.js +114 -141
  77. package/es5/media/track/remotetrackpublication.js.map +1 -0
  78. package/es5/media/track/remotevideotrack.js +229 -291
  79. package/es5/media/track/remotevideotrack.js.map +1 -0
  80. package/es5/media/track/remotevideotrackpublication.js +32 -41
  81. package/es5/media/track/remotevideotrackpublication.js.map +1 -0
  82. package/es5/media/track/sender.js +74 -98
  83. package/es5/media/track/sender.js.map +1 -0
  84. package/es5/media/track/trackpublication.js +58 -79
  85. package/es5/media/track/trackpublication.js.map +1 -0
  86. package/es5/media/track/transceiver.js +57 -64
  87. package/es5/media/track/transceiver.js.map +1 -0
  88. package/es5/media/track/videoprocessoreventobserver.js +137 -176
  89. package/es5/media/track/videoprocessoreventobserver.js.map +1 -0
  90. package/es5/media/track/videotrack.js +348 -442
  91. package/es5/media/track/videotrack.js.map +1 -0
  92. package/es5/networkqualityconfiguration.js +88 -86
  93. package/es5/networkqualityconfiguration.js.map +1 -0
  94. package/es5/participant.js +451 -551
  95. package/es5/participant.js.map +1 -0
  96. package/es5/preflight/getCombinedConnectionStats.js +154 -0
  97. package/es5/preflight/getCombinedConnectionStats.js.map +1 -0
  98. package/es5/preflight/getturncredentials.js +56 -0
  99. package/es5/preflight/getturncredentials.js.map +1 -0
  100. package/es5/preflight/makestat.js +40 -0
  101. package/es5/preflight/makestat.js.map +1 -0
  102. package/es5/preflight/mos.js +60 -0
  103. package/es5/preflight/mos.js.map +1 -0
  104. package/es5/preflight/preflighttest.js +531 -0
  105. package/es5/preflight/preflighttest.js.map +1 -0
  106. package/es5/preflight/rtctypes.js +3 -0
  107. package/es5/preflight/rtctypes.js.map +1 -0
  108. package/es5/preflight/syntheticaudio.js +22 -0
  109. package/es5/preflight/syntheticaudio.js.map +1 -0
  110. package/es5/preflight/syntheticvideo.js +33 -0
  111. package/es5/preflight/syntheticvideo.js.map +1 -0
  112. package/es5/preflight/timer.js +29 -0
  113. package/es5/preflight/timer.js.map +1 -0
  114. package/es5/queueingeventemitter.js +83 -78
  115. package/es5/queueingeventemitter.js.map +1 -0
  116. package/es5/remoteparticipant.js +110 -131
  117. package/es5/remoteparticipant.js.map +1 -0
  118. package/es5/room.js +234 -270
  119. package/es5/room.js.map +1 -0
  120. package/es5/signaling/index.js +107 -130
  121. package/es5/signaling/index.js.map +1 -0
  122. package/es5/signaling/localparticipant.js +64 -84
  123. package/es5/signaling/localparticipant.js.map +1 -0
  124. package/es5/signaling/localtrackpublication.js +89 -117
  125. package/es5/signaling/localtrackpublication.js.map +1 -0
  126. package/es5/signaling/participant.js +144 -165
  127. package/es5/signaling/participant.js.map +1 -0
  128. package/es5/signaling/recording.js +54 -66
  129. package/es5/signaling/recording.js.map +1 -0
  130. package/es5/signaling/remoteparticipant.js +31 -30
  131. package/es5/signaling/remoteparticipant.js.map +1 -0
  132. package/es5/signaling/remotetrackpublication.js +83 -98
  133. package/es5/signaling/remotetrackpublication.js.map +1 -0
  134. package/es5/signaling/room.js +191 -240
  135. package/es5/signaling/room.js.map +1 -0
  136. package/es5/signaling/track.js +149 -171
  137. package/es5/signaling/track.js.map +1 -0
  138. package/es5/signaling/v2/cancelableroomsignalingpromise.js +112 -160
  139. package/es5/signaling/v2/cancelableroomsignalingpromise.js.map +1 -0
  140. package/es5/signaling/v2/dominantspeakersignaling.js +62 -71
  141. package/es5/signaling/v2/dominantspeakersignaling.js.map +1 -0
  142. package/es5/signaling/v2/icebox.js +51 -69
  143. package/es5/signaling/v2/icebox.js.map +1 -0
  144. package/es5/signaling/v2/iceconnectionmonitor.js +113 -158
  145. package/es5/signaling/v2/iceconnectionmonitor.js.map +1 -0
  146. package/es5/signaling/v2/index.js +55 -64
  147. package/es5/signaling/v2/index.js.map +1 -0
  148. package/es5/signaling/v2/localparticipant.js +182 -257
  149. package/es5/signaling/v2/localparticipant.js.map +1 -0
  150. package/es5/signaling/v2/localtrackpublication.js +57 -70
  151. package/es5/signaling/v2/localtrackpublication.js.map +1 -0
  152. package/es5/signaling/v2/mediasignaling.js +92 -102
  153. package/es5/signaling/v2/mediasignaling.js.map +1 -0
  154. package/es5/signaling/v2/networkqualitymonitor.js +130 -149
  155. package/es5/signaling/v2/networkqualitymonitor.js.map +1 -0
  156. package/es5/signaling/v2/networkqualitysignaling.js +146 -179
  157. package/es5/signaling/v2/networkqualitysignaling.js.map +1 -0
  158. package/es5/signaling/v2/peerconnection.js +1319 -1577
  159. package/es5/signaling/v2/peerconnection.js.map +1 -0
  160. package/es5/signaling/v2/peerconnectionmanager.js +368 -449
  161. package/es5/signaling/v2/peerconnectionmanager.js.map +1 -0
  162. package/es5/signaling/v2/recording.js +47 -55
  163. package/es5/signaling/v2/recording.js.map +1 -0
  164. package/es5/signaling/v2/remoteparticipant.js +105 -132
  165. package/es5/signaling/v2/remoteparticipant.js.map +1 -0
  166. package/es5/signaling/v2/remotetrackpublication.js +42 -49
  167. package/es5/signaling/v2/remotetrackpublication.js.map +1 -0
  168. package/es5/signaling/v2/renderhintssignaling.js +125 -150
  169. package/es5/signaling/v2/renderhintssignaling.js.map +1 -0
  170. package/es5/signaling/v2/room.js +667 -827
  171. package/es5/signaling/v2/room.js.map +1 -0
  172. package/es5/signaling/v2/trackprioritysignaling.js +60 -67
  173. package/es5/signaling/v2/trackprioritysignaling.js.map +1 -0
  174. package/es5/signaling/v2/trackswitchoffsignaling.js +48 -56
  175. package/es5/signaling/v2/trackswitchoffsignaling.js.map +1 -0
  176. package/es5/signaling/v2/twilioconnectiontransport.js +482 -566
  177. package/es5/signaling/v2/twilioconnectiontransport.js.map +1 -0
  178. package/es5/statemachine.js +297 -353
  179. package/es5/statemachine.js.map +1 -0
  180. package/es5/stats/average.js +4 -10
  181. package/es5/stats/average.js.map +1 -0
  182. package/es5/stats/icereport.js +49 -62
  183. package/es5/stats/icereport.js.map +1 -0
  184. package/es5/stats/icereportfactory.js +37 -51
  185. package/es5/stats/icereportfactory.js.map +1 -0
  186. package/es5/stats/localaudiotrackstats.js +44 -40
  187. package/es5/stats/localaudiotrackstats.js.map +1 -0
  188. package/es5/stats/localtrackstats.js +50 -43
  189. package/es5/stats/localtrackstats.js.map +1 -0
  190. package/es5/stats/localvideotrackstats.js +79 -76
  191. package/es5/stats/localvideotrackstats.js.map +1 -0
  192. package/es5/stats/networkqualityaudiostats.js +28 -26
  193. package/es5/stats/networkqualityaudiostats.js.map +1 -0
  194. package/es5/stats/networkqualitybandwidthstats.js +25 -35
  195. package/es5/stats/networkqualitybandwidthstats.js.map +1 -0
  196. package/es5/stats/networkqualityfractionloststats.js +21 -29
  197. package/es5/stats/networkqualityfractionloststats.js.map +1 -0
  198. package/es5/stats/networkqualitylatencystats.js +25 -35
  199. package/es5/stats/networkqualitylatencystats.js.map +1 -0
  200. package/es5/stats/networkqualitymediastats.js +29 -40
  201. package/es5/stats/networkqualitymediastats.js.map +1 -0
  202. package/es5/stats/networkqualityrecvstats.js +28 -26
  203. package/es5/stats/networkqualityrecvstats.js.map +1 -0
  204. package/es5/stats/networkqualitysendorrecvstats.js +25 -36
  205. package/es5/stats/networkqualitysendorrecvstats.js.map +1 -0
  206. package/es5/stats/networkqualitysendstats.js +28 -26
  207. package/es5/stats/networkqualitysendstats.js.map +1 -0
  208. package/es5/stats/networkqualitystats.js +25 -33
  209. package/es5/stats/networkqualitystats.js.map +1 -0
  210. package/es5/stats/networkqualityvideostats.js +28 -26
  211. package/es5/stats/networkqualityvideostats.js.map +1 -0
  212. package/es5/stats/peerconnectionreport.js +50 -71
  213. package/es5/stats/peerconnectionreport.js.map +1 -0
  214. package/es5/stats/peerconnectionreportfactory.js +271 -372
  215. package/es5/stats/peerconnectionreportfactory.js.map +1 -0
  216. package/es5/stats/receiverreport.js +99 -121
  217. package/es5/stats/receiverreport.js.map +1 -0
  218. package/es5/stats/receiverreportfactory.js +50 -57
  219. package/es5/stats/receiverreportfactory.js.map +1 -0
  220. package/es5/stats/remoteaudiotrackstats.js +43 -38
  221. package/es5/stats/remoteaudiotrackstats.js.map +1 -0
  222. package/es5/stats/remotetrackstats.js +43 -38
  223. package/es5/stats/remotetrackstats.js.map +1 -0
  224. package/es5/stats/remotevideotrackstats.js +54 -52
  225. package/es5/stats/remotevideotrackstats.js.map +1 -0
  226. package/es5/stats/senderorreceiverreport.js +26 -30
  227. package/es5/stats/senderorreceiverreport.js.map +1 -0
  228. package/es5/stats/senderorreceiverreportfactory.js +28 -32
  229. package/es5/stats/senderorreceiverreportfactory.js.map +1 -0
  230. package/es5/stats/senderreport.js +67 -79
  231. package/es5/stats/senderreport.js.map +1 -0
  232. package/es5/stats/senderreportfactory.js +50 -57
  233. package/es5/stats/senderreportfactory.js.map +1 -0
  234. package/es5/stats/statsreport.js +36 -50
  235. package/es5/stats/statsreport.js.map +1 -0
  236. package/es5/stats/sum.js +3 -7
  237. package/es5/stats/sum.js.map +1 -0
  238. package/es5/stats/trackstats.js +43 -44
  239. package/es5/stats/trackstats.js.map +1 -0
  240. package/es5/transceiver.js +47 -55
  241. package/es5/transceiver.js.map +1 -0
  242. package/es5/twilioconnection.js +479 -592
  243. package/es5/twilioconnection.js.map +1 -0
  244. package/es5/util/asyncvar.js +50 -73
  245. package/es5/util/asyncvar.js.map +1 -0
  246. package/es5/util/browserdetection.js +130 -0
  247. package/es5/util/browserdetection.js.map +1 -0
  248. package/es5/util/cancelablepromise.js +107 -123
  249. package/es5/util/cancelablepromise.js.map +1 -0
  250. package/es5/util/constants.js +42 -53
  251. package/es5/util/constants.js.map +1 -0
  252. package/es5/util/detectsilentaudio.js +28 -34
  253. package/es5/util/detectsilentaudio.js.map +1 -0
  254. package/es5/util/detectsilentvideo.js +34 -41
  255. package/es5/util/detectsilentvideo.js.map +1 -0
  256. package/es5/util/documentvisibilitymonitor.js +84 -136
  257. package/es5/util/documentvisibilitymonitor.js.map +1 -0
  258. package/es5/util/eventobserver.js +93 -105
  259. package/es5/util/eventobserver.js.map +1 -0
  260. package/es5/util/filter.js +41 -62
  261. package/es5/util/filter.js.map +1 -0
  262. package/es5/util/index.js +453 -491
  263. package/es5/util/index.js.map +1 -0
  264. package/es5/util/insightspublisher/index.js +178 -219
  265. package/es5/util/insightspublisher/index.js.map +1 -0
  266. package/es5/util/insightspublisher/null.js +29 -51
  267. package/es5/util/insightspublisher/null.js.map +1 -0
  268. package/es5/util/localmediarestartdeferreds.js +44 -69
  269. package/es5/util/localmediarestartdeferreds.js.map +1 -0
  270. package/es5/util/log.js +191 -246
  271. package/es5/util/log.js.map +1 -0
  272. package/es5/util/movingaveragedelta.js +32 -50
  273. package/es5/util/movingaveragedelta.js.map +1 -0
  274. package/es5/util/networkmonitor.js +80 -106
  275. package/es5/util/networkmonitor.js.map +1 -0
  276. package/es5/util/nullobserver.js +57 -78
  277. package/es5/util/nullobserver.js.map +1 -0
  278. package/es5/util/sdp/index.js +359 -430
  279. package/es5/util/sdp/index.js.map +1 -0
  280. package/es5/util/sdp/issue8329.js +106 -127
  281. package/es5/util/sdp/issue8329.js.map +1 -0
  282. package/es5/util/sdp/simulcast.js +159 -211
  283. package/es5/util/sdp/simulcast.js.map +1 -0
  284. package/es5/util/sdp/trackmatcher/identity.js +11 -28
  285. package/es5/util/sdp/trackmatcher/identity.js.map +1 -0
  286. package/es5/util/sdp/trackmatcher/mid.js +33 -53
  287. package/es5/util/sdp/trackmatcher/mid.js.map +1 -0
  288. package/es5/util/sdp/trackmatcher/ordered.js +53 -83
  289. package/es5/util/sdp/trackmatcher/ordered.js.map +1 -0
  290. package/es5/util/support.js +35 -135
  291. package/es5/util/support.js.map +1 -0
  292. package/es5/util/timeout.js +72 -102
  293. package/es5/util/timeout.js.map +1 -0
  294. package/es5/util/timeoutpromise.js +136 -133
  295. package/es5/util/timeoutpromise.js.map +1 -0
  296. package/es5/util/twilio-video-errors.js +534 -756
  297. package/es5/util/twilio-video-errors.js.map +1 -0
  298. package/es5/util/twilioerror.js +75 -65
  299. package/es5/util/twilioerror.js.map +1 -0
  300. package/es5/util/validate.js +77 -90
  301. package/es5/util/validate.js.map +1 -0
  302. package/es5/vendor/loglevel.js +59 -78
  303. package/es5/vendor/loglevel.js.map +1 -0
  304. package/es5/webaudio/audiocontext.js +62 -78
  305. package/es5/webaudio/audiocontext.js.map +1 -0
  306. package/es5/webaudio/detectsilence.js +33 -45
  307. package/es5/webaudio/detectsilence.js.map +1 -0
  308. package/es5/webaudio/workaround180748.js +42 -46
  309. package/es5/webaudio/workaround180748.js.map +1 -0
  310. package/jsdoc.conf +40 -13
  311. package/lib/index.ts +73 -0
  312. package/lib/media/track/audiotrack.js +3 -1
  313. package/lib/media/track/localmediatrack.js +4 -3
  314. package/lib/media/track/localvideotrack.js +4 -2
  315. package/lib/media/track/mediatrack.js +2 -2
  316. package/lib/media/track/remotemediatrack.js +2 -2
  317. package/lib/preflight/getCombinedConnectionStats.ts +135 -0
  318. package/lib/preflight/getturncredentials.ts +55 -0
  319. package/lib/preflight/makestat.ts +17 -0
  320. package/lib/preflight/mos.ts +54 -0
  321. package/lib/preflight/preflighttest.ts +475 -0
  322. package/lib/preflight/rtctypes.ts +57 -0
  323. package/lib/preflight/syntheticaudio.ts +21 -0
  324. package/lib/preflight/syntheticvideo.ts +36 -0
  325. package/lib/preflight/timer.ts +30 -0
  326. package/lib/signaling/v2/peerconnection.js +35 -0
  327. package/lib/signaling/v2/room.js +4 -4
  328. package/lib/signaling/v2/twilioconnectiontransport.js +1 -0
  329. package/lib/util/browserdetection.js +130 -0
  330. package/lib/util/index.js +13 -0
  331. package/lib/util/log.js +1 -0
  332. package/lib/util/movingaveragedelta.js +1 -1
  333. package/lib/util/support.js +4 -107
  334. package/lib/util/twilio-video-errors.js +89 -1
  335. package/lib/util/twilioerror.js +1 -0
  336. package/package.json +26 -17
  337. package/tsconfig.json +9 -4
  338. package/tsdef/LocalTrackOptions.d.ts +1 -0
  339. package/tsdef/PreflightTypes.d.ts +57 -0
  340. package/tsdef/index.d.ts +5 -0
  341. package/tsdef/loglevel.d.ts +34 -34
  342. package/tsdef/preflighttest.d.ts +20 -0
  343. package/tsdef/twilio-video-tests.ts +22 -0
  344. package/tsdef/types.d.ts +33 -30
  345. package/lib/index.js +0 -70
package/.eslintrc.json CHANGED
@@ -4,7 +4,15 @@
4
4
  "es6": true,
5
5
  "node": true
6
6
  },
7
- "extends": "eslint:recommended",
7
+ "parser": "@typescript-eslint/parser",
8
+ "plugins": [
9
+ "@typescript-eslint"
10
+ ],
11
+ "extends": [
12
+ "eslint:recommended",
13
+ "plugin:@typescript-eslint/eslint-recommended",
14
+ "plugin:@typescript-eslint/recommended"
15
+ ],
8
16
  "globals": {
9
17
  "Atomics": "readonly",
10
18
  "SharedArrayBuffer": "readonly"
@@ -14,6 +22,9 @@
14
22
  "sourceType": "module"
15
23
  },
16
24
  "rules": {
25
+ "@typescript-eslint/no-var-requires": "off",
26
+ "@typescript-eslint/no-empty-function": "off",
27
+ "@typescript-eslint/no-this-alias": "off",
17
28
  "accessor-pairs": "error",
18
29
  "array-bracket-newline": "off",
19
30
  "array-bracket-spacing": [
@@ -354,4 +365,4 @@
354
365
  "wrap-regex": "off",
355
366
  "yield-star-spacing": "error"
356
367
  }
357
- }
368
+ }
package/CHANGELOG.md CHANGED
@@ -1,6 +1,95 @@
1
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 lastest Video JavaScript SDK.
2
2
 
3
- **Version 1.x will End of Life on September 8th, 2021.** Check [this guide](https://www.twilio.com/docs/video/migrating-1x-2x) to plan your migration to the latest 2.x version. Support for the 1.x version ended on December 4th, 2020.
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
+
5
+ 2.18.0 (October 13, 2021)
6
+ =========================
7
+
8
+ New Features
9
+ ------------
10
+
11
+ - When a LocalParticipant tries to publish a LocalVideoTrack in an [Audio Only Group Room](https://www.twilio.com/docs/video/api/rooms-resource#example-4-create-an-audio-only-group-room),
12
+ it will fail with a [RoomTrackKindNotSupportedError](https://sdk.twilio.com/js/video/releases/2.18.0/docs/RoomTrackKindNotSupportedError.html). (VIDEO-7242)
13
+
14
+ Known Issue
15
+ ------------
16
+
17
+ In Firefox, although the publishing of a LocalVideoTrack in an Audio Only Group Room fails,
18
+ the **RoomTrackKindNotSupportedError** is not raised. We are actively working on fixing this issue.
19
+
20
+ 2.17.1 (September 21, 2021)
21
+ ===========================
22
+ Bug Fixes
23
+ ---------
24
+
25
+ - Fixed a regression in `2.17.0` which caused Chrome screen share tracks to be encoded at lower dimensions. (VIDEO-7000)
26
+
27
+ 2.17.0 (September 14, 2021)
28
+ ===========================
29
+ New Features
30
+ ------------
31
+
32
+ - twilio-video.js now supports Chrome on iOS versions 14.3 and above. (VIDEO-5723)
33
+
34
+ Bug Fixes
35
+ ---------
36
+
37
+ - Fixed a bug where the VideoTracks of Safari Participants with VP8 simulcast enabled sometimes had low frame rates. (VIDEO-6263)
38
+ - Fixed a bug where the screen share track got restarted as a camera track if it was ended when the application was foreground. (VIDEO-3977)
39
+
40
+ 2.16.0 (August 11, 2021)
41
+ ========================
42
+ **New Features**
43
+ -----------------------
44
+
45
+ This release includes the **Preflight API Public Beta** (`runPreflight`) to help test connectivity with Twilio servers. It can be used to detect issues prior to joining a Video Room or as part of a troubleshooting page.
46
+
47
+ The API connects two peer connections using Twilio's Signaling and TURN servers. It publishes synthetic audio and video tracks from one participant and ensures that other participant receives media on those tracks. After successfully verifying connectivity, it generates a report with information on the connection.
48
+
49
+ `runPreflight` was originally introduced as an experimental API in `2.8.0-beta1` and has been updated based on feedback. In short, usage of the API will now be free of charge.
50
+
51
+ Example:
52
+
53
+ ```ts
54
+ const { runPreflight } = require('twilio-video');
55
+ const token = getAccessToken();
56
+
57
+ const preflightTest = runPreflight(token);
58
+
59
+ preflightTest.on('progress', (progress: string) => {
60
+ console.log('preflight progress:', progress);
61
+ });
62
+
63
+ preflightTest.on('failed', (error: Error) => {
64
+ console.error('preflight error:', error);
65
+ });
66
+
67
+ preflightTest.on('completed', (report: PreflightTestReport) => {
68
+ console.log("Test completed in " + report.testTiming.duration + " milliseconds.");
69
+ console.log(" It took " + report.networkTiming.connect?.duration + " milliseconds to connect");
70
+ console.log(" It took " + report.networkTiming.media?.duration + " milliseconds to receive media");
71
+ });
72
+ ```
73
+
74
+ The [PreflightTestReport](https://sdk.twilio.com/js/video/releases/2.16.0/docs/global.html#PreflightTestReport) generated by `preflightTest` on `completed` provides statistics that can be useful in cases where there is a poor connection. Some of the useful statistics in the report are as follows:
75
+
76
+ - Packet loss, round trip time, and jitter observed on the connection
77
+ - Network timing measurements on the `progress` events, such as time to connect or to receive media.
78
+ - Ice candidates and selected ice candidate pairs
79
+
80
+ `preflightTest` emits a `failed` event to indicate test failures. You can use the [PreflightProgress](https://sdk.stage.twilio.com/js/video/releases/2.16.0/docs/global.html#PreflightProgress) events to better understand where the test failed and refer to
81
+ [this guide](https://www.twilio.com/docs/video/build-js-video-application-recommendations-and-best-practices#connection-errors) for interpreting common errors.
82
+
83
+ A few things to note:
84
+
85
+ - This function uses <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API"> web audio API's.</a> Browser's autoplay policies sometimes require user action before accessing these APIs. Please ensure that this API is called in response to user action like a button click.
86
+ - For testing limitations in available bandwidth, we recommend you use `testMediaConnectionBitrate` from the [RTC Diagnostics SDK](https://github.com/twilio/rtc-diagnostics).
87
+
88
+
89
+ Bug Fixes
90
+ ---------
91
+ Fixed a bug where the SDK was holding on to internally maintained audio elements longer than needed, now they will be cleaned up once track has started. (VIDEO-6480)
92
+
4
93
 
5
94
  2.15.3 (July 28, 2021)
6
95
  ======================
@@ -97,6 +186,7 @@ Bug Fixes
97
186
 
98
187
  New Features
99
188
  ------------
189
+
100
190
  This release contains a significant update to the Bandwidth Profile API. It allows for more efficient use of bandwidth and CPU in multi-party applications. In addition it provides developers with more dynamic control over which video tracks are delivered to the client and the preferred video resolution of the tracks. These capabilities are provided via the Client Track Switch Off Control and Content Preferences settings.
101
191
 
102
192
  Existing Bandwidth Profile settings will continue to function as before, however we recommend developers update their Bandwidth Profile settings to make use of these new capabilities at their earliest convenience.
package/COMMON_ISSUES.md CHANGED
@@ -9,23 +9,43 @@ before opening a new issue. We recommend regularly upgrading to the latest versi
9
9
  <details>
10
10
  <summary>Chrome memory leak might cause degraded experience in group rooms</summary>
11
11
  <p>
12
-
12
+
13
13
  Chrome has a memory leak, which is most apparent in long running Group Rooms with 30+ Participants with most of them share media. For details, go [here](https://github.com/twilio/twilio-video.js/issues/1449).
14
14
  </p>
15
15
  </details>
16
16
 
17
+ <details>
18
+ <summary>With opus dtx enabled, sometimes background noise is heard on muted AudioTracks</summary>
19
+ <p>
20
+
21
+ twilio-video.js enables DTX (discontinuous transmission) by default for opus. Webrtc has an issue which sometimes causes background noise to be heard on muted track when DTX is enabled, For details, see [here](https://bugs.chromium.org/p/webrtc/issues/detail?id=13051).
22
+ To workaround this issue, you can disable the dtx with:
23
+ ```js
24
+ const { connect } = require('twilio-video');
25
+
26
+ // Disable DTX for Opus.
27
+ connect('token', {
28
+ preferredAudioCodecs: [{ codec: 'opus', dtx: false }]
29
+ });
30
+ ```
31
+
32
+ </p>
33
+ </details>
34
+
35
+
36
+
17
37
  ### Chrome mobile
18
38
  <details>
19
39
  <summary>Android Chrome on Pixel 3 receives corrupted video frames with codec VP8</summary>
20
40
  <p>
21
-
22
- This is an issue in the hardware VP8 encoder on the Pixel 3 devices. See [WebRTC ticket](https://bugs.chromium.org/p/webrtc/issues/detail?id=11337). To work around this issue, please set H264 as the preferred video codec on Pixel 3. ([Example](https://github.com/twilio/video-quickstart-android/issues/470#issuecomment-623042880)).
23
- </p>
41
+
42
+ This is an issue in the hardware VP8 encoder on the Pixel 3 devices. See [WebRTC ticket](https://bugs.chromium.org/p/webrtc/issues/detail?id=11337). To work around this issue, please set H264 as the preferred video codec on Pixel 3. ([Example](https://github.com/twilio/video-quickstart-android/issues/470#issuecomment-623042880)).
43
+ </p>
24
44
  </details>
25
45
  <details>
26
46
  <summary>Android Chrome 81+ Participants fail to subscribe to H264 VideoTracks in Group Rooms</summary>
27
47
  <p>
28
-
48
+
29
49
  This happens primarily due to this [Chromium Bug](https://bugs.chromium.org/p/chromium/issues/detail?id=1074421).
30
50
  We have added a workaround to the SDK in version 2.4.0. For earlier versions of the SDK,
31
51
  please apply the workaround discussed in this [GitHub Issue](https://github.com/twilio/twilio-video.js/issues/966#issuecomment-619212184).
@@ -33,18 +53,28 @@ before opening a new issue. We recommend regularly upgrading to the latest versi
33
53
  </details>
34
54
 
35
55
  ### Safari desktop
56
+ <details>
57
+ <summary>Failures to publish tracks on Safari 15</summary>
58
+ <p>
59
+
60
+ If your applications uses [Webrtc-adapter](https://github.com/webrtcHacks/adapter) as a dependency, please note that older versions of webrtc-adapter have a bug which leads to an error ("Client is unable to apply a remote media description - Attempted to assign to readonly property…") on Safari 15.
61
+
62
+ To fix this issue, please update your adapter.js version to the newer one (^7.7.1) with the [fix](https://github.com/webrtcHacks/adapter/commit/de0348c756b7bda11a700bf7ea9e9393cab16421)
63
+ </p>
64
+ </details>
65
+
36
66
  <details>
37
67
  <summary>Echo issues in Safari when using external microphone</summary>
38
68
  <p>
39
-
69
+
40
70
  This is an echo cancellation bug in Safari's implementation of WebRTC. For more details, go [here](https://bugs.webkit.org/show_bug.cgi?id=213723).
41
- and [here](https://github.com/twilio/twilio-video.js/issues/1433)
42
- </p>
71
+ and [here](https://github.com/twilio/twilio-video.js/issues/1433)
72
+ </p>
43
73
  </details>
44
74
  <details>
45
75
  <summary>Angular applications missing audio and/or video tracks</summary>
46
76
  <p>
47
-
77
+
48
78
  There is a misinteraction between one of Angular's libraries, Zone.js, and
49
79
  Safari's RTCPeerConnection APIs. For more information, see [here](https://github.com/angular/zone.js/issues/883)
50
80
  for the issue filed against Zone.js and [here](https://bugs.webkit.org/show_bug.cgi?id=175802)
@@ -55,49 +85,62 @@ before opening a new issue. We recommend regularly upgrading to the latest versi
55
85
  ```html
56
86
  <script src="node_modules/zone.js/dist/zone.js"></script>
57
87
  <script src="node_modules/zone.js/dist/webapis-rtc-peer-connection.js"></script>
58
- ```
59
- </p>
88
+ ```
89
+ </p>
60
90
  </details>
61
91
  <details>
62
92
  <summary>After unpublishing a Track, Safari 12.1 Participants cannot publish Track(s) of the same kind</summary>
63
93
  <p>
64
-
94
+
65
95
  Because of this Safari 12.1 [bug](https://bugs.webkit.org/show_bug.cgi?id=195489),
66
- once a Participant unpublishes a MediaTrack of any kind (audio or video), it will not be able to publish another MediaTrack of the same kind. DataTracks are not affected. We have escalated this bug to the Safari Team and are keeping track of related developments.
67
- </p>
96
+ once a Participant unpublishes a MediaTrack of any kind (audio or video), it will not be able to publish another MediaTrack of the same kind. DataTracks are not affected. We have escalated this bug to the Safari Team and are keeping track of related developments.
97
+ </p>
68
98
  </details>
69
99
 
70
100
  ### Safari mobile
71
101
  <details>
102
+ <summary>iOS 15: Low audio volume in Safari</summary>
103
+ <p>
104
+ Safari on iOS version 15, sometimes routes audio to the earpiece and not the speakers by default. Which customers some time perceive as low audio volume. Find more details [here](https://github.com/twilio/twilio-video.js/issues/1586) and in this [WebKit bug](https://bugs.webkit.org/show_bug.cgi?id=230902).
105
+ </p>
106
+ </details>
107
+ <details>
108
+ <summary>iOS 15: Audio is lost in a video call after an interruption with a phone call</summary>
109
+ <p>
110
+ Due to a regression on Safari on iOS 15, an incoming call causes local and sometimes remote media playback to stop. You can find more details in this [WebKit bug](https://bugs.webkit.org/show_bug.cgi?id=230537).
111
+ </p>
112
+ </details>
113
+ <details>
72
114
  <summary>Mobile Safari Participants on iOS 13.1-13.3 sometimes fail to send audio</summary>
73
115
  <p>
74
-
75
- This issue happened due to regression on iOS 13.1. The fix was released by Apple in iOS 13.4. Find more details in this [WebKit bug](https://bugs.webkit.org/show_bug.cgi?id=202405).
76
- </p>
116
+
117
+ This issue happened due to regression on iOS 13.1. The fix was released by Apple in iOS 13.4. Find more details in this [WebKit bug](https://bugs.webkit.org/show_bug.cgi?id=202405).
118
+ </p>
77
119
  </details>
78
120
  <details>
79
121
  <summary>Stuttering/distorted audio in Safari on iOS 14.2 and MacOS 11.0.1</summary>
80
122
  <p>
81
-
82
- This issue happened due to regression in Safari's WebKit in iOS version 14.2, the fix got rolled out in iOS 14.3 beta3. Find more details [here](https://github.com/twilio/twilio-video.js/issues/1296) and in this [WebKit bug](https://bugs.webkit.org/show_bug.cgi?id=218762).
83
- </p>
123
+
124
+ This issue happened due to regression in Safari's WebKit in iOS version 14.2, the fix got rolled out in iOS 14.3 beta3. Find more details [here](https://github.com/twilio/twilio-video.js/issues/1296) and in this [WebKit bug](https://bugs.webkit.org/show_bug.cgi?id=218762).
125
+ </p>
84
126
  </details>
85
127
 
128
+
86
129
  ### Firefox desktop
87
130
  <details>
88
131
  <summary>Firefox Participants sometimes fail to subscribe to DataTracks on Peer-to-Peer Rooms</summary>
89
132
  <p>
90
-
91
- Because of this Firefox [bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1603887) Participants that join a Peer-to-Peer Room after a DataTrack has been published by a Firefox Participant fail to subscribe to it. You can work around this issue by publishing a DataTrack while connecting to the Room.
92
- </p>
133
+
134
+ Because of this Firefox [bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1603887) Participants that join a Peer-to-Peer Room after a DataTrack has been published by a Firefox Participant fail to subscribe to it. You can work around this issue by publishing a DataTrack while connecting to the Room.
135
+ </p>
93
136
  </details>
94
137
  <details>
95
138
  <summary>Firefox Participants cannot constrain their audio bandwidth</summary>
96
139
  <p>
97
-
140
+
98
141
  Because of this [bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1573726), Firefox
99
- Participants are not able to constrain their audio bandwidth using `LocalParticipant.setParameters()`.
100
- </p>
142
+ Participants are not able to constrain their audio bandwidth using `LocalParticipant.setParameters()`.
143
+ </p>
101
144
  </details>
102
145
 
103
146
  ### All browsers
@@ -105,7 +148,7 @@ before opening a new issue. We recommend regularly upgrading to the latest versi
105
148
  <details>
106
149
  <summary>Working around the browsers' autoplay policy (which might block audio and video from playing)</summary>
107
150
  <p>
108
-
151
+
109
152
  Chrome, Firefox and Safari enforce the autoplay policy, which blocks automatically
110
153
  playing audio or video if the user has not interacted with your application
111
154
  (ex: clicking a button to join a Room). You can find more details about the autoplay
@@ -135,7 +178,7 @@ remoteParticipant.on('trackSubscribed', track => {
135
178
  function isUserInteractionRequired(audioEl) {
136
179
  if (!audioEl.paused) {
137
180
  return Promise.resolve(false);
138
- }
181
+ }
139
182
  if (audioEl.hasAttribute('autoplay')) {
140
183
  return Promise.race([
141
184
  new Promise(resolve => audioEl.onplay = resolve),
@@ -149,7 +192,7 @@ function isUserInteractionRequired(audioEl) {
149
192
  });
150
193
  }
151
194
  ```
152
-
195
+
153
196
  For RemoteVideoTracks, there are two ways to ensure playback:
154
197
 
155
198
  - Make sure that the user interacts with your application before joining a Room.
@@ -171,30 +214,30 @@ For RemoteVideoTracks, there are two ways to ensure playback:
171
214
  const video = videoTrack.attach();
172
215
  video.muted = true;
173
216
  ```
174
- </p>
217
+ </p>
175
218
  </details>
176
219
  <details>
177
220
  <summary>Support of Beta/Canary/Nightly browser releases</summary>
178
221
  <p>
179
-
180
- We constantly test for and ensure compatibility with the current stable and beta releases of supported browsers.
181
- However, because some of the APIs we rely upon, like WebRTC, are under active development in the browsers,
222
+
223
+ We constantly test for and ensure compatibility with the current stable and beta releases of supported browsers.
224
+ However, because some of the APIs we rely upon, like WebRTC, are under active development in the browsers,
182
225
  we cannot guarantee compatibility with Canary or Nightly releases. Find our browsers support matrix [here](https://www.twilio.com/docs/video/javascript#supported-browsers)
183
- </p>
226
+ </p>
184
227
  </details>
185
228
  <details>
186
229
  <summary>Internet Explorer and other WebRTC-incompatible Browsers</summary>
187
230
  <p>
188
-
231
+
189
232
  twilio-video.js requires WebRTC, which is not supported by Internet Explorer.
190
- While twilio-video.js will load in Internet Explorer and other browsers that do not support WebRTC,
233
+ While twilio-video.js will load in Internet Explorer and other browsers that do not support WebRTC,
191
234
  attempting to connect to a Room or attempting to acquire LocalTracks will fail. Find our browsers support matrix [here](https://www.twilio.com/docs/video/javascript#supported-browsers)
192
- </p>
235
+ </p>
193
236
  </details>
194
237
  <details>
195
238
  <summary>Aggressive Browser Extensions and Plugins</summary>
196
239
  <p>
197
-
240
+
198
241
  Some browser extensions and plugins will disable WebRTC APIs, causing
199
242
  twilio-video.js to fail. Examples of such plugins include
200
243
 
@@ -204,5 +247,5 @@ twilio-video.js to fail. Examples of such plugins include
204
247
 
205
248
  These are unsupported and likely to break twilio-video.js. If you are having
206
249
  trouble with twilio-video.js, ensure these are not running.
207
- </p>
250
+ </p>
208
251
  </details>
package/README.md CHANGED
@@ -1,12 +1,7 @@
1
- **NEW:** Please check out our [Best Practices Guide](https://www.twilio.com/docs/video/build-js-video-application-recommendations-and-best-practices)
2
- for building video applications with twilio-video.js.
3
-
4
1
  twilio-video.js
5
2
  ===============
6
3
 
7
- [![NPM](https://img.shields.io/npm/v/twilio-video.svg)](https://www.npmjs.com/package/twilio-video) [![CircleCI](https://circleci.com/gh/twilio/twilio-video.js/tree/master.svg?style=svg&circle-token=80e91c8284c21ff16d3003702e17b903c0b32f1d)](https://circleci.com/gh/twilio/twilio-video.js/tree/master) [![Windows Build status](https://ci.appveyor.com/api/projects/status/gi5cj6dpfudsqhtg?svg=true)](https://ci.appveyor.com/project/markandrus/twilio-video-js)
8
-
9
- For 1.x, go [here](https://github.com/twilio/twilio-video.js/tree/support-1.x/).
4
+ [![NPM](https://img.shields.io/npm/v/twilio-video.svg)](https://www.npmjs.com/package/twilio-video) [![CircleCI](https://circleci.com/gh/twilio/twilio-video.js/tree/master.svg?style=svg&circle-token=80e91c8284c21ff16d3003702e17b903c0b32f1d)](https://circleci.com/gh/twilio/twilio-video.js/tree/master)
10
5
 
11
6
  twilio-video.js allows you to add real-time voice and video to your web apps.
12
7
 
@@ -18,20 +13,22 @@ twilio-video.js allows you to add real-time voice and video to your web apps.
18
13
 
19
14
  **We want your feedback!** Please feel free to open a [GitHub issue](https://github.com/twilio/twilio-video.js/issues) for suggested improvements or feature requests. If you need technical support, contact [help@twilio.com](mailto:help@twilio.com).
20
15
 
16
+ Changelog
17
+ ---------
18
+
19
+ View [CHANGELOG.md](https://github.com/twilio/twilio-video.js/blob/master/CHANGELOG.md) for details about our releases.
20
+
21
21
  Browser Support
22
22
  ---------------
23
23
 
24
24
  | | Chrome | Edge (Chromium) | Firefox | Safari |
25
25
  | ------------|--------|-----------------|---------|--------|
26
26
  | **Android** | ✓ | - | ✓ | - |
27
- | **iOS** | * | - | * | ✓ |
27
+ | **iOS** | | - | * | ✓ |
28
28
  | **Linux** | ✓ | - | ✓ | - |
29
29
  | **macOS** | ✓ | ✓ ** | ✓ | ✓ |
30
30
  | **Windows** | ✓ | ✓ ** | ✓ | - |
31
31
 
32
- \* Chrome and Firefox for iOS do not have access to WebRTC APIs, unlike Safari
33
- for iOS.
34
-
35
32
  \*\* twilio-video.js supports the [Chromium-based Edge](https://www.microsoftedgeinsider.com/) browser.
36
33
 
37
34
  Installation
@@ -77,7 +74,7 @@ Releases of twilio-video.js are hosted on a CDN, and you can include these
77
74
  directly in your web app using a &lt;script&gt; tag.
78
75
 
79
76
  ```html
80
- <script src="//sdk.twilio.com/js/video/releases/2.15.3/twilio-video.min.js"></script>
77
+ <script src="//sdk.twilio.com/js/video/releases/2.18.0/twilio-video.min.js"></script>
81
78
 
82
79
  ```
83
80
 
@@ -139,11 +136,6 @@ function trackUnsubscribed(track) {
139
136
  }
140
137
  ```
141
138
 
142
- Changelog
143
- ---------
144
-
145
- See [CHANGELOG.md](https://github.com/twilio/twilio-video.js/blob/master/CHANGELOG.md).
146
-
147
139
  Content Security Policy (CSP)
148
140
  -----------------------------
149
141
 
@@ -165,10 +157,6 @@ script-src https://sdk.twilio.com
165
157
  Keep in mind, you may need to merge these policy directives with your own if
166
158
  you're using other services.
167
159
 
168
- License
169
- -------
170
-
171
- See [LICENSE.md](https://github.com/twilio/twilio-video.js/blob/master/LICENSE.md).
172
160
 
173
161
  Building
174
162
  --------
@@ -224,9 +212,27 @@ Tips
224
212
  ln -s ../../pre-commit.sh .git/hooks/pre-commit
225
213
  ```
226
214
 
215
+ Related
216
+ -------
217
+ ### Applications using twilio-video.js
218
+ - [Twilio Video React App](https://github.com/twilio/twilio-video-app-react)
219
+ - [Twilio Video Javascript Quickstart](https://github.com/twilio/video-quickstart-js)
220
+ - [Twilio Video Diagnostics App](https://github.com/twilio/twilio-video-diagnostics-react-app/blob/main/README.md)
221
+
222
+ ### Developer tools
223
+ - [Twilio Video Processors](https://twilio.github.io/twilio-video-processors.js/index.html)
224
+ - [Twilio Video Room Monitor](https://github.com/twilio/twilio-video-room-monitor.js)
225
+ - [Twilio RTC Diagnostics SDK](https://github.com/twilio/rtc-diagnostics)
226
+
227
227
  Contributing
228
228
  ------------
229
229
 
230
230
  Bug fixes welcome! If you're not familiar with the GitHub pull
231
231
  request/contribution process,
232
232
  [this is a nice tutorial](https://gun.io/blog/how-to-github-fork-branch-and-pull-request/).
233
+
234
+ License
235
+ -------
236
+
237
+ See [LICENSE.md](https://github.com/twilio/twilio-video.js/blob/master/LICENSE.md).
238
+
package/appveyor.yml CHANGED
@@ -11,7 +11,7 @@ build_script:
11
11
  - npm run clean
12
12
  - npm run lint
13
13
  - npm run docs
14
- - npm run cover
14
+ - npm run test:unit
15
15
  - npm run build:es5
16
16
  - npm run build:js
17
17
  - npm run build:min.js