@stream-io/video-react-native-sdk 2.0.0-beta.1 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/README.md +1 -1
  3. package/android/build.gradle +7 -1
  4. package/android/src/main/java/com/streamvideo/reactnative/audio/AudioDeviceManager.kt +110 -58
  5. package/android/src/main/java/com/streamvideo/reactnative/audio/CommunicationModeKeepAlive.kt +247 -0
  6. package/android/src/main/java/com/streamvideo/reactnative/callmanager/StreamInCallManagerModule.kt +16 -5
  7. package/dist/commonjs/components/Call/CallContent/CallContent.js +1 -1
  8. package/dist/commonjs/components/Call/CallContent/CallContent.js.map +1 -1
  9. package/dist/commonjs/components/Call/CallContent/RTCViewPipIOS.js +78 -7
  10. package/dist/commonjs/components/Call/CallContent/RTCViewPipIOS.js.map +1 -1
  11. package/dist/commonjs/components/Call/CallContent/RTCViewPipNative.js +3 -0
  12. package/dist/commonjs/components/Call/CallContent/RTCViewPipNative.js.map +1 -1
  13. package/dist/commonjs/components/Call/Lobby/JoinCallButton.js +3 -2
  14. package/dist/commonjs/components/Call/Lobby/JoinCallButton.js.map +1 -1
  15. package/dist/commonjs/components/Call/Lobby/Lobby.js +4 -3
  16. package/dist/commonjs/components/Call/Lobby/Lobby.js.map +1 -1
  17. package/dist/commonjs/components/Call/Lobby/LobbyFooter.js +10 -10
  18. package/dist/commonjs/components/Call/Lobby/LobbyFooter.js.map +1 -1
  19. package/dist/commonjs/components/Call/RingingCallContent/CallLeftIndicator.js +3 -3
  20. package/dist/commonjs/components/Call/RingingCallContent/CallLeftIndicator.js.map +1 -1
  21. package/dist/commonjs/components/Call/RingingCallContent/CallPreparingIndicator.js +3 -3
  22. package/dist/commonjs/components/Call/RingingCallContent/CallPreparingIndicator.js.map +1 -1
  23. package/dist/commonjs/components/Call/RingingCallContent/IncomingCall.js +3 -2
  24. package/dist/commonjs/components/Call/RingingCallContent/IncomingCall.js.map +1 -1
  25. package/dist/commonjs/components/Call/RingingCallContent/OutgoingCall.js +7 -14
  26. package/dist/commonjs/components/Call/RingingCallContent/OutgoingCall.js.map +1 -1
  27. package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js +3 -2
  28. package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -1
  29. package/dist/commonjs/components/Livestream/LivestreamPlayer/LivestreamEnded.js +4 -3
  30. package/dist/commonjs/components/Livestream/LivestreamPlayer/LivestreamEnded.js.map +1 -1
  31. package/dist/commonjs/components/Livestream/LivestreamTopView/LiveIndicator.js +3 -3
  32. package/dist/commonjs/components/Livestream/LivestreamTopView/LiveIndicator.js.map +1 -1
  33. package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLobby.js +9 -4
  34. package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLobby.js.map +1 -1
  35. package/dist/commonjs/components/Participant/ParticipantView/ParticipantLabel.js +4 -3
  36. package/dist/commonjs/components/Participant/ParticipantView/ParticipantLabel.js.map +1 -1
  37. package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js +27 -4
  38. package/dist/commonjs/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js.map +1 -1
  39. package/dist/commonjs/components/utility/ScreenShareOverlay.js +4 -3
  40. package/dist/commonjs/components/utility/ScreenShareOverlay.js.map +1 -1
  41. package/dist/commonjs/i18n/Streami18n.js +77 -0
  42. package/dist/commonjs/i18n/Streami18n.js.map +1 -0
  43. package/dist/commonjs/i18n/TranslationContext.js +52 -0
  44. package/dist/commonjs/i18n/TranslationContext.js.map +1 -0
  45. package/dist/commonjs/i18n/index.js +85 -0
  46. package/dist/commonjs/i18n/index.js.map +1 -0
  47. package/dist/commonjs/i18n/keys.js +2 -0
  48. package/dist/commonjs/i18n/keys.js.map +1 -0
  49. package/dist/commonjs/i18n/runtimeDefaults.js +24 -0
  50. package/dist/commonjs/i18n/runtimeDefaults.js.map +1 -0
  51. package/dist/commonjs/i18n/types.js +6 -0
  52. package/dist/commonjs/i18n/types.js.map +1 -0
  53. package/dist/commonjs/i18n/useStreami18n.js +61 -0
  54. package/dist/commonjs/i18n/useStreami18n.js.map +1 -0
  55. package/dist/commonjs/index.js +18 -5
  56. package/dist/commonjs/index.js.map +1 -1
  57. package/dist/commonjs/modules/encryption/EncryptionManager.js +305 -0
  58. package/dist/commonjs/modules/encryption/EncryptionManager.js.map +1 -0
  59. package/dist/commonjs/modules/encryption/eventMapping.js +143 -0
  60. package/dist/commonjs/modules/encryption/eventMapping.js.map +1 -0
  61. package/dist/commonjs/modules/encryption/index.js +13 -0
  62. package/dist/commonjs/modules/encryption/index.js.map +1 -0
  63. package/dist/commonjs/modules/encryption/parity.js +6 -0
  64. package/dist/commonjs/modules/encryption/parity.js.map +1 -0
  65. package/dist/commonjs/providers/NoiseCancellation/NoiseCancellationProvider.js +6 -2
  66. package/dist/commonjs/providers/NoiseCancellation/NoiseCancellationProvider.js.map +1 -1
  67. package/dist/commonjs/providers/StreamVideo.js +28 -12
  68. package/dist/commonjs/providers/StreamVideo.js.map +1 -1
  69. package/dist/commonjs/utils/StreamVideoRN/index.js +46 -0
  70. package/dist/commonjs/utils/StreamVideoRN/index.js.map +1 -1
  71. package/dist/commonjs/utils/internal/callingx/callingx.js +29 -4
  72. package/dist/commonjs/utils/internal/callingx/callingx.js.map +1 -1
  73. package/dist/commonjs/utils/internal/iosPipTrack.js +41 -0
  74. package/dist/commonjs/utils/internal/iosPipTrack.js.map +1 -0
  75. package/dist/commonjs/utils/internal/registerSDKGlobals.js +6 -0
  76. package/dist/commonjs/utils/internal/registerSDKGlobals.js.map +1 -1
  77. package/dist/commonjs/utils/internal/ringingCallLifecycle.js +142 -0
  78. package/dist/commonjs/utils/internal/ringingCallLifecycle.js.map +1 -0
  79. package/dist/commonjs/utils/push/internal/utils.js +4 -0
  80. package/dist/commonjs/utils/push/internal/utils.js.map +1 -1
  81. package/dist/commonjs/version.js +1 -1
  82. package/dist/module/components/Call/CallContent/CallContent.js +1 -1
  83. package/dist/module/components/Call/CallContent/CallContent.js.map +1 -1
  84. package/dist/module/components/Call/CallContent/RTCViewPipIOS.js +80 -9
  85. package/dist/module/components/Call/CallContent/RTCViewPipIOS.js.map +1 -1
  86. package/dist/module/components/Call/CallContent/RTCViewPipNative.js +3 -0
  87. package/dist/module/components/Call/CallContent/RTCViewPipNative.js.map +1 -1
  88. package/dist/module/components/Call/Lobby/JoinCallButton.js +3 -2
  89. package/dist/module/components/Call/Lobby/JoinCallButton.js.map +1 -1
  90. package/dist/module/components/Call/Lobby/Lobby.js +4 -3
  91. package/dist/module/components/Call/Lobby/Lobby.js.map +1 -1
  92. package/dist/module/components/Call/Lobby/LobbyFooter.js +10 -10
  93. package/dist/module/components/Call/Lobby/LobbyFooter.js.map +1 -1
  94. package/dist/module/components/Call/RingingCallContent/CallLeftIndicator.js +2 -2
  95. package/dist/module/components/Call/RingingCallContent/CallLeftIndicator.js.map +1 -1
  96. package/dist/module/components/Call/RingingCallContent/CallPreparingIndicator.js +2 -2
  97. package/dist/module/components/Call/RingingCallContent/CallPreparingIndicator.js.map +1 -1
  98. package/dist/module/components/Call/RingingCallContent/IncomingCall.js +3 -2
  99. package/dist/module/components/Call/RingingCallContent/IncomingCall.js.map +1 -1
  100. package/dist/module/components/Call/RingingCallContent/OutgoingCall.js +7 -14
  101. package/dist/module/components/Call/RingingCallContent/OutgoingCall.js.map +1 -1
  102. package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js +3 -2
  103. package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -1
  104. package/dist/module/components/Livestream/LivestreamPlayer/LivestreamEnded.js +4 -3
  105. package/dist/module/components/Livestream/LivestreamPlayer/LivestreamEnded.js.map +1 -1
  106. package/dist/module/components/Livestream/LivestreamTopView/LiveIndicator.js +2 -2
  107. package/dist/module/components/Livestream/LivestreamTopView/LiveIndicator.js.map +1 -1
  108. package/dist/module/components/Livestream/ViewerLivestream/ViewerLobby.js +9 -4
  109. package/dist/module/components/Livestream/ViewerLivestream/ViewerLobby.js.map +1 -1
  110. package/dist/module/components/Participant/ParticipantView/ParticipantLabel.js +4 -3
  111. package/dist/module/components/Participant/ParticipantView/ParticipantLabel.js.map +1 -1
  112. package/dist/module/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js +28 -5
  113. package/dist/module/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.js.map +1 -1
  114. package/dist/module/components/utility/ScreenShareOverlay.js +4 -3
  115. package/dist/module/components/utility/ScreenShareOverlay.js.map +1 -1
  116. package/dist/module/i18n/Streami18n.js +73 -0
  117. package/dist/module/i18n/Streami18n.js.map +1 -0
  118. package/dist/module/i18n/TranslationContext.js +48 -0
  119. package/dist/module/i18n/TranslationContext.js.map +1 -0
  120. package/dist/module/i18n/index.js +20 -0
  121. package/dist/module/i18n/index.js.map +1 -0
  122. package/dist/module/i18n/keys.js +2 -0
  123. package/dist/module/i18n/keys.js.map +1 -0
  124. package/dist/module/i18n/runtimeDefaults.js +20 -0
  125. package/dist/module/i18n/runtimeDefaults.js.map +1 -0
  126. package/dist/module/i18n/types.js +4 -0
  127. package/dist/module/i18n/types.js.map +1 -0
  128. package/dist/module/i18n/useStreami18n.js +56 -0
  129. package/dist/module/i18n/useStreami18n.js.map +1 -0
  130. package/dist/module/index.js +6 -1
  131. package/dist/module/index.js.map +1 -1
  132. package/dist/module/modules/encryption/EncryptionManager.js +301 -0
  133. package/dist/module/modules/encryption/EncryptionManager.js.map +1 -0
  134. package/dist/module/modules/encryption/eventMapping.js +135 -0
  135. package/dist/module/modules/encryption/eventMapping.js.map +1 -0
  136. package/dist/module/modules/encryption/index.js +4 -0
  137. package/dist/module/modules/encryption/index.js.map +1 -0
  138. package/dist/module/modules/encryption/parity.js +4 -0
  139. package/dist/module/modules/encryption/parity.js.map +1 -0
  140. package/dist/module/providers/NoiseCancellation/NoiseCancellationProvider.js +6 -2
  141. package/dist/module/providers/NoiseCancellation/NoiseCancellationProvider.js.map +1 -1
  142. package/dist/module/providers/StreamVideo.js +29 -14
  143. package/dist/module/providers/StreamVideo.js.map +1 -1
  144. package/dist/module/utils/StreamVideoRN/index.js +46 -0
  145. package/dist/module/utils/StreamVideoRN/index.js.map +1 -1
  146. package/dist/module/utils/internal/callingx/callingx.js +29 -4
  147. package/dist/module/utils/internal/callingx/callingx.js.map +1 -1
  148. package/dist/module/utils/internal/iosPipTrack.js +35 -0
  149. package/dist/module/utils/internal/iosPipTrack.js.map +1 -0
  150. package/dist/module/utils/internal/registerSDKGlobals.js +6 -0
  151. package/dist/module/utils/internal/registerSDKGlobals.js.map +1 -1
  152. package/dist/module/utils/internal/ringingCallLifecycle.js +134 -0
  153. package/dist/module/utils/internal/ringingCallLifecycle.js.map +1 -0
  154. package/dist/module/utils/push/internal/utils.js +4 -0
  155. package/dist/module/utils/push/internal/utils.js.map +1 -1
  156. package/dist/module/version.js +1 -1
  157. package/dist/typescript/components/Call/CallContent/RTCViewPipIOS.d.ts.map +1 -1
  158. package/dist/typescript/components/Call/CallContent/RTCViewPipNative.d.ts +12 -0
  159. package/dist/typescript/components/Call/CallContent/RTCViewPipNative.d.ts.map +1 -1
  160. package/dist/typescript/components/Call/Lobby/JoinCallButton.d.ts.map +1 -1
  161. package/dist/typescript/components/Call/Lobby/Lobby.d.ts.map +1 -1
  162. package/dist/typescript/components/Call/Lobby/LobbyFooter.d.ts.map +1 -1
  163. package/dist/typescript/components/Call/RingingCallContent/OutgoingCall.d.ts.map +1 -1
  164. package/dist/typescript/components/Livestream/LivestreamControls/HostStartStreamButton.d.ts.map +1 -1
  165. package/dist/typescript/components/Livestream/LivestreamPlayer/LivestreamEnded.d.ts.map +1 -1
  166. package/dist/typescript/components/Livestream/ViewerLivestream/ViewerLobby.d.ts.map +1 -1
  167. package/dist/typescript/components/Participant/ParticipantView/ParticipantLabel.d.ts.map +1 -1
  168. package/dist/typescript/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.d.ts +11 -0
  169. package/dist/typescript/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.d.ts.map +1 -1
  170. package/dist/typescript/components/utility/ScreenShareOverlay.d.ts.map +1 -1
  171. package/dist/typescript/i18n/Streami18n.d.ts +61 -0
  172. package/dist/typescript/i18n/Streami18n.d.ts.map +1 -0
  173. package/dist/typescript/i18n/TranslationContext.d.ts +31 -0
  174. package/dist/typescript/i18n/TranslationContext.d.ts.map +1 -0
  175. package/dist/typescript/i18n/index.d.ts +17 -0
  176. package/dist/typescript/i18n/index.d.ts.map +1 -0
  177. package/dist/typescript/i18n/keys.d.ts +38 -0
  178. package/dist/typescript/i18n/keys.d.ts.map +1 -0
  179. package/dist/typescript/i18n/runtimeDefaults.d.ts +18 -0
  180. package/dist/typescript/i18n/runtimeDefaults.d.ts.map +1 -0
  181. package/dist/typescript/i18n/types.d.ts +46 -0
  182. package/dist/typescript/i18n/types.d.ts.map +1 -0
  183. package/dist/typescript/i18n/useStreami18n.d.ts +20 -0
  184. package/dist/typescript/i18n/useStreami18n.d.ts.map +1 -0
  185. package/dist/typescript/index.d.ts +2 -1
  186. package/dist/typescript/index.d.ts.map +1 -1
  187. package/dist/typescript/modules/encryption/EncryptionManager.d.ts +190 -0
  188. package/dist/typescript/modules/encryption/EncryptionManager.d.ts.map +1 -0
  189. package/dist/typescript/modules/encryption/eventMapping.d.ts +38 -0
  190. package/dist/typescript/modules/encryption/eventMapping.d.ts.map +1 -0
  191. package/dist/typescript/modules/encryption/index.d.ts +2 -0
  192. package/dist/typescript/modules/encryption/index.d.ts.map +1 -0
  193. package/dist/typescript/modules/encryption/parity.d.ts +55 -0
  194. package/dist/typescript/modules/encryption/parity.d.ts.map +1 -0
  195. package/dist/typescript/providers/NoiseCancellation/NoiseCancellationProvider.d.ts.map +1 -1
  196. package/dist/typescript/providers/StreamVideo.d.ts +17 -4
  197. package/dist/typescript/providers/StreamVideo.d.ts.map +1 -1
  198. package/dist/typescript/utils/StreamVideoRN/index.d.ts +33 -1
  199. package/dist/typescript/utils/StreamVideoRN/index.d.ts.map +1 -1
  200. package/dist/typescript/utils/StreamVideoRN/types.d.ts +67 -0
  201. package/dist/typescript/utils/StreamVideoRN/types.d.ts.map +1 -1
  202. package/dist/typescript/utils/internal/callingx/callingx.d.ts +1 -1
  203. package/dist/typescript/utils/internal/callingx/callingx.d.ts.map +1 -1
  204. package/dist/typescript/utils/internal/iosPipTrack.d.ts +9 -0
  205. package/dist/typescript/utils/internal/iosPipTrack.d.ts.map +1 -0
  206. package/dist/typescript/utils/internal/registerSDKGlobals.d.ts.map +1 -1
  207. package/dist/typescript/utils/internal/ringingCallLifecycle.d.ts +27 -0
  208. package/dist/typescript/utils/internal/ringingCallLifecycle.d.ts.map +1 -0
  209. package/dist/typescript/utils/push/internal/utils.d.ts.map +1 -1
  210. package/dist/typescript/version.d.ts +1 -1
  211. package/ios/RTCViewPip.swift +33 -8
  212. package/ios/RTCViewPipManager.mm +1 -0
  213. package/package.json +14 -10
  214. package/src/components/Call/CallContent/CallContent.tsx +1 -1
  215. package/src/components/Call/CallContent/RTCViewPipIOS.tsx +92 -10
  216. package/src/components/Call/CallContent/RTCViewPipNative.tsx +13 -0
  217. package/src/components/Call/Lobby/JoinCallButton.tsx +5 -2
  218. package/src/components/Call/Lobby/Lobby.tsx +6 -3
  219. package/src/components/Call/Lobby/LobbyFooter.tsx +15 -10
  220. package/src/components/Call/RingingCallContent/CallLeftIndicator.tsx +2 -2
  221. package/src/components/Call/RingingCallContent/CallPreparingIndicator.tsx +2 -2
  222. package/src/components/Call/RingingCallContent/IncomingCall.tsx +2 -2
  223. package/src/components/Call/RingingCallContent/OutgoingCall.tsx +7 -14
  224. package/src/components/Livestream/LivestreamControls/HostStartStreamButton.tsx +5 -8
  225. package/src/components/Livestream/LivestreamPlayer/LivestreamEnded.tsx +11 -3
  226. package/src/components/Livestream/LivestreamTopView/LiveIndicator.tsx +2 -2
  227. package/src/components/Livestream/ViewerLivestream/ViewerLobby.tsx +23 -10
  228. package/src/components/Participant/ParticipantView/ParticipantLabel.tsx +15 -6
  229. package/src/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.tsx +58 -5
  230. package/src/components/utility/ScreenShareOverlay.tsx +7 -3
  231. package/src/i18n/Streami18n.ts +71 -0
  232. package/src/i18n/TranslationContext.tsx +55 -0
  233. package/src/i18n/index.ts +22 -0
  234. package/src/i18n/keys.ts +42 -0
  235. package/src/i18n/runtimeDefaults.ts +17 -0
  236. package/src/i18n/types.ts +78 -0
  237. package/src/i18n/useStreami18n.ts +66 -0
  238. package/src/index.ts +6 -1
  239. package/src/modules/call-manager/native-module.d.ts +14 -0
  240. package/src/modules/encryption/EncryptionManager.ts +360 -0
  241. package/src/modules/encryption/eventMapping.ts +151 -0
  242. package/src/modules/encryption/index.ts +1 -0
  243. package/src/modules/encryption/parity.ts +83 -0
  244. package/src/providers/NoiseCancellation/NoiseCancellationProvider.tsx +8 -4
  245. package/src/providers/StreamVideo.tsx +39 -28
  246. package/src/utils/StreamVideoRN/index.ts +51 -1
  247. package/src/utils/StreamVideoRN/types.ts +68 -0
  248. package/src/utils/internal/callingx/callingx.ts +37 -2
  249. package/src/utils/internal/iosPipTrack.ts +39 -0
  250. package/src/utils/internal/registerSDKGlobals.ts +2 -0
  251. package/src/utils/internal/ringingCallLifecycle.ts +148 -0
  252. package/src/utils/push/internal/utils.ts +4 -0
  253. package/src/version.ts +1 -1
  254. package/dist/commonjs/translations/en.json +0 -32
  255. package/dist/commonjs/translations/index.js +0 -12
  256. package/dist/commonjs/translations/index.js.map +0 -1
  257. package/dist/module/translations/en.json +0 -32
  258. package/dist/module/translations/index.js +0 -7
  259. package/dist/module/translations/index.js.map +0 -1
  260. package/dist/typescript/translations/index.d.ts +0 -35
  261. package/dist/typescript/translations/index.d.ts.map +0 -1
  262. package/src/translations/en.json +0 -32
  263. package/src/translations/index.ts +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"JoinCallButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/Lobby/JoinCallButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAM1C;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,mBAAmB,CAAC,GAAG;IACxE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,wCAG5B,mBAAmB,sBAkDrB,CAAC"}
