ue-softphone-sdk 2.1.9 → 2.2.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 (390) hide show
  1. package/dist/{index.d.ts → types/index.d.ts} +3 -7
  2. package/dist/ue-softphone-sdk.js +1 -2
  3. package/package.json +6 -6
  4. package/{new-rollup.config.mjs → rollup-new.config.mjs} +1 -1
  5. package/rollup.config.js +14 -15
  6. package/src/index.ts +23 -49
  7. package/tsconfig.json +10 -26
  8. package/dist/api/bye.d.ts +0 -16
  9. package/dist/api/dtmf.d.ts +0 -15
  10. package/dist/api/emitter.d.ts +0 -88
  11. package/dist/api/exceptions/content-type-unsupported.d.ts +0 -8
  12. package/dist/api/exceptions/index.d.ts +0 -5
  13. package/dist/api/exceptions/request-pending.d.ts +0 -9
  14. package/dist/api/exceptions/session-description-handler.d.ts +0 -8
  15. package/dist/api/exceptions/session-terminated.d.ts +0 -8
  16. package/dist/api/exceptions/state-transition.d.ts +0 -8
  17. package/dist/api/index.d.ts +0 -58
  18. package/dist/api/info.d.ts +0 -16
  19. package/dist/api/invitation-accept-options.d.ts +0 -19
  20. package/dist/api/invitation-progress-options.d.ts +0 -38
  21. package/dist/api/invitation-reject-options.d.ts +0 -25
  22. package/dist/api/invitation.d.ts +0 -179
  23. package/dist/api/inviter-cancel-options.d.ts +0 -9
  24. package/dist/api/inviter-invite-options.d.ts +0 -28
  25. package/dist/api/inviter-options.d.ts +0 -43
  26. package/dist/api/inviter.d.ts +0 -236
  27. package/dist/api/message.d.ts +0 -16
  28. package/dist/api/messager-message-options.d.ts +0 -11
  29. package/dist/api/messager-options.d.ts +0 -17
  30. package/dist/api/messager.d.ts +0 -26
  31. package/dist/api/notification.d.ts +0 -16
  32. package/dist/api/notifier.d.ts +0 -8
  33. package/dist/api/publisher-options.d.ts +0 -33
  34. package/dist/api/publisher-publish-options.d.ts +0 -6
  35. package/dist/api/publisher-state.d.ts +0 -21
  36. package/dist/api/publisher-unpublish-options.d.ts +0 -6
  37. package/dist/api/publisher.d.ts +0 -65
  38. package/dist/api/referral.d.ts +0 -38
  39. package/dist/api/registerer-options.d.ts +0 -46
  40. package/dist/api/registerer-register-options.d.ts +0 -11
  41. package/dist/api/registerer-state.d.ts +0 -21
  42. package/dist/api/registerer-unregister-options.d.ts +0 -16
  43. package/dist/api/registerer.d.ts +0 -144
  44. package/dist/api/session-bye-options.d.ts +0 -11
  45. package/dist/api/session-delegate.d.ts +0 -73
  46. package/dist/api/session-description-handler-factory.d.ts +0 -15
  47. package/dist/api/session-description-handler.d.ts +0 -74
  48. package/dist/api/session-info-options.d.ts +0 -11
  49. package/dist/api/session-invite-options.d.ts +0 -28
  50. package/dist/api/session-message-options.d.ts +0 -11
  51. package/dist/api/session-options.d.ts +0 -8
  52. package/dist/api/session-refer-options.d.ts +0 -14
  53. package/dist/api/session-state.d.ts +0 -45
  54. package/dist/api/session.d.ts +0 -359
  55. package/dist/api/subscriber-options.d.ts +0 -11
  56. package/dist/api/subscriber-subscribe-options.d.ts +0 -6
  57. package/dist/api/subscriber.d.ts +0 -94
  58. package/dist/api/subscription-delegate.d.ts +0 -12
  59. package/dist/api/subscription-options.d.ts +0 -8
  60. package/dist/api/subscription-state.d.ts +0 -19
  61. package/dist/api/subscription-subscribe-options.d.ts +0 -6
  62. package/dist/api/subscription-unsubscribe-options.d.ts +0 -6
  63. package/dist/api/subscription.d.ts +0 -84
  64. package/dist/api/transport-state.d.ts +0 -37
  65. package/dist/api/transport.d.ts +0 -159
  66. package/dist/api/user-agent-delegate.d.ts +0 -84
  67. package/dist/api/user-agent-options.d.ts +0 -253
  68. package/dist/api/user-agent-state.d.ts +0 -14
  69. package/dist/api/user-agent.d.ts +0 -200
  70. package/dist/core/dialogs/dialog-state.d.ts +0 -34
  71. package/dist/core/dialogs/dialog.d.ts +0 -161
  72. package/dist/core/dialogs/index.d.ts +0 -4
  73. package/dist/core/dialogs/session-dialog.d.ts +0 -196
  74. package/dist/core/dialogs/subscription-dialog.d.ts +0 -120
  75. package/dist/core/exceptions/exception.d.ts +0 -8
  76. package/dist/core/exceptions/index.d.ts +0 -3
  77. package/dist/core/exceptions/transaction-state-error.d.ts +0 -8
  78. package/dist/core/exceptions/transport-error.d.ts +0 -8
  79. package/dist/core/index.d.ts +0 -15
  80. package/dist/core/log/index.d.ts +0 -3
  81. package/dist/core/log/levels.d.ts +0 -10
  82. package/dist/core/log/logger-factory.d.ts +0 -21
  83. package/dist/core/log/logger.d.ts +0 -19
  84. package/dist/core/messages/body.d.ts +0 -64
  85. package/dist/core/messages/digest-authentication.d.ts +0 -51
  86. package/dist/core/messages/incoming-message.d.ts +0 -79
  87. package/dist/core/messages/incoming-request-message.d.ts +0 -10
  88. package/dist/core/messages/incoming-request.d.ts +0 -67
  89. package/dist/core/messages/incoming-response-message.d.ts +0 -10
  90. package/dist/core/messages/incoming-response.d.ts +0 -12
  91. package/dist/core/messages/index.d.ts +0 -13
  92. package/dist/core/messages/md5.d.ts +0 -32
  93. package/dist/core/messages/methods/ack.d.ts +0 -18
  94. package/dist/core/messages/methods/bye.d.ts +0 -21
  95. package/dist/core/messages/methods/cancel.d.ts +0 -21
  96. package/dist/core/messages/methods/constants.d.ts +0 -20
  97. package/dist/core/messages/methods/index.d.ts +0 -13
  98. package/dist/core/messages/methods/info.d.ts +0 -21
  99. package/dist/core/messages/methods/invite.d.ts +0 -86
  100. package/dist/core/messages/methods/message.d.ts +0 -21
  101. package/dist/core/messages/methods/notify.d.ts +0 -21
  102. package/dist/core/messages/methods/prack.d.ts +0 -21
  103. package/dist/core/messages/methods/publish.d.ts +0 -21
  104. package/dist/core/messages/methods/refer.d.ts +0 -21
  105. package/dist/core/messages/methods/register.d.ts +0 -21
  106. package/dist/core/messages/methods/subscribe.d.ts +0 -54
  107. package/dist/core/messages/outgoing-request-message.d.ts +0 -94
  108. package/dist/core/messages/outgoing-request.d.ts +0 -67
  109. package/dist/core/messages/outgoing-response.d.ts +0 -42
  110. package/dist/core/messages/parser.d.ts +0 -14
  111. package/dist/core/messages/utils.d.ts +0 -24
  112. package/dist/core/session/index.d.ts +0 -2
  113. package/dist/core/session/session-delegate.d.ts +0 -70
  114. package/dist/core/session/session.d.ts +0 -134
  115. package/dist/core/subscription/index.d.ts +0 -2
  116. package/dist/core/subscription/subscription-delegate.d.ts +0 -27
  117. package/dist/core/subscription/subscription.d.ts +0 -55
  118. package/dist/core/timers.d.ts +0 -20
  119. package/dist/core/transactions/client-transaction.d.ts +0 -45
  120. package/dist/core/transactions/index.d.ts +0 -10
  121. package/dist/core/transactions/invite-client-transaction.d.ts +0 -116
  122. package/dist/core/transactions/invite-server-transaction.d.ts +0 -127
  123. package/dist/core/transactions/non-invite-client-transaction.d.ts +0 -69
  124. package/dist/core/transactions/non-invite-server-transaction.d.ts +0 -57
  125. package/dist/core/transactions/server-transaction.d.ts +0 -35
  126. package/dist/core/transactions/transaction-state.d.ts +0 -13
  127. package/dist/core/transactions/transaction-user.d.ts +0 -72
  128. package/dist/core/transactions/transaction.d.ts +0 -79
  129. package/dist/core/transport.d.ts +0 -31
  130. package/dist/core/user-agent-core/allowed-methods.d.ts +0 -4
  131. package/dist/core/user-agent-core/index.d.ts +0 -3
  132. package/dist/core/user-agent-core/user-agent-core-configuration.d.ts +0 -99
  133. package/dist/core/user-agent-core/user-agent-core-delegate.d.ts +0 -37
  134. package/dist/core/user-agent-core/user-agent-core.d.ts +0 -179
  135. package/dist/core/user-agents/bye-user-agent-client.d.ts +0 -10
  136. package/dist/core/user-agents/bye-user-agent-server.d.ts +0 -10
  137. package/dist/core/user-agents/cancel-user-agent-client.d.ts +0 -10
  138. package/dist/core/user-agents/index.d.ts +0 -26
  139. package/dist/core/user-agents/info-user-agent-client.d.ts +0 -10
  140. package/dist/core/user-agents/info-user-agent-server.d.ts +0 -10
  141. package/dist/core/user-agents/invite-user-agent-client.d.ts +0 -35
  142. package/dist/core/user-agents/invite-user-agent-server.d.ts +0 -77
  143. package/dist/core/user-agents/message-user-agent-client.d.ts +0 -10
  144. package/dist/core/user-agents/message-user-agent-server.d.ts +0 -10
  145. package/dist/core/user-agents/notify-user-agent-client.d.ts +0 -10
  146. package/dist/core/user-agents/notify-user-agent-server.d.ts +0 -16
  147. package/dist/core/user-agents/prack-user-agent-client.d.ts +0 -10
  148. package/dist/core/user-agents/prack-user-agent-server.d.ts +0 -16
  149. package/dist/core/user-agents/publish-user-agent-client.d.ts +0 -10
  150. package/dist/core/user-agents/re-invite-user-agent-client.d.ts +0 -18
  151. package/dist/core/user-agents/re-invite-user-agent-server.d.ts +0 -41
  152. package/dist/core/user-agents/re-subscribe-user-agent-client.d.ts +0 -17
  153. package/dist/core/user-agents/re-subscribe-user-agent-server.d.ts +0 -10
  154. package/dist/core/user-agents/refer-user-agent-client.d.ts +0 -10
  155. package/dist/core/user-agents/refer-user-agent-server.d.ts +0 -16
  156. package/dist/core/user-agents/register-user-agent-client.d.ts +0 -10
  157. package/dist/core/user-agents/register-user-agent-server.d.ts +0 -11
  158. package/dist/core/user-agents/subscribe-user-agent-client.d.ts +0 -65
  159. package/dist/core/user-agents/subscribe-user-agent-server.d.ts +0 -11
  160. package/dist/core/user-agents/user-agent-client.d.ts +0 -103
  161. package/dist/core/user-agents/user-agent-server.d.ts +0 -79
  162. package/dist/grammar/grammar.d.ts +0 -26
  163. package/dist/grammar/index.d.ts +0 -4
  164. package/dist/grammar/name-addr-header.d.ts +0 -24
  165. package/dist/grammar/parameters.d.ts +0 -16
  166. package/dist/grammar/pegjs/dist/grammar.d.ts +0 -50
  167. package/dist/grammar/uri.d.ts +0 -62
  168. package/dist/main.d.ts +0 -9
  169. package/dist/new-index.d.ts +0 -199
  170. package/dist/platform/web/index.d.ts +0 -4
  171. package/dist/platform/web/modifiers/index.d.ts +0 -5
  172. package/dist/platform/web/modifiers/modifiers.d.ts +0 -41
  173. package/dist/platform/web/session-description-handler/index.d.ts +0 -14
  174. package/dist/platform/web/session-description-handler/media-stream-factory-default.d.ts +0 -6
  175. package/dist/platform/web/session-description-handler/media-stream-factory.d.ts +0 -6
  176. package/dist/platform/web/session-description-handler/peer-connection-configuration-default.d.ts +0 -5
  177. package/dist/platform/web/session-description-handler/peer-connection-delegate.d.ts +0 -63
  178. package/dist/platform/web/session-description-handler/session-description-handler-configuration.d.ts +0 -16
  179. package/dist/platform/web/session-description-handler/session-description-handler-factory-default.d.ts +0 -11
  180. package/dist/platform/web/session-description-handler/session-description-handler-factory-options.d.ts +0 -9
  181. package/dist/platform/web/session-description-handler/session-description-handler-factory.d.ts +0 -16
  182. package/dist/platform/web/session-description-handler/session-description-handler-options.d.ts +0 -47
  183. package/dist/platform/web/session-description-handler/session-description-handler.d.ts +0 -212
  184. package/dist/platform/web/simple-user/index.d.ts +0 -7
  185. package/dist/platform/web/simple-user/simple-user-delegate.d.ts +0 -72
  186. package/dist/platform/web/simple-user/simple-user-options.d.ts +0 -90
  187. package/dist/platform/web/simple-user/simple-user.d.ts +0 -226
  188. package/dist/platform/web/transport/index.d.ts +0 -6
  189. package/dist/platform/web/transport/transport-options.d.ts +0 -30
  190. package/dist/platform/web/transport/transport.d.ts +0 -125
  191. package/dist/ue-softphone-sdk.js.map +0 -1
  192. package/dist/version.d.ts +0 -1
  193. package/dist/webPhoneSdk.d.ts +0 -24
  194. package/dist/webrtc.d.ts +0 -17
  195. package/src/api/api-extractor.json +0 -358
  196. package/src/api/bye.ts +0 -27
  197. package/src/api/dtmf.ts +0 -27
  198. package/src/api/emitter.ts +0 -110
  199. package/src/api/exceptions/content-type-unsupported.ts +0 -11
  200. package/src/api/exceptions/index.ts +0 -5
  201. package/src/api/exceptions/request-pending.ts +0 -12
  202. package/src/api/exceptions/session-description-handler.ts +0 -11
  203. package/src/api/exceptions/session-terminated.ts +0 -11
  204. package/src/api/exceptions/state-transition.ts +0 -11
  205. package/src/api/index.ts +0 -58
  206. package/src/api/info.ts +0 -27
  207. package/src/api/invitation-accept-options.ts +0 -20
  208. package/src/api/invitation-progress-options.ts +0 -36
  209. package/src/api/invitation-reject-options.ts +0 -22
  210. package/src/api/invitation.ts +0 -816
  211. package/src/api/inviter-cancel-options.ts +0 -9
  212. package/src/api/inviter-invite-options.ts +0 -29
  213. package/src/api/inviter-options.ts +0 -44
  214. package/src/api/inviter.ts +0 -1126
  215. package/src/api/message.ts +0 -27
  216. package/src/api/messager-message-options.ts +0 -12
  217. package/src/api/messager-options.ts +0 -18
  218. package/src/api/messager.ts +0 -89
  219. package/src/api/notification.ts +0 -27
  220. package/src/api/notifier.ts +0 -7
  221. package/src/api/publisher-options.ts +0 -34
  222. package/src/api/publisher-publish-options.ts +0 -6
  223. package/src/api/publisher-state.ts +0 -21
  224. package/src/api/publisher-unpublish-options.ts +0 -6
  225. package/src/api/publisher.ts +0 -418
  226. package/src/api/referral.ts +0 -89
  227. package/src/api/registerer-options.ts +0 -55
  228. package/src/api/registerer-register-options.ts +0 -12
  229. package/src/api/registerer-state.ts +0 -21
  230. package/src/api/registerer-unregister-options.ts +0 -17
  231. package/src/api/registerer.ts +0 -814
  232. package/src/api/session-bye-options.ts +0 -12
  233. package/src/api/session-delegate.ts +0 -80
  234. package/src/api/session-description-handler-factory.ts +0 -16
  235. package/src/api/session-description-handler.ts +0 -89
  236. package/src/api/session-info-options.ts +0 -12
  237. package/src/api/session-invite-options.ts +0 -29
  238. package/src/api/session-message-options.ts +0 -12
  239. package/src/api/session-options.ts +0 -8
  240. package/src/api/session-refer-options.ts +0 -15
  241. package/src/api/session-state.ts +0 -45
  242. package/src/api/session.ts +0 -1448
  243. package/src/api/subscriber-options.ts +0 -12
  244. package/src/api/subscriber-subscribe-options.ts +0 -6
  245. package/src/api/subscriber.ts +0 -536
  246. package/src/api/subscription-delegate.ts +0 -13
  247. package/src/api/subscription-options.ts +0 -8
  248. package/src/api/subscription-state.ts +0 -19
  249. package/src/api/subscription-subscribe-options.ts +0 -6
  250. package/src/api/subscription-unsubscribe-options.ts +0 -6
  251. package/src/api/subscription.ts +0 -161
  252. package/src/api/transport-state.ts +0 -37
  253. package/src/api/transport.ts +0 -169
  254. package/src/api/user-agent-delegate.ts +0 -95
  255. package/src/api/user-agent-options.ts +0 -322
  256. package/src/api/user-agent-state.ts +0 -14
  257. package/src/api/user-agent.ts +0 -1014
  258. package/src/core/api-extractor.json +0 -358
  259. package/src/core/dialogs/dialog-state.ts +0 -35
  260. package/src/core/dialogs/dialog.ts +0 -605
  261. package/src/core/dialogs/index.ts +0 -4
  262. package/src/core/dialogs/session-dialog.ts +0 -996
  263. package/src/core/dialogs/subscription-dialog.ts +0 -557
  264. package/src/core/exceptions/exception.ts +0 -11
  265. package/src/core/exceptions/index.ts +0 -3
  266. package/src/core/exceptions/transaction-state-error.ts +0 -11
  267. package/src/core/exceptions/transport-error.ts +0 -11
  268. package/src/core/index.ts +0 -19
  269. package/src/core/log/index.ts +0 -3
  270. package/src/core/log/levels.ts +0 -10
  271. package/src/core/log/logger-factory.ts +0 -119
  272. package/src/core/log/logger.ts +0 -42
  273. package/src/core/messages/body.ts +0 -171
  274. package/src/core/messages/digest-authentication.ts +0 -190
  275. package/src/core/messages/incoming-message.ts +0 -152
  276. package/src/core/messages/incoming-request-message.ts +0 -14
  277. package/src/core/messages/incoming-request.ts +0 -75
  278. package/src/core/messages/incoming-response-message.ts +0 -14
  279. package/src/core/messages/incoming-response.ts +0 -13
  280. package/src/core/messages/index.ts +0 -18
  281. package/src/core/messages/md5.ts +0 -437
  282. package/src/core/messages/methods/ack.ts +0 -22
  283. package/src/core/messages/methods/bye.ts +0 -22
  284. package/src/core/messages/methods/cancel.ts +0 -22
  285. package/src/core/messages/methods/constants.ts +0 -21
  286. package/src/core/messages/methods/index.ts +0 -13
  287. package/src/core/messages/methods/info.ts +0 -22
  288. package/src/core/messages/methods/invite.ts +0 -104
  289. package/src/core/messages/methods/message.ts +0 -22
  290. package/src/core/messages/methods/notify.ts +0 -22
  291. package/src/core/messages/methods/prack.ts +0 -22
  292. package/src/core/messages/methods/publish.ts +0 -22
  293. package/src/core/messages/methods/refer.ts +0 -22
  294. package/src/core/messages/methods/register.ts +0 -22
  295. package/src/core/messages/methods/subscribe.ts +0 -59
  296. package/src/core/messages/outgoing-request-message.ts +0 -299
  297. package/src/core/messages/outgoing-request.ts +0 -77
  298. package/src/core/messages/outgoing-response.ts +0 -174
  299. package/src/core/messages/parser.ts +0 -265
  300. package/src/core/messages/utils.ts +0 -144
  301. package/src/core/session/index.ts +0 -2
  302. package/src/core/session/session-delegate.ts +0 -88
  303. package/src/core/session/session.ts +0 -158
  304. package/src/core/subscription/index.ts +0 -2
  305. package/src/core/subscription/subscription-delegate.ts +0 -30
  306. package/src/core/subscription/subscription.ts +0 -61
  307. package/src/core/timers.ts +0 -24
  308. package/src/core/transactions/client-transaction.ts +0 -78
  309. package/src/core/transactions/index.ts +0 -10
  310. package/src/core/transactions/invite-client-transaction.ts +0 -504
  311. package/src/core/transactions/invite-server-transaction.ts +0 -432
  312. package/src/core/transactions/non-invite-client-transaction.ts +0 -257
  313. package/src/core/transactions/non-invite-server-transaction.ts +0 -241
  314. package/src/core/transactions/server-transaction.ts +0 -47
  315. package/src/core/transactions/transaction-state.ts +0 -13
  316. package/src/core/transactions/transaction-user.ts +0 -82
  317. package/src/core/transactions/transaction.ts +0 -149
  318. package/src/core/transport.ts +0 -32
  319. package/src/core/user-agent-core/allowed-methods.ts +0 -19
  320. package/src/core/user-agent-core/index.ts +0 -3
  321. package/src/core/user-agent-core/user-agent-core-configuration.ts +0 -111
  322. package/src/core/user-agent-core/user-agent-core-delegate.ts +0 -50
  323. package/src/core/user-agent-core/user-agent-core.ts +0 -905
  324. package/src/core/user-agents/bye-user-agent-client.ts +0 -16
  325. package/src/core/user-agents/bye-user-agent-server.ts +0 -14
  326. package/src/core/user-agents/cancel-user-agent-client.ts +0 -14
  327. package/src/core/user-agents/index.ts +0 -26
  328. package/src/core/user-agents/info-user-agent-client.ts +0 -15
  329. package/src/core/user-agents/info-user-agent-server.ts +0 -14
  330. package/src/core/user-agents/invite-user-agent-client.ts +0 -405
  331. package/src/core/user-agents/invite-user-agent-server.ts +0 -269
  332. package/src/core/user-agents/message-user-agent-client.ts +0 -14
  333. package/src/core/user-agents/message-user-agent-server.ts +0 -14
  334. package/src/core/user-agents/notify-user-agent-client.ts +0 -15
  335. package/src/core/user-agents/notify-user-agent-server.ts +0 -30
  336. package/src/core/user-agents/prack-user-agent-client.ts +0 -16
  337. package/src/core/user-agents/prack-user-agent-server.ts +0 -37
  338. package/src/core/user-agents/publish-user-agent-client.ts +0 -14
  339. package/src/core/user-agents/re-invite-user-agent-client.ts +0 -127
  340. package/src/core/user-agents/re-invite-user-agent-server.ts +0 -109
  341. package/src/core/user-agents/re-subscribe-user-agent-client.ts +0 -78
  342. package/src/core/user-agents/re-subscribe-user-agent-server.ts +0 -14
  343. package/src/core/user-agents/refer-user-agent-client.ts +0 -15
  344. package/src/core/user-agents/refer-user-agent-server.ts +0 -30
  345. package/src/core/user-agents/register-user-agent-client.ts +0 -14
  346. package/src/core/user-agents/register-user-agent-server.ts +0 -14
  347. package/src/core/user-agents/subscribe-user-agent-client.ts +0 -341
  348. package/src/core/user-agents/subscribe-user-agent-server.ts +0 -14
  349. package/src/core/user-agents/user-agent-client.ts +0 -378
  350. package/src/core/user-agents/user-agent-server.ts +0 -276
  351. package/src/grammar/grammar.ts +0 -55
  352. package/src/grammar/index.ts +0 -4
  353. package/src/grammar/name-addr-header.ts +0 -58
  354. package/src/grammar/parameters.ts +0 -45
  355. package/src/grammar/pegjs/README.md +0 -9
  356. package/src/grammar/pegjs/dist/grammar.ts +0 -1557
  357. package/src/grammar/pegjs/src/grammar.pegjs +0 -1009
  358. package/src/grammar/uri.ts +0 -370
  359. package/src/lib/socket.io.esm.min.js +0 -7
  360. package/src/main.ts +0 -26
  361. package/src/new-index.ts +0 -2478
  362. package/src/platform/react/README.md +0 -1
  363. package/src/platform/web/index.ts +0 -4
  364. package/src/platform/web/modifiers/index.ts +0 -5
  365. package/src/platform/web/modifiers/modifiers.ts +0 -180
  366. package/src/platform/web/session-description-handler/api-extractor.json +0 -358
  367. package/src/platform/web/session-description-handler/index.ts +0 -14
  368. package/src/platform/web/session-description-handler/media-stream-factory-default.ts +0 -22
  369. package/src/platform/web/session-description-handler/media-stream-factory.ts +0 -10
  370. package/src/platform/web/session-description-handler/peer-connection-configuration-default.ts +0 -17
  371. package/src/platform/web/session-description-handler/peer-connection-delegate.ts +0 -72
  372. package/src/platform/web/session-description-handler/session-description-handler-configuration.ts +0 -17
  373. package/src/platform/web/session-description-handler/session-description-handler-factory-default.ts +0 -45
  374. package/src/platform/web/session-description-handler/session-description-handler-factory-options.ts +0 -10
  375. package/src/platform/web/session-description-handler/session-description-handler-factory.ts +0 -17
  376. package/src/platform/web/session-description-handler/session-description-handler-options.ts +0 -56
  377. package/src/platform/web/session-description-handler/session-description-handler.ts +0 -938
  378. package/src/platform/web/simple-user/api-extractor.json +0 -358
  379. package/src/platform/web/simple-user/index.ts +0 -7
  380. package/src/platform/web/simple-user/simple-user-delegate.ts +0 -82
  381. package/src/platform/web/simple-user/simple-user-options.ts +0 -102
  382. package/src/platform/web/simple-user/simple-user.ts +0 -1099
  383. package/src/platform/web/transport/api-extractor.json +0 -358
  384. package/src/platform/web/transport/index.ts +0 -6
  385. package/src/platform/web/transport/transport-options.ts +0 -34
  386. package/src/platform/web/transport/transport.ts +0 -742
  387. package/src/version.ts +0 -8
  388. package/src/webPhoneSdk.ts +0 -67
  389. package/src/webrtc.ts +0 -318
  390. /package/dist/{config.d.ts → types/config.d.ts} +0 -0
