@ethora/chat-component-rn 26.10.10 → 26.10.11

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 (483) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +125 -0
  3. package/lib/commonjs/booking/index.js +44 -0
  4. package/lib/commonjs/booking/index.js.map +1 -0
  5. package/lib/commonjs/booking/pendingScheduledCall.js +275 -0
  6. package/lib/commonjs/booking/pendingScheduledCall.js.map +1 -0
  7. package/lib/commonjs/booking/scheduleForm.js +91 -0
  8. package/lib/commonjs/booking/scheduleForm.js.map +1 -0
  9. package/lib/commonjs/booking/scheduledCall.js +141 -0
  10. package/lib/commonjs/booking/scheduledCall.js.map +1 -0
  11. package/lib/commonjs/booking/scheduledCallActions.js +128 -0
  12. package/lib/commonjs/booking/scheduledCallActions.js.map +1 -0
  13. package/lib/commonjs/booking/scheduledCallLink.js +143 -0
  14. package/lib/commonjs/booking/scheduledCallLink.js.map +1 -0
  15. package/lib/commonjs/booking/scheduledCallStore.js +64 -0
  16. package/lib/commonjs/booking/scheduledCallStore.js.map +1 -0
  17. package/lib/commonjs/booking/startRoomCall.js +84 -0
  18. package/lib/commonjs/booking/startRoomCall.js.map +1 -0
  19. package/lib/commonjs/calls/callBusy.js +18 -0
  20. package/lib/commonjs/calls/callBusy.js.map +1 -0
  21. package/lib/commonjs/calls/callDisplay.js +73 -0
  22. package/lib/commonjs/calls/callDisplay.js.map +1 -0
  23. package/lib/commonjs/calls/callMode.js +175 -0
  24. package/lib/commonjs/calls/callMode.js.map +1 -0
  25. package/lib/commonjs/calls/declineReport.js +20 -0
  26. package/lib/commonjs/calls/declineReport.js.map +1 -0
  27. package/lib/commonjs/calls/p2p/P2PCallController.js +724 -0
  28. package/lib/commonjs/calls/p2p/P2PCallController.js.map +1 -0
  29. package/lib/commonjs/calls/p2p/icePolicy.js +107 -0
  30. package/lib/commonjs/calls/p2p/icePolicy.js.map +1 -0
  31. package/lib/commonjs/calls/p2p/negotiator.js +202 -0
  32. package/lib/commonjs/calls/p2p/negotiator.js.map +1 -0
  33. package/lib/commonjs/calls/p2p/p2pRuntime.js +147 -0
  34. package/lib/commonjs/calls/p2p/p2pRuntime.js.map +1 -0
  35. package/lib/commonjs/calls/p2p/signalInbox.js +98 -0
  36. package/lib/commonjs/calls/p2p/signalInbox.js.map +1 -0
  37. package/lib/commonjs/calls/p2p/signalStanza.js +141 -0
  38. package/lib/commonjs/calls/p2p/signalStanza.js.map +1 -0
  39. package/lib/commonjs/calls/p2p/webrtcRuntime.js +53 -0
  40. package/lib/commonjs/calls/p2p/webrtcRuntime.js.map +1 -0
  41. package/lib/commonjs/calls/senderTrust.js +43 -0
  42. package/lib/commonjs/calls/senderTrust.js.map +1 -0
  43. package/lib/commonjs/calls/startCall.js +51 -0
  44. package/lib/commonjs/calls/startCall.js.map +1 -0
  45. package/lib/commonjs/components/Booking/BookingIcons.js +55 -0
  46. package/lib/commonjs/components/Booking/BookingIcons.js.map +1 -0
  47. package/lib/commonjs/components/Booking/ScheduleCallButton.js +64 -0
  48. package/lib/commonjs/components/Booking/ScheduleCallButton.js.map +1 -0
  49. package/lib/commonjs/components/Booking/ScheduleCallSheet.js +351 -0
  50. package/lib/commonjs/components/Booking/ScheduleCallSheet.js.map +1 -0
  51. package/lib/commonjs/components/Booking/ScheduledCallCard.js +203 -0
  52. package/lib/commonjs/components/Booking/ScheduledCallCard.js.map +1 -0
  53. package/lib/commonjs/components/Booking/ScheduledCallHost.js +23 -0
  54. package/lib/commonjs/components/Booking/ScheduledCallHost.js.map +1 -0
  55. package/lib/commonjs/components/Booking/ScheduledCallMessage.js +55 -0
  56. package/lib/commonjs/components/Booking/ScheduledCallMessage.js.map +1 -0
  57. package/lib/commonjs/components/Booking/ScheduledCallPreJoin.js +235 -0
  58. package/lib/commonjs/components/Booking/ScheduledCallPreJoin.js.map +1 -0
  59. package/lib/commonjs/components/Booking/bookingShared.js +305 -0
  60. package/lib/commonjs/components/Booking/bookingShared.js.map +1 -0
  61. package/lib/commonjs/components/MainComponents/ChatHeader.js +2 -1
  62. package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
  63. package/lib/commonjs/components/MainComponents/LanguageSelectorButton.js +5 -2
  64. package/lib/commonjs/components/MainComponents/LanguageSelectorButton.js.map +1 -1
  65. package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js +6 -3
  66. package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js.map +1 -1
  67. package/lib/commonjs/components/MainComponents/MessageContainer.js +13 -0
  68. package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
  69. package/lib/commonjs/components/MainComponents/ReduxWrapper.js +10 -0
  70. package/lib/commonjs/components/MainComponents/ReduxWrapper.js.map +1 -1
  71. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +19 -15
  72. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -1
  73. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +15 -8
  74. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  75. package/lib/commonjs/components/Modals/UserSettingsModal/LanguageCard.js +1 -1
  76. package/lib/commonjs/components/Modals/UserSettingsModal/LanguageCard.js.map +1 -1
  77. package/lib/commonjs/components/VideoCalls/ActiveCallBar.js +3 -2
  78. package/lib/commonjs/components/VideoCalls/ActiveCallBar.js.map +1 -1
  79. package/lib/commonjs/components/VideoCalls/CallButtons.js +19 -11
  80. package/lib/commonjs/components/VideoCalls/CallButtons.js.map +1 -1
  81. package/lib/commonjs/components/VideoCalls/CallControlBar.js +119 -0
  82. package/lib/commonjs/components/VideoCalls/CallControlBar.js.map +1 -0
  83. package/lib/commonjs/components/VideoCalls/CallVideo.js +49 -0
  84. package/lib/commonjs/components/VideoCalls/CallVideo.js.map +1 -0
  85. package/lib/commonjs/components/VideoCalls/GroupCallView.js +281 -0
  86. package/lib/commonjs/components/VideoCalls/GroupCallView.js.map +1 -0
  87. package/lib/commonjs/components/VideoCalls/P2PCallRunner.js +151 -0
  88. package/lib/commonjs/components/VideoCalls/P2PCallRunner.js.map +1 -0
  89. package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js +38 -14
  90. package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js.map +1 -1
  91. package/lib/commonjs/components/VideoCalls/VideoCallSession.js +57 -128
  92. package/lib/commonjs/components/VideoCalls/VideoCallSession.js.map +1 -1
  93. package/lib/commonjs/components/VideoCalls/callActions.js +3 -0
  94. package/lib/commonjs/components/VideoCalls/callActions.js.map +1 -1
  95. package/lib/commonjs/components/VideoCalls/callElapsed.js +38 -0
  96. package/lib/commonjs/components/VideoCalls/callElapsed.js.map +1 -0
  97. package/lib/commonjs/components/VideoCalls/callLive.js +15 -0
  98. package/lib/commonjs/components/VideoCalls/callLive.js.map +1 -0
  99. package/lib/commonjs/components/VideoCalls/callSessionController.js +81 -24
  100. package/lib/commonjs/components/VideoCalls/callSessionController.js.map +1 -1
  101. package/lib/commonjs/components/VideoCalls/callSessionTypes.js +41 -0
  102. package/lib/commonjs/components/VideoCalls/callSessionTypes.js.map +1 -0
  103. package/lib/commonjs/components/VideoCalls/groupLayout.js +43 -0
  104. package/lib/commonjs/components/VideoCalls/groupLayout.js.map +1 -0
  105. package/lib/commonjs/components/VideoCalls/p2pCallSession.js +272 -0
  106. package/lib/commonjs/components/VideoCalls/p2pCallSession.js.map +1 -0
  107. package/lib/commonjs/components/VideoCalls/useCallKeep.js +7 -2
  108. package/lib/commonjs/components/VideoCalls/useCallKeep.js.map +1 -1
  109. package/lib/commonjs/components/VideoCalls/useOngoingCallNotification.js +2 -1
  110. package/lib/commonjs/components/VideoCalls/useOngoingCallNotification.js.map +1 -1
  111. package/lib/commonjs/context/xmppProvider.js +2 -1
  112. package/lib/commonjs/context/xmppProvider.js.map +1 -1
  113. package/lib/commonjs/helpers/callPush.js +3 -1
  114. package/lib/commonjs/helpers/callPush.js.map +1 -1
  115. package/lib/commonjs/helpers/incomingCallFromPush.js +63 -7
  116. package/lib/commonjs/helpers/incomingCallFromPush.js.map +1 -1
  117. package/lib/commonjs/helpers/pushPayload.js +5 -0
  118. package/lib/commonjs/helpers/pushPayload.js.map +1 -1
  119. package/lib/commonjs/helpers/reportRoom.js +76 -0
  120. package/lib/commonjs/helpers/reportRoom.js.map +1 -0
  121. package/lib/commonjs/i18n/strings.js +444 -0
  122. package/lib/commonjs/i18n/strings.js.map +1 -1
  123. package/lib/commonjs/main.js +93 -0
  124. package/lib/commonjs/main.js.map +1 -1
  125. package/lib/commonjs/networking/api-requests/callState.api.js +75 -0
  126. package/lib/commonjs/networking/api-requests/callState.api.js.map +1 -0
  127. package/lib/commonjs/networking/api-requests/push.api.js +29 -6
  128. package/lib/commonjs/networking/api-requests/push.api.js.map +1 -1
  129. package/lib/commonjs/networking/api-requests/rooms.api.js +8 -2
  130. package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
  131. package/lib/commonjs/networking/api-requests/scheduledCalls.api.js +141 -0
  132. package/lib/commonjs/networking/api-requests/scheduledCalls.api.js.map +1 -0
  133. package/lib/commonjs/networking/callTokenStanza.js +210 -50
  134. package/lib/commonjs/networking/callTokenStanza.js.map +1 -1
  135. package/lib/commonjs/roomStore/callSlice.js +59 -4
  136. package/lib/commonjs/roomStore/callSlice.js.map +1 -1
  137. package/lib/commonjs/services/appBadge.js +80 -0
  138. package/lib/commonjs/services/appBadge.js.map +1 -0
  139. package/lib/commonjs/services/languageSettings.js +47 -15
  140. package/lib/commonjs/services/languageSettings.js.map +1 -1
  141. package/lib/commonjs/services/pushRegistration.js +21 -5
  142. package/lib/commonjs/services/pushRegistration.js.map +1 -1
  143. package/lib/commonjs/version.js +1 -1
  144. package/lib/module/booking/index.js +5 -0
  145. package/lib/module/booking/index.js.map +1 -0
  146. package/lib/module/booking/pendingScheduledCall.js +261 -0
  147. package/lib/module/booking/pendingScheduledCall.js.map +1 -0
  148. package/lib/module/booking/scheduleForm.js +79 -0
  149. package/lib/module/booking/scheduleForm.js.map +1 -0
  150. package/lib/module/booking/scheduledCall.js +129 -0
  151. package/lib/module/booking/scheduledCall.js.map +1 -0
  152. package/lib/module/booking/scheduledCallActions.js +118 -0
  153. package/lib/module/booking/scheduledCallActions.js.map +1 -0
  154. package/lib/module/booking/scheduledCallLink.js +136 -0
  155. package/lib/module/booking/scheduledCallLink.js.map +1 -0
  156. package/lib/module/booking/scheduledCallStore.js +60 -0
  157. package/lib/module/booking/scheduledCallStore.js.map +1 -0
  158. package/lib/module/booking/startRoomCall.js +80 -0
  159. package/lib/module/booking/startRoomCall.js.map +1 -0
  160. package/lib/module/calls/callBusy.js +13 -0
  161. package/lib/module/calls/callBusy.js.map +1 -0
  162. package/lib/module/calls/callDisplay.js +65 -0
  163. package/lib/module/calls/callDisplay.js.map +1 -0
  164. package/lib/module/calls/callMode.js +168 -0
  165. package/lib/module/calls/callMode.js.map +1 -0
  166. package/lib/module/calls/declineReport.js +16 -0
  167. package/lib/module/calls/declineReport.js.map +1 -0
  168. package/lib/module/calls/p2p/P2PCallController.js +718 -0
  169. package/lib/module/calls/p2p/P2PCallController.js.map +1 -0
  170. package/lib/module/calls/p2p/icePolicy.js +102 -0
  171. package/lib/module/calls/p2p/icePolicy.js.map +1 -0
  172. package/lib/module/calls/p2p/negotiator.js +197 -0
  173. package/lib/module/calls/p2p/negotiator.js.map +1 -0
  174. package/lib/module/calls/p2p/p2pRuntime.js +137 -0
  175. package/lib/module/calls/p2p/p2pRuntime.js.map +1 -0
  176. package/lib/module/calls/p2p/signalInbox.js +93 -0
  177. package/lib/module/calls/p2p/signalInbox.js.map +1 -0
  178. package/lib/module/calls/p2p/signalStanza.js +135 -0
  179. package/lib/module/calls/p2p/signalStanza.js.map +1 -0
  180. package/lib/module/calls/p2p/webrtcRuntime.js +46 -0
  181. package/lib/module/calls/p2p/webrtcRuntime.js.map +1 -0
  182. package/lib/module/calls/senderTrust.js +38 -0
  183. package/lib/module/calls/senderTrust.js.map +1 -0
  184. package/lib/module/calls/startCall.js +47 -0
  185. package/lib/module/calls/startCall.js.map +1 -0
  186. package/lib/module/components/Booking/BookingIcons.js +48 -0
  187. package/lib/module/components/Booking/BookingIcons.js.map +1 -0
  188. package/lib/module/components/Booking/ScheduleCallButton.js +59 -0
  189. package/lib/module/components/Booking/ScheduleCallButton.js.map +1 -0
  190. package/lib/module/components/Booking/ScheduleCallSheet.js +345 -0
  191. package/lib/module/components/Booking/ScheduleCallSheet.js.map +1 -0
  192. package/lib/module/components/Booking/ScheduledCallCard.js +197 -0
  193. package/lib/module/components/Booking/ScheduledCallCard.js.map +1 -0
  194. package/lib/module/components/Booking/ScheduledCallHost.js +18 -0
  195. package/lib/module/components/Booking/ScheduledCallHost.js.map +1 -0
  196. package/lib/module/components/Booking/ScheduledCallMessage.js +48 -0
  197. package/lib/module/components/Booking/ScheduledCallMessage.js.map +1 -0
  198. package/lib/module/components/Booking/ScheduledCallPreJoin.js +229 -0
  199. package/lib/module/components/Booking/ScheduledCallPreJoin.js.map +1 -0
  200. package/lib/module/components/Booking/bookingShared.js +291 -0
  201. package/lib/module/components/Booking/bookingShared.js.map +1 -0
  202. package/lib/module/components/MainComponents/ChatHeader.js +2 -1
  203. package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
  204. package/lib/module/components/MainComponents/LanguageSelectorButton.js +5 -2
  205. package/lib/module/components/MainComponents/LanguageSelectorButton.js.map +1 -1
  206. package/lib/module/components/MainComponents/LanguageSelectorModal.js +7 -4
  207. package/lib/module/components/MainComponents/LanguageSelectorModal.js.map +1 -1
  208. package/lib/module/components/MainComponents/MessageContainer.js +13 -0
  209. package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
  210. package/lib/module/components/MainComponents/ReduxWrapper.js +10 -0
  211. package/lib/module/components/MainComponents/ReduxWrapper.js.map +1 -1
  212. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +21 -15
  213. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -1
  214. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +17 -10
  215. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  216. package/lib/module/components/Modals/UserSettingsModal/LanguageCard.js +1 -1
  217. package/lib/module/components/Modals/UserSettingsModal/LanguageCard.js.map +1 -1
  218. package/lib/module/components/VideoCalls/ActiveCallBar.js +3 -2
  219. package/lib/module/components/VideoCalls/ActiveCallBar.js.map +1 -1
  220. package/lib/module/components/VideoCalls/CallButtons.js +19 -11
  221. package/lib/module/components/VideoCalls/CallButtons.js.map +1 -1
  222. package/lib/module/components/VideoCalls/CallControlBar.js +113 -0
  223. package/lib/module/components/VideoCalls/CallControlBar.js.map +1 -0
  224. package/lib/module/components/VideoCalls/CallVideo.js +43 -0
  225. package/lib/module/components/VideoCalls/CallVideo.js.map +1 -0
  226. package/lib/module/components/VideoCalls/GroupCallView.js +275 -0
  227. package/lib/module/components/VideoCalls/GroupCallView.js.map +1 -0
  228. package/lib/module/components/VideoCalls/P2PCallRunner.js +147 -0
  229. package/lib/module/components/VideoCalls/P2PCallRunner.js.map +1 -0
  230. package/lib/module/components/VideoCalls/VideoCallOverlay.js +38 -14
  231. package/lib/module/components/VideoCalls/VideoCallOverlay.js.map +1 -1
  232. package/lib/module/components/VideoCalls/VideoCallSession.js +46 -127
  233. package/lib/module/components/VideoCalls/VideoCallSession.js.map +1 -1
  234. package/lib/module/components/VideoCalls/callActions.js +3 -0
  235. package/lib/module/components/VideoCalls/callActions.js.map +1 -1
  236. package/lib/module/components/VideoCalls/callElapsed.js +33 -0
  237. package/lib/module/components/VideoCalls/callElapsed.js.map +1 -0
  238. package/lib/module/components/VideoCalls/callLive.js +10 -0
  239. package/lib/module/components/VideoCalls/callLive.js.map +1 -0
  240. package/lib/module/components/VideoCalls/callSessionController.js +80 -24
  241. package/lib/module/components/VideoCalls/callSessionController.js.map +1 -1
  242. package/lib/module/components/VideoCalls/callSessionTypes.js +37 -0
  243. package/lib/module/components/VideoCalls/callSessionTypes.js.map +1 -0
  244. package/lib/module/components/VideoCalls/groupLayout.js +36 -0
  245. package/lib/module/components/VideoCalls/groupLayout.js.map +1 -0
  246. package/lib/module/components/VideoCalls/p2pCallSession.js +256 -0
  247. package/lib/module/components/VideoCalls/p2pCallSession.js.map +1 -0
  248. package/lib/module/components/VideoCalls/useCallKeep.js +8 -2
  249. package/lib/module/components/VideoCalls/useCallKeep.js.map +1 -1
  250. package/lib/module/components/VideoCalls/useOngoingCallNotification.js +2 -1
  251. package/lib/module/components/VideoCalls/useOngoingCallNotification.js.map +1 -1
  252. package/lib/module/context/xmppProvider.js +2 -1
  253. package/lib/module/context/xmppProvider.js.map +1 -1
  254. package/lib/module/helpers/callPush.js +3 -1
  255. package/lib/module/helpers/callPush.js.map +1 -1
  256. package/lib/module/helpers/incomingCallFromPush.js +63 -7
  257. package/lib/module/helpers/incomingCallFromPush.js.map +1 -1
  258. package/lib/module/helpers/pushPayload.js +5 -0
  259. package/lib/module/helpers/pushPayload.js.map +1 -1
  260. package/lib/module/helpers/reportRoom.js +70 -0
  261. package/lib/module/helpers/reportRoom.js.map +1 -0
  262. package/lib/module/i18n/strings.js +444 -0
  263. package/lib/module/i18n/strings.js.map +1 -1
  264. package/lib/module/main.js +5 -0
  265. package/lib/module/main.js.map +1 -1
  266. package/lib/module/networking/api-requests/callState.api.js +66 -0
  267. package/lib/module/networking/api-requests/callState.api.js.map +1 -0
  268. package/lib/module/networking/api-requests/push.api.js +29 -6
  269. package/lib/module/networking/api-requests/push.api.js.map +1 -1
  270. package/lib/module/networking/api-requests/rooms.api.js +8 -2
  271. package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
  272. package/lib/module/networking/api-requests/scheduledCalls.api.js +130 -0
  273. package/lib/module/networking/api-requests/scheduledCalls.api.js.map +1 -0
  274. package/lib/module/networking/callTokenStanza.js +210 -50
  275. package/lib/module/networking/callTokenStanza.js.map +1 -1
  276. package/lib/module/roomStore/callSlice.js +57 -3
  277. package/lib/module/roomStore/callSlice.js.map +1 -1
  278. package/lib/module/services/appBadge.js +74 -0
  279. package/lib/module/services/appBadge.js.map +1 -0
  280. package/lib/module/services/languageSettings.js +44 -13
  281. package/lib/module/services/languageSettings.js.map +1 -1
  282. package/lib/module/services/pushRegistration.js +21 -5
  283. package/lib/module/services/pushRegistration.js.map +1 -1
  284. package/lib/module/version.js +1 -1
  285. package/lib/typescript/booking/index.d.ts +3 -0
  286. package/lib/typescript/booking/index.d.ts.map +1 -0
  287. package/lib/typescript/booking/pendingScheduledCall.d.ts +80 -0
  288. package/lib/typescript/booking/pendingScheduledCall.d.ts.map +1 -0
  289. package/lib/typescript/booking/scheduleForm.d.ts +28 -0
  290. package/lib/typescript/booking/scheduleForm.d.ts.map +1 -0
  291. package/lib/typescript/booking/scheduledCall.d.ts +52 -0
  292. package/lib/typescript/booking/scheduledCall.d.ts.map +1 -0
  293. package/lib/typescript/booking/scheduledCallActions.d.ts +22 -0
  294. package/lib/typescript/booking/scheduledCallActions.d.ts.map +1 -0
  295. package/lib/typescript/booking/scheduledCallLink.d.ts +37 -0
  296. package/lib/typescript/booking/scheduledCallLink.d.ts.map +1 -0
  297. package/lib/typescript/booking/scheduledCallStore.d.ts +47 -0
  298. package/lib/typescript/booking/scheduledCallStore.d.ts.map +1 -0
  299. package/lib/typescript/booking/startRoomCall.d.ts +12 -0
  300. package/lib/typescript/booking/startRoomCall.d.ts.map +1 -0
  301. package/lib/typescript/calls/callBusy.d.ts +9 -0
  302. package/lib/typescript/calls/callBusy.d.ts.map +1 -0
  303. package/lib/typescript/calls/callDisplay.d.ts +23 -0
  304. package/lib/typescript/calls/callDisplay.d.ts.map +1 -0
  305. package/lib/typescript/calls/callMode.d.ts +106 -0
  306. package/lib/typescript/calls/callMode.d.ts.map +1 -0
  307. package/lib/typescript/calls/declineReport.d.ts +11 -0
  308. package/lib/typescript/calls/declineReport.d.ts.map +1 -0
  309. package/lib/typescript/calls/p2p/P2PCallController.d.ts +150 -0
  310. package/lib/typescript/calls/p2p/P2PCallController.d.ts.map +1 -0
  311. package/lib/typescript/calls/p2p/icePolicy.d.ts +37 -0
  312. package/lib/typescript/calls/p2p/icePolicy.d.ts.map +1 -0
  313. package/lib/typescript/calls/p2p/negotiator.d.ts +57 -0
  314. package/lib/typescript/calls/p2p/negotiator.d.ts.map +1 -0
  315. package/lib/typescript/calls/p2p/p2pRuntime.d.ts +41 -0
  316. package/lib/typescript/calls/p2p/p2pRuntime.d.ts.map +1 -0
  317. package/lib/typescript/calls/p2p/signalInbox.d.ts +35 -0
  318. package/lib/typescript/calls/p2p/signalInbox.d.ts.map +1 -0
  319. package/lib/typescript/calls/p2p/signalStanza.d.ts +52 -0
  320. package/lib/typescript/calls/p2p/signalStanza.d.ts.map +1 -0
  321. package/lib/typescript/calls/p2p/webrtcRuntime.d.ts +32 -0
  322. package/lib/typescript/calls/p2p/webrtcRuntime.d.ts.map +1 -0
  323. package/lib/typescript/calls/senderTrust.d.ts +8 -0
  324. package/lib/typescript/calls/senderTrust.d.ts.map +1 -0
  325. package/lib/typescript/calls/startCall.d.ts +17 -0
  326. package/lib/typescript/calls/startCall.d.ts.map +1 -0
  327. package/lib/typescript/components/Booking/BookingIcons.d.ts +9 -0
  328. package/lib/typescript/components/Booking/BookingIcons.d.ts.map +1 -0
  329. package/lib/typescript/components/Booking/ScheduleCallButton.d.ts +11 -0
  330. package/lib/typescript/components/Booking/ScheduleCallButton.d.ts.map +1 -0
  331. package/lib/typescript/components/Booking/ScheduleCallSheet.d.ts +4 -0
  332. package/lib/typescript/components/Booking/ScheduleCallSheet.d.ts.map +1 -0
  333. package/lib/typescript/components/Booking/ScheduledCallCard.d.ts +14 -0
  334. package/lib/typescript/components/Booking/ScheduledCallCard.d.ts.map +1 -0
  335. package/lib/typescript/components/Booking/ScheduledCallHost.d.ts +10 -0
  336. package/lib/typescript/components/Booking/ScheduledCallHost.d.ts.map +1 -0
  337. package/lib/typescript/components/Booking/ScheduledCallMessage.d.ts +20 -0
  338. package/lib/typescript/components/Booking/ScheduledCallMessage.d.ts.map +1 -0
  339. package/lib/typescript/components/Booking/ScheduledCallPreJoin.d.ts +8 -0
  340. package/lib/typescript/components/Booking/ScheduledCallPreJoin.d.ts.map +1 -0
  341. package/lib/typescript/components/Booking/bookingShared.d.ts +199 -0
  342. package/lib/typescript/components/Booking/bookingShared.d.ts.map +1 -0
  343. package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
  344. package/lib/typescript/components/MainComponents/LanguageSelectorButton.d.ts +3 -1
  345. package/lib/typescript/components/MainComponents/LanguageSelectorButton.d.ts.map +1 -1
  346. package/lib/typescript/components/MainComponents/LanguageSelectorModal.d.ts.map +1 -1
  347. package/lib/typescript/components/MainComponents/MessageContainer.d.ts.map +1 -1
  348. package/lib/typescript/components/MainComponents/ReduxWrapper.d.ts.map +1 -1
  349. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +1 -1
  350. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
  351. package/lib/typescript/components/Modals/UserSettingsModal/LanguageCard.d.ts.map +1 -1
  352. package/lib/typescript/components/VideoCalls/ActiveCallBar.d.ts.map +1 -1
  353. package/lib/typescript/components/VideoCalls/CallButtons.d.ts +2 -1
  354. package/lib/typescript/components/VideoCalls/CallButtons.d.ts.map +1 -1
  355. package/lib/typescript/components/VideoCalls/CallControlBar.d.ts +17 -0
  356. package/lib/typescript/components/VideoCalls/CallControlBar.d.ts.map +1 -0
  357. package/lib/typescript/components/VideoCalls/CallVideo.d.ts +23 -0
  358. package/lib/typescript/components/VideoCalls/CallVideo.d.ts.map +1 -0
  359. package/lib/typescript/components/VideoCalls/GroupCallView.d.ts +22 -0
  360. package/lib/typescript/components/VideoCalls/GroupCallView.d.ts.map +1 -0
  361. package/lib/typescript/components/VideoCalls/P2PCallRunner.d.ts +2 -0
  362. package/lib/typescript/components/VideoCalls/P2PCallRunner.d.ts.map +1 -0
  363. package/lib/typescript/components/VideoCalls/VideoCallOverlay.d.ts.map +1 -1
  364. package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts +10 -12
  365. package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts.map +1 -1
  366. package/lib/typescript/components/VideoCalls/callActions.d.ts.map +1 -1
  367. package/lib/typescript/components/VideoCalls/callElapsed.d.ts +8 -0
  368. package/lib/typescript/components/VideoCalls/callElapsed.d.ts.map +1 -0
  369. package/lib/typescript/components/VideoCalls/callLive.d.ts +9 -0
  370. package/lib/typescript/components/VideoCalls/callLive.d.ts.map +1 -0
  371. package/lib/typescript/components/VideoCalls/callSessionController.d.ts +10 -31
  372. package/lib/typescript/components/VideoCalls/callSessionController.d.ts.map +1 -1
  373. package/lib/typescript/components/VideoCalls/callSessionTypes.d.ts +60 -0
  374. package/lib/typescript/components/VideoCalls/callSessionTypes.d.ts.map +1 -0
  375. package/lib/typescript/components/VideoCalls/groupLayout.d.ts +23 -0
  376. package/lib/typescript/components/VideoCalls/groupLayout.d.ts.map +1 -0
  377. package/lib/typescript/components/VideoCalls/p2pCallSession.d.ts +31 -0
  378. package/lib/typescript/components/VideoCalls/p2pCallSession.d.ts.map +1 -0
  379. package/lib/typescript/components/VideoCalls/useCallKeep.d.ts.map +1 -1
  380. package/lib/typescript/components/VideoCalls/useOngoingCallNotification.d.ts.map +1 -1
  381. package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
  382. package/lib/typescript/helpers/callPush.d.ts +11 -1
  383. package/lib/typescript/helpers/callPush.d.ts.map +1 -1
  384. package/lib/typescript/helpers/incomingCallFromPush.d.ts.map +1 -1
  385. package/lib/typescript/helpers/pushPayload.d.ts +1 -1
  386. package/lib/typescript/helpers/pushPayload.d.ts.map +1 -1
  387. package/lib/typescript/helpers/reportRoom.d.ts +19 -0
  388. package/lib/typescript/helpers/reportRoom.d.ts.map +1 -0
  389. package/lib/typescript/i18n/strings.d.ts.map +1 -1
  390. package/lib/typescript/main.d.ts +6 -1
  391. package/lib/typescript/main.d.ts.map +1 -1
  392. package/lib/typescript/networking/api-requests/callState.api.d.ts +25 -0
  393. package/lib/typescript/networking/api-requests/callState.api.d.ts.map +1 -0
  394. package/lib/typescript/networking/api-requests/push.api.d.ts +9 -2
  395. package/lib/typescript/networking/api-requests/push.api.d.ts.map +1 -1
  396. package/lib/typescript/networking/api-requests/rooms.api.d.ts +2 -1
  397. package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
  398. package/lib/typescript/networking/api-requests/scheduledCalls.api.d.ts +86 -0
  399. package/lib/typescript/networking/api-requests/scheduledCalls.api.d.ts.map +1 -0
  400. package/lib/typescript/networking/callTokenStanza.d.ts.map +1 -1
  401. package/lib/typescript/roomStore/callSlice.d.ts +23 -1
  402. package/lib/typescript/roomStore/callSlice.d.ts.map +1 -1
  403. package/lib/typescript/services/appBadge.d.ts +3 -0
  404. package/lib/typescript/services/appBadge.d.ts.map +1 -0
  405. package/lib/typescript/services/languageSettings.d.ts +7 -0
  406. package/lib/typescript/services/languageSettings.d.ts.map +1 -1
  407. package/lib/typescript/services/pushRegistration.d.ts.map +1 -1
  408. package/lib/typescript/types/types.d.ts +67 -4
  409. package/lib/typescript/types/types.d.ts.map +1 -1
  410. package/lib/typescript/version.d.ts +1 -1
  411. package/package.json +1 -1
  412. package/src/booking/index.ts +10 -0
  413. package/src/booking/pendingScheduledCall.ts +272 -0
  414. package/src/booking/scheduleForm.ts +84 -0
  415. package/src/booking/scheduledCall.ts +163 -0
  416. package/src/booking/scheduledCallActions.ts +141 -0
  417. package/src/booking/scheduledCallLink.ts +145 -0
  418. package/src/booking/scheduledCallStore.ts +69 -0
  419. package/src/booking/startRoomCall.ts +103 -0
  420. package/src/calls/callBusy.ts +10 -0
  421. package/src/calls/callDisplay.ts +74 -0
  422. package/src/calls/callMode.ts +286 -0
  423. package/src/calls/declineReport.ts +16 -0
  424. package/src/calls/p2p/P2PCallController.ts +813 -0
  425. package/src/calls/p2p/icePolicy.ts +99 -0
  426. package/src/calls/p2p/negotiator.ts +186 -0
  427. package/src/calls/p2p/p2pRuntime.ts +164 -0
  428. package/src/calls/p2p/signalInbox.ts +117 -0
  429. package/src/calls/p2p/signalStanza.ts +205 -0
  430. package/src/calls/p2p/webrtcRuntime.ts +60 -0
  431. package/src/calls/senderTrust.ts +40 -0
  432. package/src/calls/startCall.ts +56 -0
  433. package/src/components/Booking/BookingIcons.tsx +44 -0
  434. package/src/components/Booking/ScheduleCallButton.tsx +66 -0
  435. package/src/components/Booking/ScheduleCallSheet.tsx +380 -0
  436. package/src/components/Booking/ScheduledCallCard.tsx +216 -0
  437. package/src/components/Booking/ScheduledCallHost.tsx +18 -0
  438. package/src/components/Booking/ScheduledCallMessage.tsx +62 -0
  439. package/src/components/Booking/ScheduledCallPreJoin.tsx +230 -0
  440. package/src/components/Booking/bookingShared.tsx +295 -0
  441. package/src/components/MainComponents/ChatHeader.tsx +2 -0
  442. package/src/components/MainComponents/LanguageSelectorButton.tsx +9 -2
  443. package/src/components/MainComponents/LanguageSelectorModal.tsx +10 -6
  444. package/src/components/MainComponents/MessageContainer.tsx +15 -0
  445. package/src/components/MainComponents/ReduxWrapper.tsx +10 -0
  446. package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +22 -22
  447. package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +28 -9
  448. package/src/components/Modals/UserSettingsModal/LanguageCard.tsx +9 -7
  449. package/src/components/VideoCalls/ActiveCallBar.tsx +6 -5
  450. package/src/components/VideoCalls/CallButtons.tsx +23 -12
  451. package/src/components/VideoCalls/CallControlBar.tsx +131 -0
  452. package/src/components/VideoCalls/CallVideo.tsx +59 -0
  453. package/src/components/VideoCalls/GroupCallView.tsx +324 -0
  454. package/src/components/VideoCalls/P2PCallRunner.tsx +192 -0
  455. package/src/components/VideoCalls/VideoCallOverlay.tsx +62 -17
  456. package/src/components/VideoCalls/VideoCallSession.tsx +55 -133
  457. package/src/components/VideoCalls/callActions.ts +3 -0
  458. package/src/components/VideoCalls/callElapsed.ts +27 -0
  459. package/src/components/VideoCalls/callLive.ts +13 -0
  460. package/src/components/VideoCalls/callSessionController.ts +130 -55
  461. package/src/components/VideoCalls/callSessionTypes.ts +80 -0
  462. package/src/components/VideoCalls/groupLayout.ts +48 -0
  463. package/src/components/VideoCalls/p2pCallSession.ts +291 -0
  464. package/src/components/VideoCalls/useCallKeep.ts +9 -2
  465. package/src/components/VideoCalls/useOngoingCallNotification.ts +2 -2
  466. package/src/context/xmppProvider.tsx +3 -0
  467. package/src/helpers/callPush.ts +13 -1
  468. package/src/helpers/incomingCallFromPush.ts +65 -7
  469. package/src/helpers/pushPayload.ts +9 -1
  470. package/src/helpers/reportRoom.ts +93 -0
  471. package/src/i18n/strings.ts +444 -0
  472. package/src/main.ts +33 -0
  473. package/src/networking/api-requests/callState.api.ts +83 -0
  474. package/src/networking/api-requests/push.api.ts +28 -3
  475. package/src/networking/api-requests/rooms.api.ts +12 -3
  476. package/src/networking/api-requests/scheduledCalls.api.ts +232 -0
  477. package/src/networking/callTokenStanza.ts +247 -50
  478. package/src/roomStore/callSlice.ts +86 -2
  479. package/src/services/appBadge.ts +85 -0
  480. package/src/services/languageSettings.ts +43 -8
  481. package/src/services/pushRegistration.ts +34 -3
  482. package/src/types/types.ts +70 -4
  483. package/src/version.ts +1 -1