1
+ {"version":3,"file":"JoinCallButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/Lobby/JoinCallButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAO1C;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,mBAAmB,CAAC,GAAG;IACxE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,wCAG5B,mBAAmB,sBAoDrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Lobby.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/Lobby/Lobby.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,aAAa,EAAW,MAAM,OAAO,CAAC;AAW3D,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC;IAC3D;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;CACtD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,+EAMnB,UAAU,sBA8DZ,CAAC"}
1
+ {"version":3,"file":"Lobby.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/Lobby/Lobby.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,aAAa,EAAW,MAAM,OAAO,CAAC;AAW3D,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,aAAa,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC;IAC3D;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;CACtD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,+EAMnB,UAAU,sBAiEZ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LobbyFooter.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/Lobby/LobbyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAM1C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,UAAU,EACV,mBAAmB,GAAG,gBAAgB,CACvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,wCAGzB,gBAAgB,sBA6ClB,CAAC"}
1
+ {"version":3,"file":"LobbyFooter.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/Lobby/LobbyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAO1C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,UAAU,EACV,mBAAmB,GAAG,gBAAgB,CACvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,wCAGzB,gBAAgB,sBAiDlB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OutgoingCall.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/RingingCallContent/OutgoingCall.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,GAAG;IAC1D;;OAEG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,yBAAyB,CAAC,GAAG,IAAI,CAAC;IAC7E;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,2DAI1B,iBAAiB,sBAmEnB,CAAC"}
1
+ {"version":3,"file":"OutgoingCall.d.ts","sourceRoot":"","sources":["../../../../../src/components/Call/RingingCallContent/OutgoingCall.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,iBAAiB,CAAC;AAGzB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,yBAAyB,GAAG;IAC1D;;OAEG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,yBAAyB,CAAC,GAAG,IAAI,CAAC;IAC7E;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,2DAI1B,iBAAiB,sBAmEnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"HostStartStreamButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Livestream/LivestreamControls/HostStartStreamButton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAYxC;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,sCAAsC,CAAC,EAAE,OAAO,CAAC;CAClD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,4FAKnC,0BAA0B,sBA6G5B,CAAC"}
1
+ {"version":3,"file":"HostStartStreamButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Livestream/LivestreamControls/HostStartStreamButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAYxC;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,sCAAsC,CAAC,EAAE,OAAO,CAAC;CAClD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,4FAKnC,0BAA0B,sBA6G5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LivestreamEnded.d.ts","sourceRoot":"","sources":["../../../../../src/components/Livestream/LivestreamPlayer/LivestreamEnded.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AA0CzE,eAAO,MAAM,aAAa,yBAkFzB,CAAC"}
1
+ {"version":3,"file":"LivestreamEnded.d.ts","sourceRoot":"","sources":["../../../../../src/components/Livestream/LivestreamPlayer/LivestreamEnded.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AA2CzE,eAAO,MAAM,aAAa,yBAyFzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ViewerLobby.d.ts","sourceRoot":"","sources":["../../../../../src/components/Livestream/ViewerLivestream/ViewerLobby.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAW5D,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,YAAY,UAAU,sBAoGjD,CAAC"}
1
+ {"version":3,"file":"ViewerLobby.d.ts","sourceRoot":"","sources":["../../../../../src/components/Livestream/ViewerLivestream/ViewerLobby.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAW5D,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,YAAY,UAAU,sBAoHjD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ParticipantLabel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Participant/ParticipantView/ParticipantLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAsBvC,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAM9D;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,oBAAoB,EACpB,WAAW,GAAG,aAAa,CAC5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,6BAG9B,qBAAqB,sBA4HvB,CAAC"}
1
+ {"version":3,"file":"ParticipantLabel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Participant/ParticipantView/ParticipantLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAsBvC,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAM9D;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,oBAAoB,EACpB,WAAW,GAAG,aAAa,CAC5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,6BAG9B,qBAAqB,sBAqIvB,CAAC"}
@@ -10,6 +10,13 @@ type TrackSubscriberProps = {
10
10
  * the last reported layout survives a remount of this component.
11
11
  */
12
12
  dimensions$: BehaviorSubject<SfuModels.VideoDimension | undefined>;
13
+ /**
14
+ * Set by the native iOS Picture in Picture window, whose bounds this
15
+ * subscriber requests. While it does, the inline views of the same track
16
+ * stop requesting their own, hidden layout. Only rendered on iOS; on other
17
+ * platforms the gate is always open.
18
+ */
19
+ isPipWriter?: boolean;
13
20
  };
14
21
  /**
15
22
  * This component is used to subscribe to the video + audio track of the participant in the following cases:
@@ -21,6 +28,10 @@ type TrackSubscriberProps = {
21
28
  * This component is used to unsubscribe to video track and subscribe only to the audio track of the participant (by passing undefined dimensions) in the following cases:
22
29
  * 1. When the participant stops publishing the video track
23
30
  * 2. When the participant becomes invisible
31
+ *
32
+ * The same component serves the native iOS Picture in Picture window, which
33
+ * renders one of the tracks too. Its bounds take precedence over the inline
34
+ * views of that track for as long as it is on screen.
24
35
  */
25
36
  declare const TrackSubscriber: {
26
37
  (props: TrackSubscriberProps): null;
@@ -1 +1 @@
1
- {"version":3,"file":"TrackSubscriber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,IAAI,EAKJ,SAAS,EAET,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,eAAe,EAMhB,MAAM,MAAM,CAAC;AAEd,KAAK,oBAAoB,GAAG;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,WAAW,EAAE,eAAe,CAAC,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;CACpE,CAAC;AAEF;;;;;;;;;;EAUE;AACF,QAAA,MAAM,eAAe;YAAW,oBAAoB;;CAsDnD,CAAC;AAIF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"TrackSubscriber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Participant/ParticipantView/VideoRenderer/TrackSubscriber.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,IAAI,EAKJ,SAAS,EAET,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,eAAe,EAOhB,MAAM,MAAM,CAAC;AAMd,KAAK,oBAAoB,GAAG;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,WAAW,EAAE,eAAe,CAAC,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;IACnE;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;EAcE;AACF,QAAA,MAAM,eAAe;YAAW,oBAAoB;;CA0FnD,CAAC;AAIF,eAAe,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScreenShareOverlay.d.ts","sourceRoot":"","sources":["../../../../src/components/utility/ScreenShareOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,IAAI,uBAAuB,sBAqE7D,CAAC"}
1
+ {"version":3,"file":"ScreenShareOverlay.d.ts","sourceRoot":"","sources":["../../../../src/components/utility/ScreenShareOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEzC;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,IAAI,uBAAuB,sBAwE7D,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { Streami18n as CoreStreami18n } from '@stream-io/i18n';
2
+ import type { Streami18nOptions as CoreStreami18nOptions } from '@stream-io/i18n';
3
+ import type { BundledKey, TranslationCatalog } from './types';
4
+ /**
5
+ * Options for {@link Streami18n}.
6
+ *
7
+ * Core's options, narrowed to this SDK's catalog so `translationsForLanguage` is key-checked.
8
+ * `runtimeDefaults` is *merged* over the SDK's own rather than replacing it, so supplying it adds to
9
+ * what the SDK ships.
10
+ */
11
+ export type Streami18nOptions = CoreStreami18nOptions<TranslationCatalog>;
12
+ /**
13
+ * Wrapper around [i18next](https://www.i18next.com/) for this SDK's translations. Pass an instance
14
+ * to `<StreamVideo i18nInstance={…}>` to control the language and the copy.
15
+ *
16
+ * The implementation lives in `@stream-io/i18n`, shared with the web SDK and with Chat. This
17
+ * subclass exists even though {@link runtimeDefaults} is currently empty: its job is to bind the
18
+ * two type parameters, so `new Streami18n()` and its `t` are checked against *this* package's
19
+ * catalog rather than against core's `Record<string, string>` fallback, which would accept any key.
20
+ *
21
+ * ## Overriding some of the English copy
22
+ *
23
+ * ```ts
24
+ * const i18n = new Streami18n({
25
+ * translationsForLanguage: {
26
+ * 'common.you.label': 'Jij',
27
+ * },
28
+ * });
29
+ * ```
30
+ *
31
+ * ## Adding a language
32
+ *
33
+ * ```ts
34
+ * import 'dayjs/locale/nl';
35
+ *
36
+ * const i18n = new Streami18n({ language: 'nl' });
37
+ * i18n.registerTranslation('nl', {
38
+ * 'common.join.label': 'Deelnemen',
39
+ * });
40
+ * ```
41
+ *
42
+ * No dayjs locale file defines `calendar` — that field belongs to the calendar plugin — so a
43
+ * language whose relative dates must read natively needs the locale import *and* a `calendar`
44
+ * config passed as the third argument.
45
+ *
46
+ * Type your dictionary as `TranslationDictionary` to turn a typo or a key removed in a later major
47
+ * into a compile error. A **partial dictionary is safe**: any key you leave out renders the English
48
+ * copy that ships inline at each call site, never a raw dotted path — so there is no need to
49
+ * translate everything before shipping a language.
50
+ *
51
+ * Hermes ships a partial ICU, so `Intl.PluralRules` has no data for most locales and every count
52
+ * would select the `_other` form. Import `intl-pluralrules` before anything else in your entry
53
+ * file; core warns when it is missing.
54
+ *
55
+ * Reactivity goes through `i18n.state`, a `StateStore`. `setLanguage()` returns nothing — the new
56
+ * `t` is published to that store, which the provider subscribes to.
57
+ */
58
+ export declare class Streami18n extends CoreStreami18n<TranslationCatalog, BundledKey> {
59
+ constructor(options?: Streami18nOptions);
60
+ }
61
+ //# sourceMappingURL=Streami18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Streami18n.d.ts","sourceRoot":"","sources":["../../../src/i18n/Streami18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAGlF,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE9D;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,qBAAa,UAAW,SAAQ,cAAc,CAAC,kBAAkB,EAAE,UAAU,CAAC;gBAChE,OAAO,GAAE,iBAAsB;CAQ5C"}
@@ -0,0 +1,31 @@
1
+ import type { StreamTFunction, TDateTimeParser } from './types';
2
+ export type TranslationContextValue = {
3
+ t: StreamTFunction;
4
+ tDateTimeParser: TDateTimeParser;
5
+ };
6
+ /**
7
+ * Built from the shared factory in `@stream-io/i18n/react`.
8
+ *
9
+ * A **default value** is supplied rather than making the hook throw, and that is deliberate: it
10
+ * matches what `useI18n` did before this module existed, so a component rendered outside the
11
+ * provider keeps showing correct English instead of crashing. Chat's React Native SDK throws
12
+ * instead; hence core exposes this as a factory rather than one exported context.
13
+ */
14
+ declare const TranslationContext: import("react").Context<TranslationContextValue>, TranslationProvider: (props: import("react").PropsWithChildren<{
15
+ value: TranslationContextValue;
16
+ }>) => import("react").ReactElement;
17
+ export { TranslationContext, TranslationProvider };
18
+ /**
19
+ * Reads `t` and `tDateTimeParser` from the closest provider.
20
+ *
21
+ * Works outside a provider too — the default translator renders each call site's inline English.
22
+ *
23
+ * The name is `useI18n` rather than core's `useTranslationContext` because ~500 call sites across
24
+ * the video SDKs already import it; renaming them is churn with no payoff.
25
+ *
26
+ * @example
27
+ * const { t } = useI18n();
28
+ * const label = t('common.join.label', 'Join');
29
+ */
30
+ export declare const useI18n: () => TranslationContextValue;
31
+ //# sourceMappingURL=TranslationContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranslationContext.d.ts","sourceRoot":"","sources":["../../../src/i18n/TranslationContext.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEhE,MAAM,MAAM,uBAAuB,GAAG;IACpC,CAAC,EAAE,eAAe,CAAC;IACnB,eAAe,EAAE,eAAe,CAAC;CAClC,CAAC;AAYF;;;;;;;GAOG;AACH,QAAA,MAAQ,kBAAkB,oDAAE,mBAAmB;;mCAO3C,CAAC;AAEL,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO,+BAAwB,CAAC"}
@@ -0,0 +1,17 @@
1
+ export * from './Streami18n';
2
+ export * from './TranslationContext';
3
+ export * from './types';
4
+ export * from './useStreami18n';
5
+ /**
6
+ * Core helpers re-exported so an integrator never needs a direct dependency on `@stream-io/i18n`:
7
+ * that package is an implementation detail of this SDK, and a second copy resolved from their
8
+ * `node_modules` would register dayjs plugins on the wrong module.
9
+ *
10
+ * - `asDynamicKey` — brands a runtime-resolved string as a translation key, the one sanctioned way
11
+ * past the compile-time key check.
12
+ * - `getDateString` — the timestamp renderer, for a custom component formatting dates itself.
13
+ * - `predefinedFormatters` — the built-in i18next formatters, to spread over when adding one.
14
+ * - `defaultDateTimeParser` — the dayjs-backed parser, with the required plugins already applied.
15
+ */
16
+ export { asDynamicKey, defaultDateTimeParser, getDateString, predefinedFormatters, } from '@stream-io/i18n';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAEhC;;;;;;;;;;GAUG;AACH,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,oBAAoB,GACrB,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Every translation entry shipped with the SDK, mapped to its English copy.
3
+ *
4
+ * Plural entries appear as `<key>_one` / `<key>_other`; call sites use the bare `<key>` and
5
+ * pass `count`.
6
+ */
7
+ export type TranslationCatalog = {
8
+ 'common.join.label': 'Join';
9
+ 'common.joining.text': 'Joining...';
10
+ 'common.live.label': 'Live';
11
+ 'common.loading.text': 'Loading...';
12
+ 'common.you.label': 'You';
13
+ 'livestreamControls.start.label': 'Start Livestream';
14
+ 'livestreamControls.stop.label': 'Stop Livestream';
15
+ 'livestreamPlayer.ended.title': 'The livestream has ended.';
16
+ 'livestreamPlayer.ended.watchRecordings.title': 'Watch recordings:';
17
+ 'livestreamViewer.earlyParticipants.text_one': '{{ count }} participant has joined early';
18
+ 'livestreamViewer.earlyParticipants.text_other': '{{ count }} participants have joined early';
19
+ 'livestreamViewer.join.label': 'Join Livestream';
20
+ 'livestreamViewer.stillInProgress.text': 'Livestream is still in progress';
21
+ 'livestreamViewer.willStartIn.text': 'Livestream will start in:';
22
+ 'livestreamViewer.willStartSoon.text': 'Livestream will start soon';
23
+ 'lobby.beforeJoining.title': 'Before joining';
24
+ 'lobby.footer.aboutToJoin.text': 'You are about to join a call.';
25
+ 'lobby.footer.noOtherParticipants.text': 'Currently there are no other participants in the call.';
26
+ 'lobby.footer.otherParticipants.text_one': 'There is {{ count }} more person in the call.';
27
+ 'lobby.footer.otherParticipants.text_other': 'There are {{ count }} more people in the call.';
28
+ 'lobby.setupAudioVideo.description': 'Setup your audio and video';
29
+ 'participantView.screenShare.byUser.text': '{{ userName }} is sharing their screen';
30
+ 'participantView.screenShare.byYou.text': 'You are sharing your screen';
31
+ 'participantView.screenShare.stop.label': 'Stop Screen Sharing';
32
+ 'ringingCall.incoming.title': 'Incoming Call...';
33
+ 'ringingCall.leftCall.title': 'You have left the call';
34
+ 'ringingCall.outgoing.title': 'Calling...';
35
+ 'ringingCall.preparing.title': 'Preparing call';
36
+ 'screenShare.sharingWithEveryone.text': 'You are sharing your screen with everyone';
37
+ };
38
+ //# sourceMappingURL=keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../src/i18n/keys.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,qBAAqB,EAAE,YAAY,CAAC;IACpC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,qBAAqB,EAAE,YAAY,CAAC;IACpC,kBAAkB,EAAE,KAAK,CAAC;IAC1B,gCAAgC,EAAE,kBAAkB,CAAC;IACrD,+BAA+B,EAAE,iBAAiB,CAAC;IACnD,8BAA8B,EAAE,2BAA2B,CAAC;IAC5D,8CAA8C,EAAE,mBAAmB,CAAC;IACpE,6CAA6C,EAAE,0CAA0C,CAAC;IAC1F,+CAA+C,EAAE,4CAA4C,CAAC;IAC9F,6BAA6B,EAAE,iBAAiB,CAAC;IACjD,uCAAuC,EAAE,iCAAiC,CAAC;IAC3E,mCAAmC,EAAE,2BAA2B,CAAC;IACjE,qCAAqC,EAAE,4BAA4B,CAAC;IACpE,2BAA2B,EAAE,gBAAgB,CAAC;IAC9C,+BAA+B,EAAE,+BAA+B,CAAC;IACjE,uCAAuC,EAAE,wDAAwD,CAAC;IAClG,yCAAyC,EAAE,+CAA+C,CAAC;IAC3F,2CAA2C,EAAE,gDAAgD,CAAC;IAC9F,mCAAmC,EAAE,4BAA4B,CAAC;IAClE,yCAAyC,EAAE,wCAAwC,CAAC;IACpF,wCAAwC,EAAE,6BAA6B,CAAC;IACxE,wCAAwC,EAAE,qBAAqB,CAAC;IAChE,4BAA4B,EAAE,kBAAkB,CAAC;IACjD,4BAA4B,EAAE,wBAAwB,CAAC;IACvD,4BAA4B,EAAE,YAAY,CAAC;IAC3C,6BAA6B,EAAE,gBAAgB,CAAC;IAChD,sCAAsC,EAAE,2CAA2C,CAAC;CACrF,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The SDK's bundled translation data: the keys that cannot carry an inline `defaultValue` at their
3
+ * call site. `Streami18n` layers it under *every* language, so a partial dictionary never knocks
4
+ * these out.
5
+ *
6
+ * Empty, and that is the intended steady state. The four lookups this SDK resolved from a runtime
7
+ * value — the only candidates for an entry here — are written as `switch` statements over literal
8
+ * `t()` calls instead, so every branch carries its own English copy inline and the codegen reads it
9
+ * straight off the call site. Nothing is left without a default. `timestamp.*` / `duration.*`
10
+ * formatter expressions would also live here; this SDK has none yet.
11
+ *
12
+ * Adding an entry later needs no wiring. `Streami18n` already spreads this into the core options and
13
+ * `scripts/generate-i18n-keys.mts` already reads this path, so a new key reaches `keys.ts` on the
14
+ * next `build-translations` run — where a key nothing references, or one that shadows an inline
15
+ * default, fails a codegen guard.
16
+ */
17
+ export declare const runtimeDefaults: {};
18
+ //# sourceMappingURL=runtimeDefaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeDefaults.d.ts","sourceRoot":"","sources":["../../../src/i18n/runtimeDefaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,IAAK,CAAC"}
@@ -0,0 +1,46 @@
1
+ import type { Streami18nState as CoreStreami18nState, LooseTranslationDictionaryOf, RelativeTimeCatalog, StreamTFunctionFor, TranslationDictionaryOf, TranslationKeyOf } from '@stream-io/i18n';
2
+ import type { TranslationCatalog as GeneratedCatalog } from './keys';
3
+ /**
4
+ * The SDK's i18n types, instantiated from the generic helpers in `@stream-io/i18n`.
5
+ *
6
+ * The derivations live in core so both video SDKs (and Chat) share one implementation; the *catalog*
7
+ * stays here, because it is generated from this package's own `t()` call sites — which are not the
8
+ * web SDK's. That split is why core's helpers are generic over the catalog rather than driven by
9
+ * module augmentation: two catalogs have to be able to coexist in one TypeScript program, which a
10
+ * monorepo typechecking the web and React Native SDKs in one pass does.
11
+ *
12
+ * `relativeTime.*` is intersected in because it is core's copy, not ours: `timestampFormatter`
13
+ * renders "Today" / "3d ago" through `t()`, and without these keys in the catalog an integrator
14
+ * could not type a dictionary that translates them.
15
+ */
16
+ export type TranslationCatalog = GeneratedCatalog & RelativeTimeCatalog;
17
+ /**
18
+ * Keys resolved from bundled data rather than from an inline `defaultValue`.
19
+ *
20
+ * `never`, because `runtimeDefaults.ts` is empty — every key this SDK uses is written literally
21
+ * with its English copy at the call site. `timestamp.*` / `duration.*` are matched by prefix inside
22
+ * core and need no entry here.
23
+ *
24
+ * **It must never become `string`.** `string` collapses the prose overload in `StreamTFunctionFor`,
25
+ * which silently disables all key checking: every `t('typo.key', 'copy')` would compile. Widen it
26
+ * only to a literal prefix template (`` `foo.${string}` ``) when a real bundled key appears.
27
+ */
28
+ export type BundledKey = never;
29
+ export type TranslationKey = TranslationKeyOf<TranslationCatalog>;
30
+ export type TranslationDictionary = TranslationDictionaryOf<TranslationCatalog>;
31
+ export type LooseTranslationDictionary = LooseTranslationDictionaryOf<TranslationCatalog>;
32
+ export type StreamTFunction = StreamTFunctionFor<TranslationCatalog, BundledKey>;
33
+ /**
34
+ * The value held by `Streami18n.state`, parameterized for this SDK's catalog.
35
+ *
36
+ * Exported because `state` is public: a consumer subscribing to it needs to name the type for a
37
+ * module-scope selector. Core's default-parameterized `Streami18nState` is not a substitute — `t` is
38
+ * contravariant in its key parameter, so that one is not assignable to this.
39
+ */
40
+ export type Streami18nState = CoreStreami18nState<TranslationCatalog, BundledKey>;
41
+ /**
42
+ * Re-exported so an integrator can type a formatter, a locale config or a date parser without
43
+ * taking a direct dependency on `@stream-io/i18n`.
44
+ */
45
+ export type { CustomFormatters, DateTimeParserModule, DayjsLocaleConfig, DurationFormatterOptions, DynamicTranslationKey, FormatterFactory, LooseTranslateFunction, PredefinedFormatters, TDateTimeParser, TDateTimeParserInput, TDateTimeParserOutput, TimestampFormatterOptions, } from '@stream-io/i18n';
46
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/i18n/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,IAAI,mBAAmB,EACtC,4BAA4B,EAC5B,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,kBAAkB,IAAI,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAErE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG,mBAAmB,CAAC;AAExE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC;AAE/B,MAAM,MAAM,cAAc,GAAG,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;AAClE,MAAM,MAAM,qBAAqB,GAAG,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;AAChF,MAAM,MAAM,0BAA0B,GACpC,4BAA4B,CAAC,kBAAkB,CAAC,CAAC;AACnD,MAAM,MAAM,eAAe,GAAG,kBAAkB,CAC9C,kBAAkB,EAClB,UAAU,CACX,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAC/C,kBAAkB,EAClB,UAAU,CACX,CAAC;AAEF;;;GAGG;AACH,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Streami18n } from './Streami18n';
2
+ import type { TranslationContextValue } from './TranslationContext';
3
+ import type { LooseTranslationDictionary } from './types';
4
+ export type UseStreami18nParams = {
5
+ /** An instance the integrator configured. One is created when absent. */
6
+ i18nInstance?: Streami18n;
7
+ /** The language the SDK's copy renders in. Changing it switches languages in place. */
8
+ language?: string;
9
+ /** Dictionaries to register, keyed by language code. Partial dictionaries are safe. */
10
+ translations?: Record<string, LooseTranslationDictionary>;
11
+ };
12
+ /**
13
+ * Resolves the translation context value: creates or adopts a {@link Streami18n} instance,
14
+ * registers the supplied dictionaries, initializes it and keeps `t` fresh across language changes.
15
+ *
16
+ * `init()` and the store subscription belong to `useStreami18nState` in `@stream-io/i18n/react`,
17
+ * shared with the web SDK.
18
+ */
19
+ export declare const useStreami18n: ({ i18nInstance, language, translations, }: UseStreami18nParams) => TranslationContextValue;
20
+ //# sourceMappingURL=useStreami18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStreami18n.d.ts","sourceRoot":"","sources":["../../../src/i18n/useStreami18n.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAE1D,MAAM,MAAM,mBAAmB,GAAG;IAChC,yEAAyE;IACzE,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;CAC3D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GAAI,2CAI3B,mBAAmB,KAAG,uBAsCxB,CAAC"}
@@ -12,9 +12,10 @@ export * from './contexts';
12
12
  export * from './hooks';
13
13
  export * from './theme';
14
14
  export * from './utils';
15
- export * from './translations';
15
+ export * from './i18n';
16
16
  export * from './modules/call-manager';
17
17
  export { StreamVideo } from './providers/StreamVideo';
18
18
  export { StreamCall } from './providers/StreamCall';
19
+ export { EncryptionManager } from './modules/encryption';
19
20
  export * from './providers/NoiseCancellation';
20
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,+CAA+C;AAC/C,OAAO,wBAAwB,CAAC;AAChC,8BAA8B;AAC9B,OAAO,gCAAgC,CAAC;AACxC,6IAA6I;AAC7I,OAAO,kBAAkB,CAAC;AAK1B,OAAO,mCAAmC,CAAC;AAa3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AAIvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,+CAA+C;AAC/C,OAAO,wBAAwB,CAAC;AAChC,8BAA8B;AAC9B,OAAO,gCAAgC,CAAC;AACxC,6IAA6I;AAC7I,OAAO,kBAAkB,CAAC;AAK1B,OAAO,mCAAmC,CAAC;AAa3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,wBAAwB,CAAC;AAIvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAKpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,cAAc,+BAA+B,CAAC"}
@@ -0,0 +1,190 @@
1
+ import { type E2EEEventMap, type E2EEManager, type EncryptionManagerOptions, type Listener } from '@stream-io/video-client';
2
+ /**
3
+ * Distributes keys to the native encryption manager and attaches
4
+ * encrypt/decrypt transforms to RTCRtpSenders and RTCRtpReceivers.
5
+ *
6
+ * The public surface matches the web
7
+ * {@link https://github.com/GetStream/stream-video-js/blob/main/packages/client/src/rtc/e2ee/EncryptionManager.ts | EncryptionManager}
8
+ * method for method, so host code is portable between the two SDKs.
9
+ *
10
+ * The crypto itself lives in the WebRTC binary, not here: frames never cross
11
+ * the React Native bridge. This class carries key and attach commands over it,
12
+ * and diagnostic events back.
13
+ *
14
+ * Like the keys it installs, the manager is application-owned: create one per
15
+ * call, attach it before {@link https://github.com/GetStream/stream-video-js/blob/main/packages/client/src/Call.ts | Call}`.join()`,
16
+ * and {@link EncryptionManager.dispose | dispose} it when that call is done.
17
+ * Nothing in the SDK will do it for you, and on React Native the leak is native
18
+ * rather than collectable.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * if (EncryptionManager.isSupported()) {
23
+ * const e2ee = await EncryptionManager.create(call.currentUserId);
24
+ * e2ee.setSharedKey(0, keyBytes);
25
+ * call.setE2EEManager(e2ee); // must happen before call.join()
26
+ * }
27
+ * ```
28
+ */
29
+ export declare class EncryptionManager implements E2EEManager {
30
+ private readonly algorithm;
31
+ private readonly native;
32
+ private readonly events;
33
+ private readonly logger;
34
+ private readonly bridged;
35
+ private disposed;
36
+ private constructor();
37
+ private handleNativeEvent;
38
+ /**
39
+ * Whether E2EE can run here. Use it to guard UI, or to avoid calling
40
+ * {@link create} where it would throw.
41
+ *
42
+ * `false` means the installed `@stream-io/react-native-webrtc` predates E2EE
43
+ * support.
44
+ */
45
+ static isSupported: () => boolean;
46
+ /**
47
+ * Create an EncryptionManager and initialize the underlying native manager.
48
+ *
49
+ * Attach it with `call.setE2EEManager()` **before** `call.join()`: the join
50
+ * request carries the E2EE flag, and the peer connections are built with the
51
+ * transforms in place.
52
+ *
53
+ * Resolves rather than returning directly because every Stream SDK exposes
54
+ * this as a promise; nothing here is actually asynchronous, since a blocking
55
+ * native create is what keeps a sender from ever existing unencrypted.
56
+ *
57
+ * @param userId - The local user's ID, normally `call.currentUserId`.
58
+ * @param options - the create options.
59
+ * @throws {Error} If E2EE is unavailable. It never degrades to plaintext.
60
+ */
61
+ static create: (userId: string, options?: EncryptionManagerOptions) => Promise<EncryptionManager>;
62
+ /**
63
+ * Subscribe to an E2EE event.
64
+ *
65
+ * @returns a function that unsubscribes the listener.
66
+ */
67
+ on: <E extends keyof E2EEEventMap>(event: E, fn: Listener<E2EEEventMap[E]>) => (() => void);
68
+ /** Unsubscribe a listener registered with {@link on}. */
69
+ off: <E extends keyof E2EEEventMap>(event: E, fn: Listener<E2EEEventMap[E]>) => void;
70
+ /** Drop every listener, or every listener of one event. */
71
+ removeAllListeners: (event?: keyof E2EEEventMap) => void;
72
+ /**
73
+ * Set a per-user AES-GCM encryption key in the native key store.
74
+ *
75
+ * Use it when each participant has their own key from a central authority.
76
+ * The receiver picks the right one by the `keyIndex` in the frame trailer.
77
+ *
78
+ * @param userId - The key owner.
79
+ * @param keyIndex - Increases with each rotation.
80
+ * @param rawKey - 16 bytes for AES-128-GCM, 32 for AES-256-GCM.
81
+ */
82
+ setKey: (userId: string, keyIndex: number, rawKey: ArrayBuffer) => void;
83
+ /**
84
+ * Fallback key for any user without a per-user key. The simplest E2EE mode:
85
+ * one key for everyone, usually passphrase-derived, no distribution needed.
86
+ * Setting an epoch makes it active for encryption while older epochs remain
87
+ * available to decrypt in-flight frames until {@link removeSharedKey}.
88
+ *
89
+ * @param keyIndex - An integer 0-255, since one trailer byte carries it.
90
+ * @param rawKey - 16 bytes for AES-128-GCM, 32 for AES-256-GCM.
91
+ */
92
+ setSharedKey: (keyIndex: number, rawKey: ArrayBuffer) => void;
93
+ /**
94
+ * Retire one of a user's key epochs, leaving their other epochs usable.
95
+ *
96
+ * @param userId - The key owner.
97
+ * @param keyIndex - The exact epoch to remove. Absent epochs are a no-op.
98
+ */
99
+ removeKey: (userId: string, keyIndex: number) => void;
100
+ /**
101
+ * Drop every key a user holds from the local key store, so later frames of
102
+ * theirs no longer decrypt.
103
+ *
104
+ * This is local cleanup, not remote revocation: it cannot stop that
105
+ * participant from decrypting anything, and a shared key still decrypts them.
106
+ * Revoking access means withholding future keys, which the application owns.
107
+ *
108
+ * To retire one rotated epoch instead, use {@link removeKey}.
109
+ */
110
+ removeAllKeys: (userId: string) => void;
111
+ /**
112
+ * Remove one shared-key epoch from the native receive key ring.
113
+ *
114
+ * If this is the active epoch, shared-key encryption stops until
115
+ * {@link setSharedKey} succeeds again. An older epoch is not reactivated.
116
+ *
117
+ * @param keyIndex - The exact shared-key epoch to remove.
118
+ */
119
+ removeSharedKey: (keyIndex: number) => void;
120
+ /**
121
+ * Called by the Publisher when it adds a transceiver.
122
+ *
123
+ * Synchronous all the way to the native `SetFrameTransformer` call: were it
124
+ * async, the sender would exist before its transform did, which is a
125
+ * plaintext window. A failure throws instead of publishing cleartext.
126
+ *
127
+ * @param sender - The sender to encrypt.
128
+ * @param codec - Codec name, e.g. 'vp8', selecting the clear-byte rules.
129
+ * @param trackType - `TrackType` enum name, e.g. 'SCREEN_SHARE_AUDIO'.
130
+ * @internal
131
+ */
132
+ encrypt: (sender: RTCRtpSender, codec?: string, trackType?: string) => void;
133
+ /**
134
+ * Called by the Subscriber when a remote track arrives.
135
+ *
136
+ * @param receiver - The receiver to decrypt.
137
+ * @param userId - The remote user, for key lookup.
138
+ * @param trackType - `TrackType` enum name, e.g. 'SCREEN_SHARE_AUDIO'.
139
+ * @internal
140
+ */
141
+ decrypt: (receiver: RTCRtpReceiver, userId: string, trackType?: string) => void;
142
+ /**
143
+ * Toggle periodic performance reporting.
144
+ *
145
+ * While on, `e2ee.perf_report` is emitted once per second with per-track FPS
146
+ * and crypto timings. Useful for debugging throughput.
147
+ */
148
+ enablePerformanceReporting: (enabled: boolean) => void;
149
+ /**
150
+ * Request a snapshot of the installed keys. It arrives later as the
151
+ * `e2ee.key_state` event, listing fingerprints only, never key material.
152
+ */
153
+ requestKeyState: () => void;
154
+ /**
155
+ * Release the native manager and all resources.
156
+ *
157
+ * **The application owns this object's lifetime — the SDK never disposes it.**
158
+ * Nothing releases the native manager when a peer connection closes, and there
159
+ * is no detach API, so an undisposed manager keeps its transforms and its key
160
+ * material alive for the lifetime of the process. Dispose it together with the
161
+ * call instance whose flow has ended; a later flow gets a fresh call and a
162
+ * fresh manager (see `Call.setE2EEManager`).
163
+ *
164
+ * In-flight frames are dropped rather than drained.
165
+ *
166
+ * The manager is unusable afterwards and every key or attach method throws.
167
+ * Call {@link create} for a new one. Safe to call more than once.
168
+ */
169
+ dispose: () => void;
170
+ /**
171
+ * {@link dispose} releases the native manager, so an attached transform would
172
+ * point at nothing: frames would stall with no error and no event. Throwing
173
+ * is also fail-closed, since a caller that swallows it still publishes
174
+ * nothing rather than cleartext.
175
+ */
176
+ private assertUsable;
177
+ /**
178
+ * The caller keeps ownership of its buffer and may re-import the same bytes,
179
+ * so hand native a copy rather than a view onto memory that can change.
180
+ */
181
+ private copyKey;
182
+ private validateKeyLength;
183
+ /**
184
+ * One trailer byte carries the keyIndex. A larger value would truncate to
185
+ * `keyIndex & 0xFF`, so the receiver would look up the wrong key and fail
186
+ * every decrypt. Reject it rather than ship a silently broken key epoch.
187
+ */
188
+ private validateKeyIndex;
189
+ }
190
+ //# sourceMappingURL=EncryptionManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EncryptionManager.d.ts","sourceRoot":"","sources":["../../../../src/modules/encryption/EncryptionManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EAEd,MAAM,yBAAyB,CAAC;AAQjC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,iBAAkB,YAAW,WAAW;IACnD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgB;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;IAC9C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkC;IACzD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAEjB;IACP,OAAO,CAAC,QAAQ,CAAS;IAEzB,OAAO;IAaP,OAAO,CAAC,iBAAiB,CAIvB;IAEF;;;;;;OAMG;IACH,MAAM,CAAC,WAAW,QAAO,OAAO,CACe;IAE/C;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,MAAM,GACX,QAAQ,MAAM,EACd,UAAU,wBAAwB,KACjC,OAAO,CAAC,iBAAiB,CAAC,CAc3B;IAEF;;;;OAIG;IACH,EAAE,GAAI,CAAC,SAAS,MAAM,YAAY,EAChC,OAAO,CAAC,EACR,IAAI,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAC5B,CAAC,MAAM,IAAI,CAAC,CAA8B;IAE7C,yDAAyD;IACzD,GAAG,GAAI,CAAC,SAAS,MAAM,YAAY,EACjC,OAAO,CAAC,EACR,IAAI,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAC5B,IAAI,CAA+B;IAEtC,2DAA2D;IAC3D,kBAAkB,GAAI,QAAQ,MAAM,YAAY,KAAG,IAAI,CACf;IAExC;;;;;;;;;OASG;IACH,MAAM,GAAI,QAAQ,MAAM,EAAE,UAAU,MAAM,EAAE,QAAQ,WAAW,KAAG,IAAI,CAKpE;IAEF;;;;;;;;OAQG;IACH,YAAY,GAAI,UAAU,MAAM,EAAE,QAAQ,WAAW,KAAG,IAAI,CAK1D;IAEF;;;;;OAKG;IACH,SAAS,GAAI,QAAQ,MAAM,EAAE,UAAU,MAAM,KAAG,IAAI,CAIlD;IAEF;;;;;;;;;OASG;IACH,aAAa,GAAI,QAAQ,MAAM,KAAG,IAAI,CAGpC;IAEF;;;;;;;OAOG;IACH,eAAe,GAAI,UAAU,MAAM,KAAG,IAAI,CAIxC;IAEF;;;;;;;;;;;OAWG;IACH,OAAO,GACL,QAAQ,YAAY,EACpB,QAAQ,MAAM,EACd,YAAY,MAAM,KACjB,IAAI,CAGL;IAEF;;;;;;;OAOG;IACH,OAAO,GACL,UAAU,cAAc,EACxB,QAAQ,MAAM,EACd,YAAY,MAAM,KACjB,IAAI,CAOL;IAEF;;;;;OAKG;IACH,0BAA0B,GAAI,SAAS,OAAO,KAAG,IAAI,CASnD;IAEF;;;OAGG;IACH,eAAe,QAAO,IAAI,CAKxB;IAEF;;;;;;;;;;;;;;OAcG;IACH,OAAO,QAAO,IAAI,CAchB;IAEF;;;;;OAKG;IACH,OAAO,CAAC,YAAY,CAElB;IAEF;;;OAGG;IACH,OAAO,CAAC,OAAO,CAIb;IAEF,OAAO,CAAC,iBAAiB,CAQvB;IAEF;;;;OAIG;IACH,OAAO,CAAC,gBAAgB,CAMtB;CACH"}
@@ -0,0 +1,38 @@
1
+ import { RTCEncryptionAlgorithm, RTCEncryptionTrackType, type RTCEncryptionEventData } from '@stream-io/react-native-webrtc';
2
+ import type { E2EEAlgorithm, E2EEEventMap } from '@stream-io/video-client';
3
+ /**
4
+ * The core RTC layer labels tracks with the `TrackType` enum *name*
5
+ * (`SfuModels.TrackType[trackType]`), while the native manager takes a numeric
6
+ * enum. Screen-share audio is deliberately its own value: native keeps replay
7
+ * state per (userId, trackType), so folding it into `AUDIO` mis-groups it.
8
+ *
9
+ * These read the native enums inside the function body on purpose. This module
10
+ * is reachable from the SDK's public entry point, so an app whose
11
+ * `@stream-io/react-native-webrtc` predates E2EE would crash on import if the
12
+ * enums were dereferenced at module scope - even if it never touches E2EE.
13
+ */
14
+ export declare const trackTypeToNative: (trackType?: string) => RTCEncryptionTrackType | undefined;
15
+ /** Map a native track type back to the name the web events carry. */
16
+ export declare const trackTypeFromNative: (trackType?: RTCEncryptionTrackType | number) => string | undefined;
17
+ /** Map the public algorithm name to the native enum. */
18
+ export declare const algorithmToNative: (algorithm: E2EEAlgorithm) => RTCEncryptionAlgorithm;
19
+ /**
20
+ * Translate a native event into the payload the web manager emits, so a host
21
+ * can write one set of handlers for both platforms.
22
+ *
23
+ * Two things have to be reshaped rather than passed through: native track types
24
+ * are numeric, and native flattens `managerId`/`type`/`userId` alongside the
25
+ * payload of every event, including the two (`perf_report`, `key_state`) that
26
+ * are not about a single user. Fields the web types require but native leaves
27
+ * optional get an explicit default, so a handler never reads `undefined` where
28
+ * its type promises a value.
29
+ *
30
+ * @returns the mapped event, or `undefined` for an unrecognized event name.
31
+ */
32
+ export declare const mapNativeEvent: <E extends keyof E2EEEventMap>(event: RTCEncryptionEventData) => {
33
+ type: E;
34
+ payload: E2EEEventMap[E];
35
+ } | undefined;
36
+ /** Every event the native manager emits, i.e. what the bridge subscribes to. */
37
+ export declare const E2EE_EVENT_TYPES: readonly ["e2ee.decryption_failed", "e2ee.decryption_resumed", "e2ee.decryption_stalled", "e2ee.encryption_failed", "e2ee.missing_key", "e2ee.unencrypted_frame", "e2ee.unsupported_version", "e2ee.perf_report", "e2ee.key_state"];
38
+ //# sourceMappingURL=eventMapping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eventMapping.d.ts","sourceRoot":"","sources":["../../../../src/modules/encryption/eventMapping.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,sBAAsB,EAE5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EAEb,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,GAC5B,YAAY,MAAM,KACjB,sBAAsB,GAAG,SAe3B,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,mBAAmB,GAC9B,YAAY,sBAAsB,GAAG,MAAM,KAC1C,MAAM,GAAG,SAaX,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,iBAAiB,GAC5B,WAAW,aAAa,KACvB,sBAGqC,CAAC;AASzC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,YAAY,EACzD,OAAO,sBAAsB,KAC5B;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;CAAE,GAAG,SA+C1C,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,qOAUnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { EncryptionManager } from './EncryptionManager';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/encryption/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}