@@ -1,27 +0,0 @@
1
- import { IncomingMessageRequest, IncomingRequestMessage, ResponseOptions } from "../core";
2
-
3
- /**
4
- * A received message (incoming MESSAGE).
5
- * @public
6
- */
7
- export class Message {
8
- /** @internal */
9
- public constructor(private incomingMessageRequest: IncomingMessageRequest) {}
10
-
11
- /** Incoming MESSAGE request message. */
12
- public get request(): IncomingRequestMessage {
13
- return this.incomingMessageRequest.message;
14
- }
15
-
16
- /** Accept the request. */
17
- public accept(options?: ResponseOptions): Promise<void> {
18
- this.incomingMessageRequest.accept(options);
19
- return Promise.resolve();
20
- }
21
-
22
- /** Reject the request. */
23
- public reject(options?: ResponseOptions): Promise<void> {
24
- this.incomingMessageRequest.reject(options);
25
- return Promise.resolve();
26
- }
27
- }
@@ -1,12 +0,0 @@
1
- import { OutgoingRequestDelegate, RequestOptions } from "../core";
2
-
3
- /**
4
- * Options for {@link Messager.message}.
5
- * @public
6
- */
7
- export interface MessagerMessageOptions {
8
- /** See `core` API. */
9
- requestDelegate?: OutgoingRequestDelegate;
10
- /** See `core` API. */
11
- requestOptions?: RequestOptions;
12
- }
@@ -1,18 +0,0 @@
1
- import { URI } from "../core";
2
-
3
- /**
4
- * Options for {@link Messager} constructor.
5
- * @public
6
- */
7
- export interface MessagerOptions {
8
- /** Array of extra headers added to the MESSAGE. */
9
- extraHeaders?: Array<string>;
10
- /** @deprecated TODO: provide alternative. */
11
- params?: {
12
- fromDisplayName?: string;
13
- fromTag?: string;
14
- fromUri?: string | URI;
15
- toDisplayName?: string;
16
- toUri?: string | URI;
17
- };
18
- }
@@ -1,89 +0,0 @@
1
- import { Body, C, Grammar, Logger, OutgoingRequestMessage, URI } from "../core";
2
- import { MessagerMessageOptions } from "./messager-message-options";
3
- import { MessagerOptions } from "./messager-options";
4
- import { UserAgent } from "./user-agent";
5
-
6
- /**
7
- * A messager sends a {@link Message} (outgoing MESSAGE).
8
- * @public
9
- */
10
- export class Messager {
11
- private logger: Logger;
12
- private request: OutgoingRequestMessage;
13
- private userAgent: UserAgent;
14
-
15
- /**
16
- * Constructs a new instance of the `Messager` class.
17
- * @param userAgent - User agent. See {@link UserAgent} for details.
18
- * @param targetURI - Request URI identifying the target of the message.
19
- * @param content - Content for the body of the message.
20
- * @param contentType - Content type of the body of the message.
21
- * @param options - Options bucket. See {@link MessagerOptions} for details.
22
- */
23
- public constructor(
24
- userAgent: UserAgent,
25
- targetURI: URI,
26
- content: string,
27
- contentType = "text/plain",
28
- options: MessagerOptions = {}
29
- ) {
30
- // Logger
31
- this.logger = userAgent.getLogger("sip.Messager");
32
-
33
- // Default options params
34
- options.params = options.params || {};
35
-
36
- // URIs
37
- let fromURI: URI | undefined = userAgent.userAgentCore.configuration.aor;
38
- if (options.params.fromUri) {
39
- fromURI =
40
- typeof options.params.fromUri === "string" ? Grammar.URIParse(options.params.fromUri) : options.params.fromUri;
41
- }
42
- if (!fromURI) {
43
- throw new TypeError("Invalid from URI: " + options.params.fromUri);
44
- }
45
- let toURI: URI | undefined = targetURI;
46
- if (options.params.toUri) {
47
- toURI = typeof options.params.toUri === "string" ? Grammar.URIParse(options.params.toUri) : options.params.toUri;
48
- }
49
- if (!toURI) {
50
- throw new TypeError("Invalid to URI: " + options.params.toUri);
51
- }
52
-
53
- // Message params
54
- const params = options.params ? { ...options.params } : {};
55
-
56
- // Extra headers
57
- const extraHeaders = (options.extraHeaders || []).slice();
58
-
59
- // Body
60
- const contentDisposition = "render";
61
- const body: Body = {
62
- contentDisposition,
63
- contentType,
64
- content
65
- };
66
-
67
- // Build the request
68
- this.request = userAgent.userAgentCore.makeOutgoingRequestMessage(
69
- C.MESSAGE,
70
- targetURI,
71
- fromURI,
72
- toURI,
73
- params,
74
- extraHeaders,
75
- body
76
- );
77
-
78
- // User agent
79
- this.userAgent = userAgent;
80
- }
81
-
82
- /**
83
- * Send the message.
84
- */
85
- public message(options: MessagerMessageOptions = {}): Promise<void> {
86
- this.userAgent.userAgentCore.request(this.request, options.requestDelegate);
87
- return Promise.resolve();
88
- }
89
- }
@@ -1,27 +0,0 @@
1
- import { IncomingNotifyRequest, IncomingRequestMessage, ResponseOptions } from "../core";
2
-
3
- /**
4
- * A notification of an event (incoming NOTIFY).
5
- * @public
6
- */
7
- export class Notification {
8
- /** @internal */
9
- public constructor(private incomingNotifyRequest: IncomingNotifyRequest) {}
10
-
11
- /** Incoming NOTIFY request message. */
12
- public get request(): IncomingRequestMessage {
13
- return this.incomingNotifyRequest.message;
14
- }
15
-
16
- /** Accept the request. */
17
- public accept(options?: ResponseOptions): Promise<void> {
18
- this.incomingNotifyRequest.accept(options);
19
- return Promise.resolve();
20
- }
21
-
22
- /** Reject the request. */
23
- public reject(options?: ResponseOptions): Promise<void> {
24
- this.incomingNotifyRequest.reject(options);
25
- return Promise.resolve();
26
- }
27
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * TODO: This is currently just a placeholder.
3
- * Notifier is the peer of a Subscriber.
4
- * That is, a Notifier sends NOTIFY requests.
5
- * @internal
6
- */
7
- export class Notifier {}
@@ -1,34 +0,0 @@
1
- import { URI } from "../core";
2
-
3
- /**
4
- * Options for {@link Publisher} constructor.
5
- * @public
6
- */
7
- export interface PublisherOptions {
8
- /** @deprecated TODO: provide alternative. */
9
- body?: string;
10
- /** @deprecated TODO: provide alternative. */
11
- contentType?: string;
12
- /**
13
- * Expire value for the published event.
14
- * @defaultValue 3600
15
- */
16
- expires?: number;
17
- /**
18
- * Array of extra headers added to the PUBLISH request message.
19
- */
20
- extraHeaders?: Array<string>;
21
- /** @deprecated TODO: provide alternative. */
22
- params?: {
23
- fromDisplayName?: string;
24
- fromTag?: string;
25
- fromUri?: URI;
26
- toDisplayName?: string;
27
- toUri?: URI;
28
- };
29
- /**
30
- * If set true, UA will gracefully unpublish for the event on UA close.
31
- * @defaultValue true
32
- */
33
- unpublishOnClose?: boolean;
34
- }
@@ -1,6 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-empty-interface */
2
- /**
3
- * Options for {@link Publisher.publish}.
4
- * @public
5
- */
6
- export interface PublisherPublishOptions {}
@@ -1,21 +0,0 @@
1
- /**
2
- * {@link Publisher} state.
3
- * @remarks
4
- * The {@link Publisher} behaves in a deterministic manner according to the following
5
- * Finite State Machine (FSM).
6
- * ```txt
7
- * __________________________________________
8
- * | __________________________ |
9
- * Publisher | | v v
10
- * Constructed -> Initial -> Published -> Unpublished -> Terminated
11
- * | ^____________| ^
12
- * |______________________________|
13
- * ```
14
- * @public
15
- */
16
- export enum PublisherState {
17
- Initial = "Initial",
18
- Published = "Published",
19
- Unpublished = "Unpublished",
20
- Terminated = "Terminated"
21
- }
@@ -1,6 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-empty-interface */
2
- /**
3
- * Options for {@link Publisher.unpublish}.
4
- * @public
5
- */
6
- export interface PublisherUnpublishOptions {}
@@ -1,418 +0,0 @@
1
- import {
2
- Body,
3
- C,
4
- fromBodyLegacy,
5
- IncomingResponseMessage,
6
- Logger,
7
- OutgoingPublishRequest,
8
- OutgoingRequestMessage,
9
- URI
10
- } from "../core";
11
- import { Emitter, EmitterImpl } from "./emitter";
12
- import { PublisherOptions } from "./publisher-options";
13
- import { PublisherPublishOptions } from "./publisher-publish-options";
14
- import { PublisherState } from "./publisher-state";
15
- import { PublisherUnpublishOptions } from "./publisher-unpublish-options";
16
- import { BodyAndContentType } from "./session-description-handler";
17
- import { UserAgent } from "./user-agent";
18
-
19
- /**
20
- * A publisher publishes a publication (outgoing PUBLISH).
21
- * @public
22
- */
23
- export class Publisher {
24
- private event: string;
25
- private options: PublisherOptions;
26
- private target: URI;
27
- private pubRequestBody: string | undefined;
28
- private pubRequestExpires: number;
29
- private pubRequestEtag: string | undefined;
30
- private publishRefreshTimer: number | undefined;
31
-
32
- private disposed = false;
33
- private id: string;
34
- private logger: Logger;
35
- private request: OutgoingRequestMessage;
36
- private userAgent: UserAgent;
37
-
38
- /** The publication state. */
39
- private _state: PublisherState = PublisherState.Initial;
40
- /** Emits when the registration state changes. */
41
- private _stateEventEmitter: EmitterImpl<PublisherState>;
42
-
43
- /**
44
- * Constructs a new instance of the `Publisher` class.
45
- *
46
- * @param userAgent - User agent. See {@link UserAgent} for details.
47
- * @param targetURI - Request URI identifying the target of the message.
48
- * @param eventType - The event type identifying the published document.
49
- * @param options - Options bucket. See {@link PublisherOptions} for details.
50
- */
51
- public constructor(userAgent: UserAgent, targetURI: URI, eventType: string, options: PublisherOptions = {}) {
52
- // state emitter
53
- this._stateEventEmitter = new EmitterImpl<PublisherState>();
54
-
55
- this.userAgent = userAgent;
56
-
57
- options.extraHeaders = (options.extraHeaders || []).slice();
58
- options.contentType = options.contentType || "text/plain";
59
-
60
- if (typeof options.expires !== "number" || options.expires % 1 !== 0) {
61
- options.expires = 3600;
62
- } else {
63
- options.expires = Number(options.expires);
64
- }
65
-
66
- if (typeof options.unpublishOnClose !== "boolean") {
67
- options.unpublishOnClose = true;
68
- }
69
-
70
- this.target = targetURI;
71
- this.event = eventType;
72
- this.options = options;
73
- this.pubRequestExpires = options.expires;
74
-
75
- this.logger = userAgent.getLogger("sip.Publisher");
76
-
77
- const params = options.params || {};
78
- const fromURI = params.fromUri ? params.fromUri : userAgent.userAgentCore.configuration.aor;
79
- const toURI = params.toUri ? params.toUri : targetURI;
80
- let body: Body | undefined;
81
- if (options.body && options.contentType) {
82
- const contentDisposition = "render";
83
- const contentType = options.contentType;
84
- const content = options.body;
85
- body = {
86
- contentDisposition,
87
- contentType,
88
- content
89
- };
90
- }
91
- const extraHeaders = (options.extraHeaders || []).slice();
92
-
93
- // Build the request
94
- this.request = userAgent.userAgentCore.makeOutgoingRequestMessage(
95
- C.PUBLISH,
96
- targetURI,
97
- fromURI,
98
- toURI,
99
- params,
100
- extraHeaders,
101
- body
102
- );
103
-
104
- // Identifier
105
- this.id = this.target.toString() + ":" + this.event;
106
-
107
- // Add to the user agent's publisher collection.
108
- this.userAgent._publishers[this.id] = this;
109
- }
110
-
111
- /**
112
- * Destructor.
113
- */
114
- public dispose(): Promise<void> {
115
- if (this.disposed) {
116
- return Promise.resolve();
117
- }
118
- this.disposed = true;
119
- this.logger.log(`Publisher ${this.id} in state ${this.state} is being disposed`);
120
-
121
- // Remove from the user agent's publisher collection
122
- delete this.userAgent._publishers[this.id];
123
-
124
- // Send unpublish, if requested
125
- if (this.options.unpublishOnClose && this.state === PublisherState.Published) {
126
- return this.unpublish();
127
- }
128
-
129
- if (this.publishRefreshTimer) {
130
- clearTimeout(this.publishRefreshTimer);
131
- this.publishRefreshTimer = undefined;
132
- }
133
-
134
- this.pubRequestBody = undefined;
135
- this.pubRequestExpires = 0;
136
- this.pubRequestEtag = undefined;
137
-
138
- return Promise.resolve();
139
- }
140
-
141
- /** The publication state. */
142
- public get state(): PublisherState {
143
- return this._state;
144
- }
145
-
146
- /** Emits when the publisher state changes. */
147
- public get stateChange(): Emitter<PublisherState> {
148
- return this._stateEventEmitter;
149
- }
150
-
151
- /**
152
- * Publish.
153
- * @param content - Body to publish
154
- */
155
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
156
- public publish(content: string, options: PublisherPublishOptions = {}): Promise<void> {
157
- // Clean up before the run
158
- if (this.publishRefreshTimer) {
159
- clearTimeout(this.publishRefreshTimer);
160
- this.publishRefreshTimer = undefined;
161
- }
162
-
163
- // is Initial or Modify request
164
- this.options.body = content;
165
- this.pubRequestBody = this.options.body;
166
-
167
- if (this.pubRequestExpires === 0) {
168
- // This is Initial request after unpublish
169
- if (this.options.expires === undefined) {
170
- throw new Error("Expires undefined.");
171
- }
172
- this.pubRequestExpires = this.options.expires;
173
- this.pubRequestEtag = undefined;
174
- }
175
-
176
- this.sendPublishRequest();
177
-
178
- return Promise.resolve();
179
- }
180
-
181
- /**
182
- * Unpublish.
183
- */
184
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
185
- public unpublish(options: PublisherUnpublishOptions = {}): Promise<void> {
186
- // Clean up before the run
187
- if (this.publishRefreshTimer) {
188
- clearTimeout(this.publishRefreshTimer);
189
- this.publishRefreshTimer = undefined;
190
- }
191
-
192
- this.pubRequestBody = undefined;
193
- this.pubRequestExpires = 0;
194
-
195
- if (this.pubRequestEtag !== undefined) {
196
- this.sendPublishRequest();
197
- }
198
-
199
- return Promise.resolve();
200
- }
201
-
202
- /** @internal */
203
- protected receiveResponse(response: IncomingResponseMessage): void {
204
- const statusCode: number = response.statusCode || 0;
205
-
206
- switch (true) {
207
- case /^1[0-9]{2}$/.test(statusCode.toString()):
208
- break;
209
- case /^2[0-9]{2}$/.test(statusCode.toString()):
210
- // Set SIP-Etag
211
- if (response.hasHeader("SIP-ETag")) {
212
- this.pubRequestEtag = response.getHeader("SIP-ETag");
213
- } else {
214
- this.logger.warn("SIP-ETag header missing in a 200-class response to PUBLISH");
215
- }
216
-
217
- // Update Expire
218
- if (response.hasHeader("Expires")) {
219
- const expires = Number(response.getHeader("Expires"));
220
- if (typeof expires === "number" && expires >= 0 && expires <= this.pubRequestExpires) {
221
- this.pubRequestExpires = expires;
222
- } else {
223
- this.logger.warn("Bad Expires header in a 200-class response to PUBLISH");
224
- }
225
- } else {
226
- this.logger.warn("Expires header missing in a 200-class response to PUBLISH");
227
- }
228
-
229
- if (this.pubRequestExpires !== 0) {
230
- // Schedule refresh
231
- this.publishRefreshTimer = window.setTimeout(() => this.refreshRequest(), this.pubRequestExpires * 900);
232
- this.stateTransition(PublisherState.Published);
233
- } else {
234
- this.stateTransition(PublisherState.Unpublished);
235
- }
236
- break;
237
- case /^412$/.test(statusCode.toString()):
238
- // 412 code means no matching ETag - possibly the PUBLISH expired
239
- // Resubmit as new request, if the current request is not a "remove"
240
-
241
- if (this.pubRequestEtag !== undefined && this.pubRequestExpires !== 0) {
242
- this.logger.warn("412 response to PUBLISH, recovering");
243
- this.pubRequestEtag = undefined;
244
- if (this.options.body === undefined) {
245
- throw new Error("Body undefined.");
246
- }
247
- this.publish(this.options.body);
248
- } else {
249
- this.logger.warn("412 response to PUBLISH, recovery failed");
250
- this.pubRequestExpires = 0;
251
- this.stateTransition(PublisherState.Unpublished);
252
- this.stateTransition(PublisherState.Terminated);
253
- }
254
- break;
255
- case /^423$/.test(statusCode.toString()):
256
- // 423 code means we need to adjust the Expires interval up
257
- if (this.pubRequestExpires !== 0 && response.hasHeader("Min-Expires")) {
258
- const minExpires = Number(response.getHeader("Min-Expires"));
259
- if (typeof minExpires === "number" || minExpires > this.pubRequestExpires) {
260
- this.logger.warn("423 code in response to PUBLISH, adjusting the Expires value and trying to recover");
261
- this.pubRequestExpires = minExpires;
262
- if (this.options.body === undefined) {
263
- throw new Error("Body undefined.");
264
- }
265
- this.publish(this.options.body);
266
- } else {
267
- this.logger.warn("Bad 423 response Min-Expires header received for PUBLISH");
268
- this.pubRequestExpires = 0;
269
- this.stateTransition(PublisherState.Unpublished);
270
- this.stateTransition(PublisherState.Terminated);
271
- }
272
- } else {
273
- this.logger.warn("423 response to PUBLISH, recovery failed");
274
- this.pubRequestExpires = 0;
275
- this.stateTransition(PublisherState.Unpublished);
276
- this.stateTransition(PublisherState.Terminated);
277
- }
278
- break;
279
- default:
280
- this.pubRequestExpires = 0;
281
- this.stateTransition(PublisherState.Unpublished);
282
- this.stateTransition(PublisherState.Terminated);
283
- break;
284
- }
285
-
286
- // Do the cleanup
287
- if (this.pubRequestExpires === 0) {
288
- if (this.publishRefreshTimer) {
289
- clearTimeout(this.publishRefreshTimer);
290
- this.publishRefreshTimer = undefined;
291
- }
292
-
293
- this.pubRequestBody = undefined;
294
- this.pubRequestEtag = undefined;
295
- }
296
- }
297
-
298
- /** @internal */
299
- protected send(): OutgoingPublishRequest {
300
- return this.userAgent.userAgentCore.publish(this.request, {
301
- onAccept: (response): void => this.receiveResponse(response.message),
302
- onProgress: (response): void => this.receiveResponse(response.message),
303
- onRedirect: (response): void => this.receiveResponse(response.message),
304
- onReject: (response): void => this.receiveResponse(response.message),
305
- onTrying: (response): void => this.receiveResponse(response.message)
306
- });
307
- }
308
-
309
- private refreshRequest(): void {
310
- // Clean up before the run
311
- if (this.publishRefreshTimer) {
312
- clearTimeout(this.publishRefreshTimer);
313
- this.publishRefreshTimer = undefined;
314
- }
315
-
316
- // This is Refresh request
317
- this.pubRequestBody = undefined;
318
-
319
- if (this.pubRequestEtag === undefined) {
320
- throw new Error("Etag undefined");
321
- }
322
-
323
- if (this.pubRequestExpires === 0) {
324
- throw new Error("Expires zero");
325
- }
326
-
327
- this.sendPublishRequest();
328
- }
329
-
330
- private sendPublishRequest(): OutgoingPublishRequest {
331
- const reqOptions = { ...this.options };
332
-
333
- reqOptions.extraHeaders = (this.options.extraHeaders || []).slice();
334
-
335
- reqOptions.extraHeaders.push("Event: " + this.event);
336
- reqOptions.extraHeaders.push("Expires: " + this.pubRequestExpires);
337
-
338
- if (this.pubRequestEtag !== undefined) {
339
- reqOptions.extraHeaders.push("SIP-If-Match: " + this.pubRequestEtag);
340
- }
341
-
342
- const ruri = this.target;
343
- const params = this.options.params || {};
344
- let bodyAndContentType: BodyAndContentType | undefined;
345
- if (this.pubRequestBody !== undefined) {
346
- if (this.options.contentType === undefined) {
347
- throw new Error("Content type undefined.");
348
- }
349
- bodyAndContentType = {
350
- body: this.pubRequestBody,
351
- contentType: this.options.contentType
352
- };
353
- }
354
- let body: Body | undefined;
355
- if (bodyAndContentType) {
356
- body = fromBodyLegacy(bodyAndContentType);
357
- }
358
-
359
- this.request = this.userAgent.userAgentCore.makeOutgoingRequestMessage(
360
- C.PUBLISH,
361
- ruri,
362
- params.fromUri ? params.fromUri : this.userAgent.userAgentCore.configuration.aor,
363
- params.toUri ? params.toUri : this.target,
364
- params,
365
- reqOptions.extraHeaders,
366
- body
367
- );
368
-
369
- return this.send();
370
- }
371
-
372
- /**
373
- * Transition publication state.
374
- */
375
- private stateTransition(newState: PublisherState): void {
376
- const invalidTransition = (): void => {
377
- throw new Error(`Invalid state transition from ${this._state} to ${newState}`);
378
- };
379
-
380
- // Validate transition
381
- switch (this._state) {
382
- case PublisherState.Initial:
383
- if (
384
- newState !== PublisherState.Published &&
385
- newState !== PublisherState.Unpublished &&
386
- newState !== PublisherState.Terminated
387
- ) {
388
- invalidTransition();
389
- }
390
- break;
391
- case PublisherState.Published:
392
- if (newState !== PublisherState.Unpublished && newState !== PublisherState.Terminated) {
393
- invalidTransition();
394
- }
395
- break;
396
- case PublisherState.Unpublished:
397
- if (newState !== PublisherState.Published && newState !== PublisherState.Terminated) {
398
- invalidTransition();
399
- }
400
- break;
401
- case PublisherState.Terminated:
402
- invalidTransition();
403
- break;
404
- default:
405
- throw new Error("Unrecognized state.");
406
- }
407
-
408
- // Transition
409
- this._state = newState;
410
- this.logger.log(`Publication transitioned to state ${this._state}`);
411
- this._stateEventEmitter.emit(this._state);
412
-
413
- // Dispose
414
- if (newState === PublisherState.Terminated) {
415
- this.dispose();
416
- }
417
- }
418
- }