@@ -19,21 +19,19 @@ import { getIconColor } from '../../../helpers/getIconColor';
19
19
  import { useChatSettingState } from '../../../hooks/useChatSettingState';
20
20
  import { useTheme } from '../../../hooks/useTheme';
21
21
  import type { ChatTheme } from '../../../theme/theme';
22
+ import {
23
+ buildReportRoomPayload,
24
+ OTHER_REPORT_CATEGORY,
25
+ REPORT_CATEGORIES,
26
+ } from '../../../helpers/reportRoom';
22
27
 
23
28
  /**
24
- * Category ids go to `POST /v1/chats/reports/{chatName}` as-is; the labels
25
- * come from the i18n table, which already carried `report.category.*`
26
- * strings in all six locales with nothing rendering them until now.
29
+ * The ids are UI ids: helpers/reportRoom maps each one onto the category
30
+ * value `POST /v1/chats/reports/{chatName}` accepts and builds the
31
+ * non-empty text it requires. Labels come from the `report.category.*`
32
+ * strings.
27
33
  */
28
- const CATEGORIES = [
29
- 'spam',
30
- 'violence',
31
- 'childAbuse',
32
- 'pornography',
33
- 'personalDetails',
34
- 'illegalDrugs',
35
- 'other',
36
- ] as const;
34
+ const CATEGORIES = [...REPORT_CATEGORIES, OTHER_REPORT_CATEGORY];
37
35
 
38
36
  interface ReportChatModalProps {
39
37
  visible: boolean;
@@ -66,17 +64,19 @@ const ReportChatModal: React.FC<ReportChatModalProps> = ({
66
64
 
67
65
  const submit = async () => {
68
66
  if (!category || sending) {return;}
67
+ const payload = buildReportRoomPayload(
68
+ roomJid || activeRoom?.jid || '',
69
+ category,
70
+ details
71
+ );
72
+ if (!payload) {return;}
69
73
  setSending(true);
70
74
  try {
71
- await postReportRoom({
72
- chatName: (roomJid || activeRoom?.jid || '').split('@')[0],
73
- category,
74
- text: details.trim() || undefined,
75
- });
75
+ await postReportRoom(payload);
76
76
  showToast({
77
77
  id: Date.now().toString(),
78
78
  title: t('toast.successTitle'),
79
- message: t('modal.report.chatTitle'),
79
+ message: t('toast.reportSent'),
80
80
  type: 'success',
81
81
  });
82
82
  close();
@@ -85,7 +85,7 @@ const ReportChatModal: React.FC<ReportChatModalProps> = ({
85
85
  showToast({
86
86
  id: Date.now().toString(),
87
87
  title: t('toast.error'),
88
- message: t('modal.report.chatTitle'),
88
+ message: t('toast.reportFailed'),
89
89
  type: 'error',
90
90
  });
91
91
  } finally {
@@ -110,7 +110,7 @@ const ReportChatModal: React.FC<ReportChatModalProps> = ({
110
110
  <View style={styles.card}>
111
111
  <Text style={styles.title}>{t('modal.report.chatTitle')}</Text>
112
112
  <View style={styles.categories}>
113
- {CATEGORIES.map((id) => {
113
+ {CATEGORIES.map(({ id, labelKey }) => {
114
114
  const selected = category === id;
115
115
  return (
116
116
  <TouchableOpacity
@@ -126,13 +126,13 @@ const ReportChatModal: React.FC<ReportChatModalProps> = ({
126
126
  <Text
127
127
  style={[styles.categoryLabel, selected && { color: primary }]}
128
128
  >
129
- {t(`report.category.${id}`)}
129
+ {t(labelKey)}
130
130
  </Text>
131
131
  </TouchableOpacity>
132
132
  );
133
133
  })}
134
134
  </View>
135
- {category === 'other' && (
135
+ {category === OTHER_REPORT_CATEGORY.id && (
136
136
  <TextInput
137
137
  testID="report-details"
138
138
  style={styles.input}
@@ -33,7 +33,6 @@ import { useTheme } from '../../../hooks/useTheme';
33
33
  import type { ChatTheme } from '../../../theme/theme';
34
34
  import { chatTextStyle } from '../../../helpers/typography';
35
35
  import { getElementFont } from '../../../helpers/getElementFont';
36
- import { LANGUAGE_OPTIONS } from '../../../helpers/constants/LANGUAGE_OPTIONS';
37
36
  import { MODAL_TYPES } from '../../../helpers/constants/MODAL_TYPES';
38
37
  import {
39
38
  setActiveFile,
@@ -44,7 +43,6 @@ import { runLogoutFlow } from '../../Menu/HeaderRoomListMenu';
44
43
  import { useLogout } from '../../../hooks/useLogout';
45
44
  import {
46
45
  ApiRoom,
47
- createChatCall,
48
46
  ownAppId,
49
47
  postPrivateRoom,
50
48
  } from '../../../networking/api-requests/rooms.api';
@@ -53,9 +51,14 @@ import { useSelector } from 'react-redux';
53
51
  import { store, type RootState } from '../../../roomStore';
54
52
  import { setCallError, startOutgoingCall } from '../../../roomStore/callSlice';
55
53
  import { sendCallInviteSignal } from '../../../networking/callTokenStanza';
54
+ import { requestOutgoingCall } from '../../../calls/startCall';
55
+ import { isCallRoomTypeAllowed } from '../../../calls/callMode';
56
56
  import { AudioCallIcon, VideoCallIcon } from '../../VideoCalls/CallIcons';
57
57
  import { accountNameOf } from '../../../helpers/accountName';
58
- import { setChatLanguage } from '../../../services/languageSettings';
58
+ import {
59
+ chatLanguageChoices,
60
+ setChatLanguage,
61
+ } from '../../../services/languageSettings';
59
62
  import { composeName } from '../../../helpers/displayName';
60
63
  import { isUnresolvedSenderId } from '../../../helpers/isUnresolvedSenderId';
61
64
 
@@ -158,15 +161,26 @@ const UserProfileModal: React.FC<UserProfileModalProps> = ({
158
161
  [files]
159
162
  );
160
163
 
164
+ // The install's translateLanguages (get-config) when the host passed
165
+ // them; none means no translation server, so no Language tab.
166
+ const languageChoices = useMemo(() => chatLanguageChoices(config), [config]);
167
+
161
168
  const tabs = useMemo(
162
169
  () =>
163
170
  profileTabs({
164
171
  isOwnProfile,
165
- translatesEnabled: !!config?.translates?.enabled,
172
+ translatesEnabled:
173
+ !!config?.translates?.enabled && languageChoices.length > 0,
166
174
  hasMedia: media.length > 0,
167
175
  hasDocuments: documents.length > 0,
168
176
  }),
169
- [isOwnProfile, config?.translates?.enabled, media.length, documents.length]
177
+ [
178
+ isOwnProfile,
179
+ config?.translates?.enabled,
180
+ languageChoices.length,
181
+ media.length,
182
+ documents.length,
183
+ ]
170
184
  );
171
185
 
172
186
  // Keep the selected tab valid as the lists load in.
@@ -366,7 +380,7 @@ const UserProfileModal: React.FC<UserProfileModalProps> = ({
366
380
  const canCall =
367
381
  videoCallsConfig?.enabled === true &&
368
382
  Boolean(videoCallsConfig?.livekitUrl?.trim()) &&
369
- (videoCallsConfig?.allowedRoomTypes || ['private']).includes('private');
383
+ isCallRoomTypeAllowed('private', videoCallsConfig?.allowedRoomTypes);
370
384
  const isAudioCallsEnabled = canCall && videoCallsConfig?.enableAudioCalls === true;
371
385
  const isCallBusy = useSelector((state: RootState) => state.call.phase !== 'idle');
372
386
 
@@ -403,7 +417,11 @@ const UserProfileModal: React.FC<UserProfileModalProps> = ({
403
417
  dispatch(setActiveModal(undefined));
404
418
 
405
419
  try {
406
- await createChatCall(room.bareName, { kind });
420
+ await requestOutgoingCall({
421
+ chatName: room.bareName,
422
+ kind,
423
+ peerXmppUsername: room.peerXmppUsername || null,
424
+ });
407
425
  } catch (error) {
408
426
  dispatch(
409
427
  setCallError(
@@ -556,8 +574,9 @@ const UserProfileModal: React.FC<UserProfileModalProps> = ({
556
574
  if (activeTab === 'language') {
557
575
  return (
558
576
  <View>
559
- {LANGUAGE_OPTIONS.map((option) => {
560
- const selected = langSource === option.id;
577
+ {languageChoices.map((option) => {
578
+ const selected =
579
+ String(langSource || '').toLowerCase() === option.id.toLowerCase();
561
580
  return (
562
581
  <TouchableOpacity
563
582
  key={option.id}
@@ -94,13 +94,15 @@ const LanguageCard: React.FC<LanguageCardProps> = ({ style, testID }) => {
94
94
  appChoices,
95
95
  appCurrent
96
96
  )}
97
- {group(
98
- 'chat',
99
- t('settings.language.chat'),
100
- t('settings.language.chatHint'),
101
- chatChoices,
102
- chatCurrent
103
- )}
97
+ {/* No translate languages from get-config: no translation server. */}
98
+ {chatChoices.length > 0 &&
99
+ group(
100
+ 'chat',
101
+ t('settings.language.chat'),
102
+ t('settings.language.chatHint'),
103
+ chatChoices,
104
+ chatCurrent
105
+ )}
104
106
  </View>
105
107
  );
106
108
  };
@@ -9,6 +9,7 @@ import { useT } from '../../i18n/useT';
9
9
  import { ExpandIcon, HangUpIcon, MicOffIcon, MicOnIcon } from './CallIcons';
10
10
  import { toggleCallMic, useCallSession } from './callSessionController';
11
11
  import { terminateActiveCall } from './callActions';
12
+ import { callCanRenderSession } from './callLive';
12
13
  import {
13
14
  registerCallBarHost,
14
15
  setCallBarAnchor,
@@ -33,10 +34,8 @@ const CONTROL = 'rgba(255, 255, 255, 0.2)';
33
34
  /** True while a call is up and minimized, i.e. the strip should show. */
34
35
  const useShowCallBar = (): boolean => {
35
36
  const { minimized } = useCallUi();
36
- const active = useSelector(
37
- (state: RootState) =>
38
- !!state.call.token &&
39
- (state.call.phase === 'connecting' || state.call.phase === 'in-call')
37
+ const active = useSelector((state: RootState) =>
38
+ callCanRenderSession(state.call)
40
39
  );
41
40
  const { config } = useChatSettingState();
42
41
  return minimized && active && config?.videoCalls?.enabled === true;
@@ -62,7 +61,9 @@ export const ActiveCallBar: FC = () => {
62
61
  : !session.connected
63
62
  ? t('call.status.connecting')
64
63
  : !session.remoteJoined
65
- ? t('call.status.waitingForPeer')
64
+ ? session.isGroup
65
+ ? t('call.status.waitingForOthers')
66
+ : t('call.status.waitingForPeer')
66
67
  : t('call.status.inCall');
67
68
  const statusLine = session.remoteMicMuted
68
69
  ? `${status} · ${t('call.peerMuted', { name })}`
@@ -4,7 +4,8 @@ import { useDispatch, useSelector } from 'react-redux';
4
4
  import { RootState } from '../../roomStore';
5
5
  import { setCallError, startOutgoingCall } from '../../roomStore/callSlice';
6
6
  import { sendCallInviteSignal } from '../../networking/callTokenStanza';
7
- import { createChatCall } from '../../networking/api-requests/rooms.api';
7
+ import { requestOutgoingCall } from '../../calls/startCall';
8
+ import { isCallRoomTypeAllowed } from '../../calls/callMode';
8
9
  import { useChatSettingState } from '../../hooks/useChatSettingState';
9
10
  import { AudioCallIcon, VideoCallIcon } from './CallIcons';
10
11
  import { useT } from '../../i18n/useT';
@@ -19,7 +20,8 @@ import { getIconColor } from '../../helpers/getIconColor';
19
20
  * calls are off, which is the common case.
20
21
  *
21
22
  * Gating mirrors the web rules: calls need `config.videoCalls.enabled`, a
22
- * `livekitUrl`, a 1:1 (private) room, and no other call already running.
23
+ * `livekitUrl`, a 1:1 (private) or members-only group room (subject to
24
+ * `allowedRoomTypes`, default both), and no other call already running.
23
25
  * Audio is a second opt-in on top of that (`enableAudioCalls`).
24
26
  */
25
27
  export const CallButtons: FC = () => {
@@ -33,10 +35,14 @@ export const CallButtons: FC = () => {
33
35
  });
34
36
 
35
37
  const videoCallsConfig = config?.videoCalls;
36
- const allowedRoomTypes = videoCallsConfig?.allowedRoomTypes || ['private'];
37
38
  const isVideoCallsEnabled = videoCallsConfig?.enabled === true;
38
- const isPrivateRoom = currentRoom?.type === 'private';
39
- const isRoomAllowed = isPrivateRoom && allowedRoomTypes.includes('private');
39
+ const isGroupRoom = currentRoom?.type === 'group';
40
+ // 1:1 chats and members-only group chats can call, subject to the host's
41
+ // videoCalls.allowedRoomTypes (default: both). Public rooms never do.
42
+ const isRoomAllowed = isCallRoomTypeAllowed(
43
+ currentRoom?.type,
44
+ videoCallsConfig?.allowedRoomTypes
45
+ );
40
46
  const hasLivekitUrl = Boolean(videoCallsConfig?.livekitUrl?.trim());
41
47
  const isCallBusy = call.phase !== 'idle';
42
48
  const canCall = isVideoCallsEnabled && isRoomAllowed && hasLivekitUrl;
@@ -60,12 +66,16 @@ export const CallButtons: FC = () => {
60
66
  if (!chatName) {return;}
61
67
 
62
68
  // Resolve the peer xmpp localpart so we can XMPP-signal them when we
63
- // hang up or cancel, without this they'd keep ringing forever.
69
+ // hang up or cancel, without this they'd keep ringing forever. A group
70
+ // call has no single peer to signal; the server rings every member and
71
+ // LiveKit carries the call.
64
72
  const selfLocal = String(user?.xmppUsername || '').split('@')[0];
65
- const peer = (currentRoom.members || []).find((member: any) => {
66
- const mLocal = String(member?.xmppUsername || '').split('@')[0];
67
- return mLocal && mLocal !== selfLocal;
68
- });
73
+ const peer = isGroupRoom
74
+ ? undefined
75
+ : (currentRoom.members || []).find((member: any) => {
76
+ const mLocal = String(member?.xmppUsername || '').split('@')[0];
77
+ return mLocal && mLocal !== selfLocal;
78
+ });
69
79
  const peerXmppUsername = peer?.xmppUsername || null;
70
80
 
71
81
  // Don't show "deleted" / "Deleted User" / "Unknown" as the dial
@@ -96,6 +106,7 @@ export const CallButtons: FC = () => {
96
106
  roomBareName: chatName,
97
107
  kind,
98
108
  peerXmppUsername,
109
+ isGroup: isGroupRoom,
99
110
  })
100
111
  );
101
112
 
@@ -111,7 +122,7 @@ export const CallButtons: FC = () => {
111
122
  }
112
123
 
113
124
  try {
114
- await createChatCall(chatName, { kind });
125
+ await requestOutgoingCall({ chatName, kind, peerXmppUsername });
115
126
  } catch (error) {
116
127
  const message =
117
128
  error instanceof Error
@@ -120,7 +131,7 @@ export const CallButtons: FC = () => {
120
131
  dispatch(setCallError(message));
121
132
  }
122
133
  },
123
- [canCall, isCallBusy, currentRoom, user?.xmppUsername, dispatch, t]
134
+ [canCall, isCallBusy, currentRoom, isGroupRoom, user?.xmppUsername, dispatch, t]
124
135
  );
125
136
 
126
137
  if (!canCall || isCallBusy) {
@@ -0,0 +1,131 @@
1
+ import React, { FC } from 'react';
2
+ import { StyleSheet, TouchableOpacity, View } from 'react-native';
3
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
+ import { VideoCallIcons } from '../../types/types';
5
+ import {
6
+ CameraOffIcon,
7
+ CameraOnIcon,
8
+ HangUpIcon,
9
+ MicOffIcon,
10
+ MicOnIcon,
11
+ SpeakerIcon,
12
+ SpeakerOffIcon,
13
+ SwitchCameraIcon,
14
+ } from './CallIcons';
15
+ import {
16
+ switchCallCamera,
17
+ toggleCallCamera,
18
+ toggleCallMic,
19
+ toggleCallSpeaker,
20
+ } from './callSessionController';
21
+ import type { CallSessionSnapshot } from './callSessionTypes';
22
+ import { useT } from '../../i18n/useT';
23
+
24
+ const TEXT_ON_DARK = '#FFFFFF';
25
+ const DANGER = '#E53935';
26
+ const CONTROL_IDLE = 'rgba(255, 255, 255, 0.16)';
27
+
28
+ interface CallControlBarProps {
29
+ session: Pick<CallSessionSnapshot, 'micOn' | 'cameraOn' | 'speakerOn'>;
30
+ isVideo: boolean;
31
+ icons?: VideoCallIcons;
32
+ onHangup: () => void;
33
+ }
34
+
35
+ /**
36
+ * The row of round buttons at the foot of the call screen: mic, camera (and
37
+ * its flip), speaker and hang up. Shared by the 1:1 and the group layout; the
38
+ * controls act on whichever transport carries the call.
39
+ */
40
+ export const CallControlBar: FC<CallControlBarProps> = ({
41
+ session,
42
+ isVideo,
43
+ icons,
44
+ onHangup,
45
+ }) => {
46
+ const t = useT();
47
+ const insets = useSafeAreaInsets();
48
+ const { micOn, cameraOn, speakerOn } = session;
49
+
50
+ return (
51
+ <View style={[styles.controls, { paddingBottom: 20 + insets.bottom }]}>
52
+ <TouchableOpacity
53
+ accessibilityRole="button"
54
+ accessibilityLabel={micOn ? t('call.action.muteMic') : t('call.action.unmuteMic')}
55
+ onPress={toggleCallMic}
56
+ style={[styles.controlButton, { backgroundColor: micOn ? CONTROL_IDLE : DANGER }]}
57
+ >
58
+ {micOn
59
+ ? (icons?.micOn ?? <MicOnIcon color={TEXT_ON_DARK} />)
60
+ : (icons?.micOff ?? <MicOffIcon color={TEXT_ON_DARK} />)}
61
+ </TouchableOpacity>
62
+
63
+ {isVideo && (
64
+ <TouchableOpacity
65
+ accessibilityRole="button"
66
+ accessibilityLabel={
67
+ cameraOn ? t('call.action.stopCamera') : t('call.action.startCamera')
68
+ }
69
+ onPress={toggleCallCamera}
70
+ style={[styles.controlButton, { backgroundColor: cameraOn ? CONTROL_IDLE : DANGER }]}
71
+ >
72
+ {cameraOn
73
+ ? (icons?.cameraOn ?? <CameraOnIcon color={TEXT_ON_DARK} />)
74
+ : (icons?.cameraOff ?? <CameraOffIcon color={TEXT_ON_DARK} />)}
75
+ </TouchableOpacity>
76
+ )}
77
+
78
+ {isVideo && cameraOn && (
79
+ <TouchableOpacity
80
+ accessibilityRole="button"
81
+ accessibilityLabel={t('call.action.switchCamera')}
82
+ onPress={switchCallCamera}
83
+ style={[styles.controlButton, { backgroundColor: CONTROL_IDLE }]}
84
+ >
85
+ <SwitchCameraIcon color={TEXT_ON_DARK} />
86
+ </TouchableOpacity>
87
+ )}
88
+
89
+ <TouchableOpacity
90
+ accessibilityRole="button"
91
+ accessibilityLabel={speakerOn ? t('call.action.speakerOff') : t('call.action.speakerOn')}
92
+ onPress={toggleCallSpeaker}
93
+ style={[styles.controlButton, { backgroundColor: CONTROL_IDLE }]}
94
+ >
95
+ {speakerOn ? <SpeakerIcon color={TEXT_ON_DARK} /> : <SpeakerOffIcon color={TEXT_ON_DARK} />}
96
+ </TouchableOpacity>
97
+
98
+ <TouchableOpacity
99
+ accessibilityRole="button"
100
+ accessibilityLabel={t('call.action.hangUp')}
101
+ onPress={onHangup}
102
+ style={[styles.controlButton, styles.hangupButton]}
103
+ >
104
+ {icons?.hangup ?? <HangUpIcon color={TEXT_ON_DARK} />}
105
+ </TouchableOpacity>
106
+ </View>
107
+ );
108
+ };
109
+
110
+ const styles = StyleSheet.create({
111
+ controls: {
112
+ flexDirection: 'row',
113
+ alignItems: 'center',
114
+ justifyContent: 'center',
115
+ gap: 16,
116
+ paddingTop: 20,
117
+ paddingHorizontal: 16,
118
+ },
119
+ controlButton: {
120
+ width: 56,
121
+ height: 56,
122
+ borderRadius: 28,
123
+ alignItems: 'center',
124
+ justifyContent: 'center',
125
+ },
126
+ hangupButton: {
127
+ backgroundColor: DANGER,
128
+ },
129
+ });
130
+
131
+ export default CallControlBar;
@@ -0,0 +1,59 @@
1
+ import React, { FC } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ import { loadWebRTC } from '../../calls/p2p/webrtcRuntime';
4
+ import { loadLiveKit } from './livekitRuntime';
5
+
6
+ interface CallVideoProps {
7
+ /**
8
+ * What the session snapshot hands out: a LiveKit track reference
9
+ * (`{ participant, publication, source }`) or a p2p stream handle
10
+ * (`{ streamURL }`).
11
+ */
12
+ source: any;
13
+ style?: StyleProp<ViewStyle>;
14
+ objectFit?: 'contain' | 'cover';
15
+ mirror?: boolean;
16
+ zOrder?: number;
17
+ }
18
+
19
+ /**
20
+ * One video surface of a call, whichever transport it came from: LiveKit's
21
+ * `<VideoTrack />` for a room track, the fork's `<RTCView />` for the stream
22
+ * of a peer to peer connection. Renders nothing when the matching native
23
+ * package is missing.
24
+ */
25
+ export const CallVideo: FC<CallVideoProps> = ({
26
+ source,
27
+ style,
28
+ objectFit,
29
+ mirror,
30
+ zOrder,
31
+ }) => {
32
+ if (!source) {return null;}
33
+
34
+ if (typeof source.streamURL === 'string') {
35
+ const RTCView = loadWebRTC()?.RTCView;
36
+ return RTCView ? (
37
+ <RTCView
38
+ streamURL={source.streamURL}
39
+ style={style}
40
+ objectFit={objectFit}
41
+ mirror={mirror}
42
+ zOrder={zOrder}
43
+ />
44
+ ) : null;
45
+ }
46
+
47
+ const VideoTrack = loadLiveKit()?.VideoTrack;
48
+ return VideoTrack ? (
49
+ <VideoTrack
50
+ trackRef={source}
51
+ style={style}
52
+ objectFit={objectFit}
53
+ mirror={mirror}
54
+ zOrder={zOrder}
55
+ />
56
+ ) : null;
57
+ };
58
+
59
+ export default CallVideo;