@stream-io/video-react-native-sdk 0.1.10 → 0.1.12

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 (290) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNative.kt +19 -1
  3. package/android/src/main/java/com/streamvideo/reactnative/StreamVideoReactNativeModule.kt +82 -2
  4. package/dist/commonjs/components/Call/CallContent/CallContent.js +9 -7
  5. package/dist/commonjs/components/Call/CallContent/CallContent.js.map +1 -1
  6. package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js +7 -2
  7. package/dist/commonjs/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
  8. package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js +3 -1
  9. package/dist/commonjs/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
  10. package/dist/commonjs/components/Livestream/HostLivestream/HostLivestream.js +71 -0
  11. package/dist/commonjs/components/Livestream/HostLivestream/HostLivestream.js.map +1 -0
  12. package/dist/commonjs/components/Livestream/HostLivestream/index.js +17 -0
  13. package/dist/commonjs/components/Livestream/HostLivestream/index.js.map +1 -0
  14. package/dist/commonjs/components/Livestream/LivestreamControls/HostLivestreamControls.js +69 -0
  15. package/dist/commonjs/components/Livestream/LivestreamControls/HostLivestreamControls.js.map +1 -0
  16. package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js +113 -0
  17. package/dist/commonjs/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -0
  18. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js +70 -0
  19. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js.map +1 -0
  20. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamMediaControls.js +38 -0
  21. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamMediaControls.js.map +1 -0
  22. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js +70 -0
  23. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js.map +1 -0
  24. package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js +83 -0
  25. package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js.map +1 -0
  26. package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLivestreamControls.js +64 -0
  27. package/dist/commonjs/components/Livestream/LivestreamControls/ViewerLivestreamControls.js.map +1 -0
  28. package/dist/commonjs/components/Livestream/LivestreamControls/index.js +61 -0
  29. package/dist/commonjs/components/Livestream/LivestreamControls/index.js.map +1 -0
  30. package/dist/commonjs/components/Livestream/LivestreamLayout/LivestreamLayout.js +65 -0
  31. package/dist/commonjs/components/Livestream/LivestreamLayout/LivestreamLayout.js.map +1 -0
  32. package/dist/commonjs/components/Livestream/LivestreamLayout/index.js +17 -0
  33. package/dist/commonjs/components/Livestream/LivestreamLayout/index.js.map +1 -0
  34. package/dist/commonjs/components/Livestream/LivestreamTopView/DurationBadge.js +144 -0
  35. package/dist/commonjs/components/Livestream/LivestreamTopView/DurationBadge.js.map +1 -0
  36. package/dist/commonjs/components/Livestream/LivestreamTopView/FollowerCount.js +71 -0
  37. package/dist/commonjs/components/Livestream/LivestreamTopView/FollowerCount.js.map +1 -0
  38. package/dist/commonjs/components/Livestream/LivestreamTopView/HostLivestreamTopView.js +87 -0
  39. package/dist/commonjs/components/Livestream/LivestreamTopView/HostLivestreamTopView.js.map +1 -0
  40. package/dist/commonjs/components/Livestream/LivestreamTopView/LiveIndicator.js +55 -0
  41. package/dist/commonjs/components/Livestream/LivestreamTopView/LiveIndicator.js.map +1 -0
  42. package/dist/commonjs/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js +80 -0
  43. package/dist/commonjs/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js.map +1 -0
  44. package/dist/commonjs/components/Livestream/LivestreamTopView/index.js +50 -0
  45. package/dist/commonjs/components/Livestream/LivestreamTopView/index.js.map +1 -0
  46. package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLivestream.js +88 -0
  47. package/dist/commonjs/components/Livestream/ViewerLivestream/ViewerLivestream.js.map +1 -0
  48. package/dist/commonjs/components/Livestream/ViewerLivestream/index.js +17 -0
  49. package/dist/commonjs/components/Livestream/ViewerLivestream/index.js.map +1 -0
  50. package/dist/commonjs/components/Livestream/index.js +61 -0
  51. package/dist/commonjs/components/Livestream/index.js.map +1 -0
  52. package/dist/commonjs/components/index.js +11 -0
  53. package/dist/commonjs/components/index.js.map +1 -1
  54. package/dist/commonjs/hooks/index.js +22 -0
  55. package/dist/commonjs/hooks/index.js.map +1 -1
  56. package/dist/commonjs/hooks/useAutoEnterPiPEffect.js +20 -0
  57. package/dist/commonjs/hooks/useAutoEnterPiPEffect.js.map +1 -0
  58. package/dist/commonjs/hooks/useIsInPiPMode.js +25 -0
  59. package/dist/commonjs/hooks/useIsInPiPMode.js.map +1 -0
  60. package/dist/commonjs/hooks/usePaginatedLayoutSortPreset.js +26 -0
  61. package/dist/commonjs/hooks/usePaginatedLayoutSortPreset.js.map +1 -0
  62. package/dist/commonjs/icons/EndStreamIcon.js +20 -0
  63. package/dist/commonjs/icons/EndStreamIcon.js.map +1 -0
  64. package/dist/commonjs/icons/Eye.js +20 -0
  65. package/dist/commonjs/icons/Eye.js.map +1 -0
  66. package/dist/commonjs/icons/LeaveStreamIcon.js +20 -0
  67. package/dist/commonjs/icons/LeaveStreamIcon.js.map +1 -0
  68. package/dist/commonjs/icons/ShieldBadge.js +20 -0
  69. package/dist/commonjs/icons/ShieldBadge.js.map +1 -0
  70. package/dist/commonjs/icons/StartStreamIcon.js +20 -0
  71. package/dist/commonjs/icons/StartStreamIcon.js.map +1 -0
  72. package/dist/commonjs/icons/index.js +55 -0
  73. package/dist/commonjs/icons/index.js.map +1 -1
  74. package/dist/commonjs/providers/MediaStreamManagement.js +15 -2
  75. package/dist/commonjs/providers/MediaStreamManagement.js.map +1 -1
  76. package/dist/commonjs/theme/theme.js +70 -0
  77. package/dist/commonjs/theme/theme.js.map +1 -1
  78. package/dist/commonjs/translations/en.json +6 -1
  79. package/dist/commonjs/utils/enterPiPAndroid.js +15 -0
  80. package/dist/commonjs/utils/enterPiPAndroid.js.map +1 -0
  81. package/dist/commonjs/utils/index.js +12 -0
  82. package/dist/commonjs/utils/index.js.map +1 -1
  83. package/dist/commonjs/version.js +1 -1
  84. package/dist/module/components/Call/CallContent/CallContent.js +10 -7
  85. package/dist/module/components/Call/CallContent/CallContent.js.map +1 -1
  86. package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js +7 -2
  87. package/dist/module/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
  88. package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js +3 -1
  89. package/dist/module/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
  90. package/dist/module/components/Livestream/HostLivestream/HostLivestream.js +64 -0
  91. package/dist/module/components/Livestream/HostLivestream/HostLivestream.js.map +1 -0
  92. package/dist/module/components/Livestream/HostLivestream/index.js +2 -0
  93. package/dist/module/components/Livestream/HostLivestream/index.js.map +1 -0
  94. package/dist/module/components/Livestream/LivestreamControls/HostLivestreamControls.js +62 -0
  95. package/dist/module/components/Livestream/LivestreamControls/HostLivestreamControls.js.map +1 -0
  96. package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js +105 -0
  97. package/dist/module/components/Livestream/LivestreamControls/HostStartStreamButton.js.map +1 -0
  98. package/dist/module/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js +63 -0
  99. package/dist/module/components/Livestream/LivestreamControls/LivestreamAudioControlButton.js.map +1 -0
  100. package/dist/module/components/Livestream/LivestreamControls/LivestreamMediaControls.js +31 -0
  101. package/dist/module/components/Livestream/LivestreamControls/LivestreamMediaControls.js.map +1 -0
  102. package/dist/module/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js +63 -0
  103. package/dist/module/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js.map +1 -0
  104. package/dist/module/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js +75 -0
  105. package/dist/module/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.js.map +1 -0
  106. package/dist/module/components/Livestream/LivestreamControls/ViewerLivestreamControls.js +57 -0
  107. package/dist/module/components/Livestream/LivestreamControls/ViewerLivestreamControls.js.map +1 -0
  108. package/dist/module/components/Livestream/LivestreamControls/index.js +6 -0
  109. package/dist/module/components/Livestream/LivestreamControls/index.js.map +1 -0
  110. package/dist/module/components/Livestream/LivestreamLayout/LivestreamLayout.js +58 -0
  111. package/dist/module/components/Livestream/LivestreamLayout/LivestreamLayout.js.map +1 -0
  112. package/dist/module/components/Livestream/LivestreamLayout/index.js +2 -0
  113. package/dist/module/components/Livestream/LivestreamLayout/index.js.map +1 -0
  114. package/dist/module/components/Livestream/LivestreamTopView/DurationBadge.js +136 -0
  115. package/dist/module/components/Livestream/LivestreamTopView/DurationBadge.js.map +1 -0
  116. package/dist/module/components/Livestream/LivestreamTopView/FollowerCount.js +64 -0
  117. package/dist/module/components/Livestream/LivestreamTopView/FollowerCount.js.map +1 -0
  118. package/dist/module/components/Livestream/LivestreamTopView/HostLivestreamTopView.js +80 -0
  119. package/dist/module/components/Livestream/LivestreamTopView/HostLivestreamTopView.js.map +1 -0
  120. package/dist/module/components/Livestream/LivestreamTopView/LiveIndicator.js +48 -0
  121. package/dist/module/components/Livestream/LivestreamTopView/LiveIndicator.js.map +1 -0
  122. package/dist/module/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js +73 -0
  123. package/dist/module/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.js.map +1 -0
  124. package/dist/module/components/Livestream/LivestreamTopView/index.js +5 -0
  125. package/dist/module/components/Livestream/LivestreamTopView/index.js.map +1 -0
  126. package/dist/module/components/Livestream/ViewerLivestream/ViewerLivestream.js +81 -0
  127. package/dist/module/components/Livestream/ViewerLivestream/ViewerLivestream.js.map +1 -0
  128. package/dist/module/components/Livestream/ViewerLivestream/index.js +2 -0
  129. package/dist/module/components/Livestream/ViewerLivestream/index.js.map +1 -0
  130. package/dist/module/components/Livestream/index.js +6 -0
  131. package/dist/module/components/Livestream/index.js.map +1 -0
  132. package/dist/module/components/index.js +1 -0
  133. package/dist/module/components/index.js.map +1 -1
  134. package/dist/module/hooks/index.js +2 -0
  135. package/dist/module/hooks/index.js.map +1 -1
  136. package/dist/module/hooks/useAutoEnterPiPEffect.js +14 -0
  137. package/dist/module/hooks/useAutoEnterPiPEffect.js.map +1 -0
  138. package/dist/module/hooks/useIsInPiPMode.js +19 -0
  139. package/dist/module/hooks/useIsInPiPMode.js.map +1 -0
  140. package/dist/module/hooks/usePaginatedLayoutSortPreset.js +19 -0
  141. package/dist/module/hooks/usePaginatedLayoutSortPreset.js.map +1 -0
  142. package/dist/module/icons/EndStreamIcon.js +12 -0
  143. package/dist/module/icons/EndStreamIcon.js.map +1 -0
  144. package/dist/module/icons/Eye.js +12 -0
  145. package/dist/module/icons/Eye.js.map +1 -0
  146. package/dist/module/icons/LeaveStreamIcon.js +12 -0
  147. package/dist/module/icons/LeaveStreamIcon.js.map +1 -0
  148. package/dist/module/icons/ShieldBadge.js +12 -0
  149. package/dist/module/icons/ShieldBadge.js.map +1 -0
  150. package/dist/module/icons/StartStreamIcon.js +12 -0
  151. package/dist/module/icons/StartStreamIcon.js.map +1 -0
  152. package/dist/module/icons/index.js +5 -0
  153. package/dist/module/icons/index.js.map +1 -1
  154. package/dist/module/providers/MediaStreamManagement.js +15 -2
  155. package/dist/module/providers/MediaStreamManagement.js.map +1 -1
  156. package/dist/module/theme/theme.js +70 -0
  157. package/dist/module/theme/theme.js.map +1 -1
  158. package/dist/module/translations/en.json +6 -1
  159. package/dist/module/utils/enterPiPAndroid.js +9 -0
  160. package/dist/module/utils/enterPiPAndroid.js.map +1 -0
  161. package/dist/module/utils/index.js +1 -0
  162. package/dist/module/utils/index.js.map +1 -1
  163. package/dist/module/version.js +1 -1
  164. package/dist/typescript/components/Call/CallContent/CallContent.d.ts.map +1 -1
  165. package/dist/typescript/components/Call/CallLayout/CallParticipantsGrid.d.ts.map +1 -1
  166. package/dist/typescript/components/Call/CallLayout/CallParticipantsSpotlight.d.ts.map +1 -1
  167. package/dist/typescript/components/Livestream/HostLivestream/HostLivestream.d.ts +30 -0
  168. package/dist/typescript/components/Livestream/HostLivestream/HostLivestream.d.ts.map +1 -0
  169. package/dist/typescript/components/Livestream/HostLivestream/index.d.ts +2 -0
  170. package/dist/typescript/components/Livestream/HostLivestream/index.d.ts.map +1 -0
  171. package/dist/typescript/components/Livestream/LivestreamControls/HostLivestreamControls.d.ts +25 -0
  172. package/dist/typescript/components/Livestream/LivestreamControls/HostLivestreamControls.d.ts.map +1 -0
  173. package/dist/typescript/components/Livestream/LivestreamControls/HostStartStreamButton.d.ts +25 -0
  174. package/dist/typescript/components/Livestream/LivestreamControls/HostStartStreamButton.d.ts.map +1 -0
  175. package/dist/typescript/components/Livestream/LivestreamControls/LivestreamAudioControlButton.d.ts +6 -0
  176. package/dist/typescript/components/Livestream/LivestreamControls/LivestreamAudioControlButton.d.ts.map +1 -0
  177. package/dist/typescript/components/Livestream/LivestreamControls/LivestreamMediaControls.d.ts +10 -0
  178. package/dist/typescript/components/Livestream/LivestreamControls/LivestreamMediaControls.d.ts.map +1 -0
  179. package/dist/typescript/components/Livestream/LivestreamControls/LivestreamVideoControlButton.d.ts +6 -0
  180. package/dist/typescript/components/Livestream/LivestreamControls/LivestreamVideoControlButton.d.ts.map +1 -0
  181. package/dist/typescript/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.d.ts +16 -0
  182. package/dist/typescript/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.d.ts.map +1 -0
  183. package/dist/typescript/components/Livestream/LivestreamControls/ViewerLivestreamControls.d.ts +16 -0
  184. package/dist/typescript/components/Livestream/LivestreamControls/ViewerLivestreamControls.d.ts.map +1 -0
  185. package/dist/typescript/components/Livestream/LivestreamControls/index.d.ts +6 -0
  186. package/dist/typescript/components/Livestream/LivestreamControls/index.d.ts.map +1 -0
  187. package/dist/typescript/components/Livestream/LivestreamLayout/LivestreamLayout.d.ts +17 -0
  188. package/dist/typescript/components/Livestream/LivestreamLayout/LivestreamLayout.d.ts.map +1 -0
  189. package/dist/typescript/components/Livestream/LivestreamLayout/index.d.ts +2 -0
  190. package/dist/typescript/components/Livestream/LivestreamLayout/index.d.ts.map +1 -0
  191. package/dist/typescript/components/Livestream/LivestreamTopView/DurationBadge.d.ts +12 -0
  192. package/dist/typescript/components/Livestream/LivestreamTopView/DurationBadge.d.ts.map +1 -0
  193. package/dist/typescript/components/Livestream/LivestreamTopView/FollowerCount.d.ts +10 -0
  194. package/dist/typescript/components/Livestream/LivestreamTopView/FollowerCount.d.ts.map +1 -0
  195. package/dist/typescript/components/Livestream/LivestreamTopView/HostLivestreamTopView.d.ts +26 -0
  196. package/dist/typescript/components/Livestream/LivestreamTopView/HostLivestreamTopView.d.ts.map +1 -0
  197. package/dist/typescript/components/Livestream/LivestreamTopView/LiveIndicator.d.ts +10 -0
  198. package/dist/typescript/components/Livestream/LivestreamTopView/LiveIndicator.d.ts.map +1 -0
  199. package/dist/typescript/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.d.ts +26 -0
  200. package/dist/typescript/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.d.ts.map +1 -0
  201. package/dist/typescript/components/Livestream/LivestreamTopView/index.d.ts +5 -0
  202. package/dist/typescript/components/Livestream/LivestreamTopView/index.d.ts.map +1 -0
  203. package/dist/typescript/components/Livestream/ViewerLivestream/ViewerLivestream.d.ts +32 -0
  204. package/dist/typescript/components/Livestream/ViewerLivestream/ViewerLivestream.d.ts.map +1 -0
  205. package/dist/typescript/components/Livestream/ViewerLivestream/index.d.ts +2 -0
  206. package/dist/typescript/components/Livestream/ViewerLivestream/index.d.ts.map +1 -0
  207. package/dist/typescript/components/Livestream/index.d.ts +6 -0
  208. package/dist/typescript/components/Livestream/index.d.ts.map +1 -0
  209. package/dist/typescript/components/index.d.ts +1 -0
  210. package/dist/typescript/components/index.d.ts.map +1 -1
  211. package/dist/typescript/hooks/index.d.ts +2 -0
  212. package/dist/typescript/hooks/index.d.ts.map +1 -1
  213. package/dist/typescript/hooks/useAutoEnterPiPEffect.d.ts +2 -0
  214. package/dist/typescript/hooks/useAutoEnterPiPEffect.d.ts.map +1 -0
  215. package/dist/typescript/hooks/useIsInPiPMode.d.ts +2 -0
  216. package/dist/typescript/hooks/useIsInPiPMode.d.ts.map +1 -0
  217. package/dist/typescript/hooks/usePaginatedLayoutSortPreset.d.ts +3 -0
  218. package/dist/typescript/hooks/usePaginatedLayoutSortPreset.d.ts.map +1 -0
  219. package/dist/typescript/icons/EndStreamIcon.d.ts +3 -0
  220. package/dist/typescript/icons/EndStreamIcon.d.ts.map +1 -0
  221. package/dist/typescript/icons/Eye.d.ts +3 -0
  222. package/dist/typescript/icons/Eye.d.ts.map +1 -0
  223. package/dist/typescript/icons/LeaveStreamIcon.d.ts +3 -0
  224. package/dist/typescript/icons/LeaveStreamIcon.d.ts.map +1 -0
  225. package/dist/typescript/icons/ShieldBadge.d.ts +3 -0
  226. package/dist/typescript/icons/ShieldBadge.d.ts.map +1 -0
  227. package/dist/typescript/icons/StartStreamIcon.d.ts +3 -0
  228. package/dist/typescript/icons/StartStreamIcon.d.ts.map +1 -0
  229. package/dist/typescript/icons/index.d.ts +5 -0
  230. package/dist/typescript/icons/index.d.ts.map +1 -1
  231. package/dist/typescript/providers/MediaStreamManagement.d.ts.map +1 -1
  232. package/dist/typescript/theme/theme.d.ts +70 -0
  233. package/dist/typescript/theme/theme.d.ts.map +1 -1
  234. package/dist/typescript/translations/index.d.ts +6 -1
  235. package/dist/typescript/translations/index.d.ts.map +1 -1
  236. package/dist/typescript/utils/enterPiPAndroid.d.ts +2 -0
  237. package/dist/typescript/utils/enterPiPAndroid.d.ts.map +1 -0
  238. package/dist/typescript/utils/index.d.ts +1 -0
  239. package/dist/typescript/utils/index.d.ts.map +1 -1
  240. package/dist/typescript/version.d.ts +1 -1
  241. package/expo-config-plugin/dist/common/addNewLinesToMainActivity.d.ts +1 -0
  242. package/expo-config-plugin/dist/common/addNewLinesToMainActivity.js +16 -0
  243. package/expo-config-plugin/dist/common/types.d.ts +4 -0
  244. package/expo-config-plugin/dist/index.js +6 -2
  245. package/expo-config-plugin/dist/withAndroidManifest.d.ts +2 -1
  246. package/expo-config-plugin/dist/withAndroidManifest.js +20 -2
  247. package/expo-config-plugin/dist/withMainActivity.d.ts +4 -0
  248. package/expo-config-plugin/dist/withMainActivity.js +72 -0
  249. package/package.json +1 -1
  250. package/src/components/Call/CallContent/CallContent.tsx +15 -7
  251. package/src/components/Call/CallLayout/CallParticipantsGrid.tsx +16 -2
  252. package/src/components/Call/CallLayout/CallParticipantsSpotlight.tsx +4 -1
  253. package/src/components/Livestream/HostLivestream/HostLivestream.tsx +99 -0
  254. package/src/components/Livestream/HostLivestream/index.ts +1 -0
  255. package/src/components/Livestream/LivestreamControls/HostLivestreamControls.tsx +87 -0
  256. package/src/components/Livestream/LivestreamControls/HostStartStreamButton.tsx +163 -0
  257. package/src/components/Livestream/LivestreamControls/LivestreamAudioControlButton.tsx +78 -0
  258. package/src/components/Livestream/LivestreamControls/LivestreamMediaControls.tsx +32 -0
  259. package/src/components/Livestream/LivestreamControls/LivestreamVideoControlButton.tsx +78 -0
  260. package/src/components/Livestream/LivestreamControls/ViewerLeaveStreamButton.tsx +102 -0
  261. package/src/components/Livestream/LivestreamControls/ViewerLivestreamControls.tsx +75 -0
  262. package/src/components/Livestream/LivestreamControls/index.ts +5 -0
  263. package/src/components/Livestream/LivestreamLayout/LivestreamLayout.tsx +77 -0
  264. package/src/components/Livestream/LivestreamLayout/index.ts +1 -0
  265. package/src/components/Livestream/LivestreamTopView/DurationBadge.tsx +170 -0
  266. package/src/components/Livestream/LivestreamTopView/FollowerCount.tsx +74 -0
  267. package/src/components/Livestream/LivestreamTopView/HostLivestreamTopView.tsx +105 -0
  268. package/src/components/Livestream/LivestreamTopView/LiveIndicator.tsx +53 -0
  269. package/src/components/Livestream/LivestreamTopView/ViewerLivestreamTopView.tsx +102 -0
  270. package/src/components/Livestream/LivestreamTopView/index.ts +4 -0
  271. package/src/components/Livestream/ViewerLivestream/ViewerLivestream.tsx +126 -0
  272. package/src/components/Livestream/ViewerLivestream/index.ts +1 -0
  273. package/src/components/Livestream/index.ts +5 -0
  274. package/src/components/index.ts +1 -0
  275. package/src/hooks/index.ts +2 -0
  276. package/src/hooks/useAutoEnterPiPEffect.tsx +16 -0
  277. package/src/hooks/useIsInPiPMode.tsx +29 -0
  278. package/src/hooks/usePaginatedLayoutSortPreset.ts +27 -0
  279. package/src/icons/EndStreamIcon.tsx +13 -0
  280. package/src/icons/Eye.tsx +13 -0
  281. package/src/icons/LeaveStreamIcon.tsx +13 -0
  282. package/src/icons/ShieldBadge.tsx +13 -0
  283. package/src/icons/StartStreamIcon.tsx +13 -0
  284. package/src/icons/index.tsx +5 -0
  285. package/src/providers/MediaStreamManagement.tsx +14 -1
  286. package/src/theme/theme.ts +140 -0
  287. package/src/translations/en.json +6 -1
  288. package/src/utils/enterPiPAndroid.ts +11 -0
  289. package/src/utils/index.ts +1 -0
  290. package/src/version.ts +1 -1
@@ -1,4 +1,5 @@
1
1
  export * from './Call';
2
2
  export * from './utility';
3
3
  export * from './Participant';
4
+ export * from './Livestream';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
@@ -3,4 +3,6 @@ export * from './usePermissionRequest';
3
3
  export * from './usePermissionNotification';
4
4
  export * from './push';
5
5
  export * from './useAndroidKeepCallAliveEffect';
6
+ export * from './useIsInPiPMode';
7
+ export * from './useAutoEnterPiPEffect';
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,QAAQ,CAAC;AACvB,cAAc,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,QAAQ,CAAC;AACvB,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function useAutoEnterPiPEffect(): void;
2
+ //# sourceMappingURL=useAutoEnterPiPEffect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAutoEnterPiPEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAutoEnterPiPEffect.tsx"],"names":[],"mappings":"AAGA,wBAAgB,qBAAqB,SAYpC"}
@@ -0,0 +1,2 @@
1
+ export declare function useIsInPiPMode(): boolean;
2
+ //# sourceMappingURL=useIsInPiPMode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsInPiPMode.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsInPiPMode.tsx"],"names":[],"mappings":"AAGA,wBAAgB,cAAc,YAyB7B"}
@@ -0,0 +1,3 @@
1
+ import { Call } from '@stream-io/video-client';
2
+ export declare const usePaginatedLayoutSortPreset: (call: Call | undefined) => void;
3
+ //# sourceMappingURL=usePaginatedLayoutSortPreset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePaginatedLayoutSortPreset.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePaginatedLayoutSortPreset.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAIL,MAAM,yBAAyB,CAAC;AAWjC,eAAO,MAAM,4BAA4B,SAAU,IAAI,GAAG,SAAS,SAUlE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const EndBroadcastIcon: () => React.JSX.Element;
3
+ //# sourceMappingURL=EndStreamIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EndStreamIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/EndStreamIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,gBAAgB,yBAS5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const Eye: () => React.JSX.Element;
3
+ //# sourceMappingURL=Eye.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Eye.d.ts","sourceRoot":"","sources":["../../../src/icons/Eye.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,GAAG,yBASf,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const LeaveStreamIcon: () => React.JSX.Element;
3
+ //# sourceMappingURL=LeaveStreamIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LeaveStreamIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/LeaveStreamIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,eAAe,yBAS3B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const ShieldBadge: () => React.JSX.Element;
3
+ //# sourceMappingURL=ShieldBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShieldBadge.d.ts","sourceRoot":"","sources":["../../../src/icons/ShieldBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,WAAW,yBASvB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const StartStreamIcon: () => React.JSX.Element;
3
+ //# sourceMappingURL=StartStreamIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StartStreamIcon.d.ts","sourceRoot":"","sources":["../../../src/icons/StartStreamIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,eAAe,yBAS3B,CAAC"}
@@ -14,4 +14,9 @@ export * from './Spotlight';
14
14
  export * from './ScreenShare';
15
15
  export * from './Reaction';
16
16
  export * from './TopViewBackground';
17
+ export * from './Eye';
18
+ export * from './ShieldBadge';
19
+ export * from './StartStreamIcon';
20
+ export * from './EndStreamIcon';
21
+ export * from './LeaveStreamIcon';
17
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,OAAO,CAAC;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MediaStreamManagement.d.ts","sourceRoot":"","sources":["../../../src/providers/MediaStreamManagement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAItE,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,8GAI/B,kBAAkB,wBAAwB,CAAC,sBAsF7C,CAAC"}
1
+ {"version":3,"file":"MediaStreamManagement.d.ts","sourceRoot":"","sources":["../../../src/providers/MediaStreamManagement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAKtE,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,8GAI/B,kBAAkB,wBAAwB,CAAC,sBAkG7C,CAAC"}
@@ -197,6 +197,76 @@ export type Theme = {
197
197
  participantsIconContainer: ViewStyle;
198
198
  participantsCountText: TextStyle;
199
199
  };
200
+ hostLivestream: {
201
+ container: ViewStyle;
202
+ };
203
+ viewerLivestream: {
204
+ container: ViewStyle;
205
+ floatingParticipantView: ViewStyle;
206
+ view: ViewStyle;
207
+ };
208
+ livestreamLayout: {
209
+ container: ViewStyle;
210
+ };
211
+ hostLivestreamTopView: {
212
+ container: ViewStyle;
213
+ leftElement: ViewStyle;
214
+ centerElement: ViewStyle;
215
+ rightElement: ViewStyle;
216
+ liveInfo: ViewStyle;
217
+ };
218
+ viewerLivestreamTopView: {
219
+ container: ViewStyle;
220
+ leftElement: ViewStyle;
221
+ centerElement: ViewStyle;
222
+ rightElement: ViewStyle;
223
+ liveInfo: ViewStyle;
224
+ };
225
+ followerCount: {
226
+ container: ViewStyle;
227
+ icon: ViewStyle;
228
+ label: TextStyle;
229
+ };
230
+ durationBadge: {
231
+ container: ViewStyle;
232
+ icon: ViewStyle;
233
+ label: TextStyle;
234
+ };
235
+ liveIndicator: {
236
+ container: ViewStyle;
237
+ label: TextStyle;
238
+ };
239
+ hostLivestreamControls: {
240
+ container: ViewStyle;
241
+ leftElement: ViewStyle;
242
+ rightElement: ViewStyle;
243
+ };
244
+ viewerLivestreamControls: {
245
+ container: ViewStyle;
246
+ leftElement: ViewStyle;
247
+ rightElement: ViewStyle;
248
+ };
249
+ hostStartStreamButton: {
250
+ container: ViewStyle;
251
+ icon: ViewStyle;
252
+ text: TextStyle;
253
+ };
254
+ viewerLeaveStreamButton: {
255
+ container: ViewStyle;
256
+ icon: ViewStyle;
257
+ text: TextStyle;
258
+ };
259
+ livestreamMediaControls: {
260
+ container: ViewStyle;
261
+ };
262
+ livestreamAudioControlButton: {
263
+ container: ViewStyle;
264
+ icon: ViewStyle;
265
+ };
266
+ livestreamVideoControlButton: {
267
+ container: ViewStyle;
268
+ icon: ViewStyle;
269
+ };
200
270
  };
201
271
  export declare const defaultTheme: Theme;
202
272
  //# sourceMappingURL=theme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/theme/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE5D,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;SACZ,CAAC;QACF,SAAS,EAAE;YACT,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;SACZ,CAAC;QACF,WAAW,EAAE;YACX,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;SACZ,CAAC;KACH,CAAC;IACF,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACxC,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE;QACN,SAAS,EAAE,SAAS,CAAC;QACrB,KAAK,EAAE,UAAU,CAAC;QAClB,IAAI,EAAE,SAAS,CAAC;KACj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,SAAS,CAAC;KACrB,CAAC;IACF,aAAa,EAAE;QACb,SAAS,EAAE,SAAS,CAAC;QACrB,IAAI,EAAE,SAAS,CAAC;QAChB,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;IACF,aAAa,EAAE;QACb,SAAS,EAAE,SAAS,CAAC;QACrB,IAAI,EAAE,SAAS,CAAC;QAChB,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;IACF,aAAa,EAAE;QACb,SAAS,EAAE,SAAS,CAAC;QACrB,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;IACF,sBAAsB,EAAE;QACtB,SAAS,EAAE,SAAS,CAAC;QACrB,WAAW,EAAE,SAAS,CAAC;QACvB,YAAY,EAAE,SAAS,CAAC;KACzB,CAAC;IACF,wBAAwB,EAAE;QACxB,SAAS,EAAE,SAAS,CAAC;QACrB,WAAW,EAAE,SAAS,CAAC;QACvB,YAAY,EAAE,SAAS,CAAC;KACzB,CAAC;IACF,qBAAqB,EAAE;QACrB,SAAS,EAAE,SAAS,CAAC;QACrB,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,SAAS,CAAC;KACjB,CAAC;IACF,uBAAuB,EAAE;QACvB,SAAS,EAAE,SAAS,CAAC;QACrB,IAAI,EAAE,SAAS,CAAC;QAChB,IAAI,EAAE,SAAS,CAAC;KACjB,CAAC;IACF,uBAAuB,EAAE;QACvB,SAAS,EAAE,SAAS,CAAC;KACtB,CAAC;IACF,4BAA4B,EAAE;QAC5B,SAAS,EAAE,SAAS,CAAC;QACrB,IAAI,EAAE,SAAS,CAAC;KACjB,CAAC;IACF,4BAA4B,EAAE;QAC5B,SAAS,EAAE,SAAS,CAAC;QACrB,IAAI,EAAE,SAAS,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAoS1B,CAAC"}
@@ -7,7 +7,12 @@ export declare const translations: {
7
7
  Join: string;
8
8
  You: string;
9
9
  "Reconnecting...": string;
10
- "You are first to join the call.": string;
10
+ "Loading...": string;
11
+ "Start Stream": string;
12
+ "End Stream": string;
13
+ "Leave Stream": string;
14
+ Live: string;
15
+ "You are first to Join the call.": string;
11
16
  "Participants ({{ numberOfParticipants }})": string;
12
17
  "{{ userName }} is sharing their screen": string;
13
18
  "{{ numberOfParticipants }} participant(s) are in the call.": string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/translations/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;CAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/translations/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;CAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function enterPiPAndroid(width?: number, height?: number): any;
2
+ //# sourceMappingURL=enterPiPAndroid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enterPiPAndroid.d.ts","sourceRoot":"","sources":["../../../src/utils/enterPiPAndroid.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,OAQ9D"}
@@ -1,5 +1,6 @@
1
1
  export declare const generateCallTitle: (memberUserIds: string[], totalMembersToShow?: number) => string;
2
2
  export declare const generateParticipantTitle: (memberUserId: string) => string;
3
3
  export declare const getInitialsOfName: (name: string) => string;
4
+ export * from './enterPiPAndroid';
4
5
  export * from './StreamVideoRN';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB,kBACb,MAAM,EAAE,uBACF,MAAM,WAgB5B,CAAC;AAGF,eAAO,MAAM,wBAAwB,iBAAkB,MAAM,WAI5D,CAAC;AAGF,eAAO,MAAM,iBAAiB,SAAU,MAAM,WAO7C,CAAC;AAEF,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB,kBACb,MAAM,EAAE,uBACF,MAAM,WAgB5B,CAAC;AAGF,eAAO,MAAM,wBAAwB,iBAAkB,MAAM,WAI5D,CAAC;AAGF,eAAO,MAAM,iBAAiB,SAAU,MAAM,WAO7C,CAAC;AAEF,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const version = "0.1.10";
1
+ export declare const version = "0.1.12";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ export default function addNewLinesToMainActivity(content: string, toAdd: string[]): string;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function addNewLinesToMainActivity(content, toAdd) {
4
+ const lines = content.trim().split('\n');
5
+ let lineIndex = lines.length - 1;
6
+ if (lines[lineIndex] !== '}') {
7
+ throw Error('Malformed main activity');
8
+ }
9
+ toAdd.unshift('');
10
+ for (const newLine of toAdd) {
11
+ lines.splice(lineIndex, 0, newLine);
12
+ lineIndex++;
13
+ }
14
+ return lines.join('\n');
15
+ }
16
+ exports.default = addNewLinesToMainActivity;
@@ -2,7 +2,11 @@ export type RingingPushNotifications = {
2
2
  disableVideoIos?: boolean;
3
3
  includesCallsInRecentsIos?: boolean;
4
4
  };
5
+ export type AndroidPictureInPicture = {
6
+ enableAutomaticEnter: boolean;
7
+ };
5
8
  export type ConfigProps = {
6
9
  ringingPushNotifications?: RingingPushNotifications;
7
10
  enableNonRingingPushNotifications?: boolean;
11
+ androidPictureInPicture?: AndroidPictureInPicture;
8
12
  } | undefined;
@@ -10,20 +10,24 @@ const withMainApplication_1 = __importDefault(require("./withMainApplication"));
10
10
  const withAndroidPermissions_1 = __importDefault(require("./withAndroidPermissions"));
11
11
  const withAndroidManifest_1 = __importDefault(require("./withAndroidManifest"));
12
12
  const withiOSInfoPlist_1 = __importDefault(require("./withiOSInfoPlist"));
13
+ const withMainActivity_1 = __importDefault(require("./withMainActivity"));
13
14
  const withBuildProperties_1 = __importDefault(require("./withBuildProperties"));
14
15
  const withAppBuildGradle_1 = __importDefault(require("./withAppBuildGradle"));
15
16
  // path should be relative to dist
16
17
  const pkg = require('../../package.json');
17
18
  const withStreamVideoReactNativeSDK = (config, props) => {
18
19
  return (0, config_plugins_1.withPlugins)(config, [
20
+ // ios
19
21
  () => (0, withPushAppDelegate_1.default)(config, props),
20
22
  withStreamVideoReactNativeSDKAppDelegate_1.default,
23
+ () => (0, withiOSInfoPlist_1.default)(config, props),
24
+ // android
21
25
  withMainApplication_1.default,
22
26
  withAndroidPermissions_1.default,
23
- withAndroidManifest_1.default,
24
27
  withAppBuildGradle_1.default,
25
28
  withBuildProperties_1.default,
26
- () => (0, withiOSInfoPlist_1.default)(config, props),
29
+ () => (0, withAndroidManifest_1.default)(config, props),
30
+ () => (0, withMainActivity_1.default)(config, props),
27
31
  ]);
28
32
  };
29
33
  exports.default = (0, config_plugins_1.createRunOncePlugin)(withStreamVideoReactNativeSDK, pkg.name, pkg.version);
@@ -1,3 +1,4 @@
1
1
  import { ConfigPlugin } from '@expo/config-plugins';
2
- declare const withStreamVideoReactNativeSDKManifest: ConfigPlugin;
2
+ import { ConfigProps } from './common/types';
3
+ declare const withStreamVideoReactNativeSDKManifest: ConfigPlugin<ConfigProps>;
3
4
  export default withStreamVideoReactNativeSDKManifest;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const config_plugins_1 = require("@expo/config-plugins");
4
- const { prefixAndroidKeys, getMainApplicationOrThrow } = config_plugins_1.AndroidConfig.Manifest;
4
+ const { prefixAndroidKeys, getMainApplicationOrThrow, getMainActivityOrThrow } = config_plugins_1.AndroidConfig.Manifest;
5
5
  function getNotifeeService() {
6
6
  /*
7
7
  <service
@@ -18,19 +18,37 @@ function getNotifeeService() {
18
18
  $: head,
19
19
  };
20
20
  }
21
- const withStreamVideoReactNativeSDKManifest = (configuration) => {
21
+ const withStreamVideoReactNativeSDKManifest = (configuration, props) => {
22
22
  return (0, config_plugins_1.withAndroidManifest)(configuration, (config) => {
23
23
  try {
24
24
  const androidManifest = config.modResults;
25
25
  const mainApplication = getMainApplicationOrThrow(androidManifest);
26
+ /* Add the notifeee Service */
26
27
  let services = mainApplication.service ?? [];
27
28
  // we filter out the existing notifee service (if any) so that we can override it
28
29
  services = services.filter((service) => service.$['android:name'] !== 'app.notifee.core.ForegroundService');
29
30
  services.push(getNotifeeService());
30
31
  mainApplication.service = services;
32
+ if (props?.androidPictureInPicture) {
33
+ const mainActivity = getMainActivityOrThrow(androidManifest);
34
+ ('keyboard|keyboardHidden|orientation|screenSize|uiMode');
35
+ const currentConfigChangesArray = mainActivity.$['android:configChanges']
36
+ ? mainActivity.$['android:configChanges'].split('|')
37
+ : [];
38
+ const neededConfigChangesArray = 'screenSize|smallestScreenSize|screenLayout|orientation'.split('|');
39
+ // Create a Set from the two arrays.
40
+ const set = new Set([
41
+ ...currentConfigChangesArray,
42
+ ...neededConfigChangesArray,
43
+ ]);
44
+ const mergedConfigChanges = [...set];
45
+ mainActivity.$['android:configChanges'] = mergedConfigChanges.join('|');
46
+ mainActivity.$['android:supportsPictureInPicture'] = 'true';
47
+ }
31
48
  config.modResults = androidManifest;
32
49
  }
33
50
  catch (error) {
51
+ console.log(error);
34
52
  throw new Error('Cannot setup StreamVideoReactNativeSDK because the AndroidManifest is malformed');
35
53
  }
36
54
  return config;
@@ -0,0 +1,4 @@
1
+ import { ConfigPlugin } from '@expo/config-plugins';
2
+ import { ConfigProps } from './common/types';
3
+ declare const withStreamVideoReactNativeSDKMainActivity: ConfigPlugin<ConfigProps>;
4
+ export default withStreamVideoReactNativeSDKMainActivity;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const config_plugins_1 = require("@expo/config-plugins");
7
+ const codeMod_1 = require("@expo/config-plugins/build/android/codeMod");
8
+ const addNewLinesToMainActivity_1 = __importDefault(require("./common/addNewLinesToMainActivity"));
9
+ const withStreamVideoReactNativeSDKMainActivity = (configuration, props) => {
10
+ return (0, config_plugins_1.withMainActivity)(configuration, (config) => {
11
+ if (['java'].includes(config.modResults.language)) {
12
+ try {
13
+ /*
14
+ import com.streamvideo.reactnative.StreamVideoReactNative;
15
+ import android.util.Rational;
16
+ import androidx.lifecycle.Lifecycle;
17
+ import android.app.PictureInPictureParams;
18
+ */
19
+ config.modResults.contents = (0, codeMod_1.addImports)(config.modResults.contents, [
20
+ 'com.streamvideo.reactnative.StreamVideoReactNative',
21
+ 'android.util.Rational',
22
+ 'androidx.lifecycle.Lifecycle',
23
+ 'android.app.PictureInPictureParams',
24
+ ], config.modResults.language === 'java');
25
+ config.modResults.contents = addOnPictureInPictureModeChanged(config.modResults.contents);
26
+ if (props?.androidPictureInPicture?.enableAutomaticEnter) {
27
+ config.modResults.contents = addOnUserLeaveHint(config.modResults.contents);
28
+ }
29
+ }
30
+ catch (error) {
31
+ throw new Error("Cannot add StreamVideoReactNativeSDK to the project's MainApplication because it's malformed.");
32
+ }
33
+ }
34
+ else {
35
+ throw new Error('Cannot setup StreamVideoReactNativeSDK because the MainApplication is not in Java');
36
+ }
37
+ return config;
38
+ });
39
+ };
40
+ function addOnPictureInPictureModeChanged(contents) {
41
+ if (!contents.includes('StreamVideoReactNative.onPictureInPictureModeChanged')) {
42
+ const statementToInsert = `
43
+ @Override
44
+ public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
45
+ super.onPictureInPictureModeChanged(isInPictureInPictureMode);
46
+ if (getLifecycle().getCurrentState() == Lifecycle.State.CREATED) {
47
+ // when user clicks on Close button of PIP
48
+ finishAndRemoveTask();
49
+ } else {
50
+ StreamVideoReactNative.onPictureInPictureModeChanged(isInPictureInPictureMode);
51
+ }
52
+ }`;
53
+ contents = (0, addNewLinesToMainActivity_1.default)(contents, statementToInsert.trim().split('\n'));
54
+ }
55
+ return contents;
56
+ }
57
+ function addOnUserLeaveHint(contents) {
58
+ if (!contents.includes('StreamVideoReactNative.canAutoEnterPictureInPictureMode')) {
59
+ const statementToInsert = `
60
+ @Override
61
+ public void onUserLeaveHint () {
62
+ if (StreamVideoReactNative.canAutoEnterPictureInPictureMode) {
63
+ PictureInPictureParams.Builder builder = new PictureInPictureParams.Builder();
64
+ builder.setAspectRatio(new Rational(480, 640));
65
+ enterPictureInPictureMode(builder.build());
66
+ }
67
+ }`;
68
+ contents = (0, addNewLinesToMainActivity_1.default)(contents, statementToInsert.trim().split('\n'));
69
+ }
70
+ return contents;
71
+ }
72
+ exports.default = withStreamVideoReactNativeSDKMainActivity;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-native-sdk",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "dist/commonjs/index.js",
6
6
  "module": "dist/module/index.js",
@@ -30,6 +30,7 @@ import {
30
30
  CallParticipantsListComponentProps,
31
31
  CallParticipantsListProps,
32
32
  } from '../CallParticipantsList';
33
+ import { useIsInPiPMode, useAutoEnterPiPEffect } from '../../../hooks';
33
34
 
34
35
  export type StreamReactionType = StreamReaction & {
35
36
  icon: string;
@@ -111,19 +112,24 @@ export const CallContent = ({
111
112
  useLocalParticipant,
112
113
  } = useCallStateHooks();
113
114
 
115
+ useAutoEnterPiPEffect();
116
+
114
117
  const _remoteParticipants = useRemoteParticipants();
115
118
  const remoteParticipants = useDebouncedValue(_remoteParticipants, 300); // we debounce the remote participants to avoid unnecessary rerenders that happen when participant tracks are all subscribed simultaneously
116
119
  const localParticipant = useLocalParticipant();
117
-
120
+ const isInPiPMode = useIsInPiPMode();
118
121
  const hasScreenShare = useHasOngoingScreenShare();
119
122
  const showSpotlightLayout = hasScreenShare || layout === 'spotlight';
120
123
 
121
124
  const showFloatingView =
122
125
  !showSpotlightLayout &&
126
+ !isInPiPMode &&
123
127
  remoteParticipants.length > 0 &&
124
128
  remoteParticipants.length < 3;
125
129
  const isRemoteParticipantInFloatingView =
126
- showRemoteParticipantInFloatingView && remoteParticipants.length === 1;
130
+ showFloatingView &&
131
+ showRemoteParticipantInFloatingView &&
132
+ remoteParticipants.length === 1;
127
133
 
128
134
  /**
129
135
  * This hook is used to handle IncallManager specs of the application.
@@ -150,8 +156,10 @@ export const CallContent = ({
150
156
  }, []);
151
157
 
152
158
  const participantViewProps: ParticipantViewComponentProps = {
153
- ParticipantLabel,
154
- ParticipantNetworkQualityIndicator,
159
+ ParticipantLabel: isInPiPMode ? null : ParticipantLabel,
160
+ ParticipantNetworkQualityIndicator: isInPiPMode
161
+ ? null
162
+ : ParticipantNetworkQualityIndicator,
155
163
  ParticipantReaction,
156
164
  ParticipantVideoFallback,
157
165
  VideoRenderer,
@@ -179,7 +187,7 @@ export const CallContent = ({
179
187
  };
180
188
 
181
189
  return (
182
- <View style={[styles.container, callContent.container, landscapeStyles]}>
190
+ <View style={[styles.container, landscapeStyles, callContent.container]}>
183
191
  <View style={[styles.container, callContent.callParticipantsContainer]}>
184
192
  <View
185
193
  style={[styles.view, callContent.topContainer]}
@@ -187,7 +195,7 @@ export const CallContent = ({
187
195
  // and allows only the top and floating view (its child views) to take up the touches
188
196
  pointerEvents="box-none"
189
197
  >
190
- {CallTopView && (
198
+ {!isInPiPMode && CallTopView && (
191
199
  <CallTopView
192
200
  onBackPressed={onBackPressed}
193
201
  onParticipantInfoPress={onParticipantInfoPress}
@@ -214,7 +222,7 @@ export const CallContent = ({
214
222
  )}
215
223
  </View>
216
224
 
217
- {CallControls && (
225
+ {!isInPiPMode && CallControls && (
218
226
  <CallControls
219
227
  onHangupCallHandler={onHangupCallHandler}
220
228
  landscape={landscape}
@@ -10,6 +10,7 @@ import { ComponentTestIds } from '../../../constants/TestIds';
10
10
  import { useTheme } from '../../../contexts/ThemeContext';
11
11
  import { CallContentProps } from '../CallContent';
12
12
  import { ParticipantViewComponentProps } from '../../Participant';
13
+ import { useIsInPiPMode } from '../../../hooks';
13
14
 
14
15
  /**
15
16
  * Props for the CallParticipantsGrid component.
@@ -58,15 +59,28 @@ export const CallParticipantsGrid = ({
58
59
  flexDirection: landscape ? 'row' : 'column',
59
60
  };
60
61
 
62
+ const isInPiPMode = useIsInPiPMode();
63
+
61
64
  const showFloatingView =
62
- remoteParticipants.length > 0 && remoteParticipants.length < 3;
65
+ !isInPiPMode &&
66
+ remoteParticipants.length > 0 &&
67
+ remoteParticipants.length < 3;
63
68
 
64
- const participants = showFloatingView
69
+ let participants = showFloatingView
65
70
  ? showLocalParticipant && localParticipant
66
71
  ? [localParticipant]
67
72
  : remoteParticipants
68
73
  : allParticipants;
69
74
 
75
+ if (isInPiPMode) {
76
+ participants =
77
+ remoteParticipants.length > 0
78
+ ? [remoteParticipants[0]]
79
+ : localParticipant
80
+ ? [localParticipant]
81
+ : [];
82
+ }
83
+
70
84
  const participantViewProps: CallParticipantsListComponentProps = {
71
85
  ParticipantView,
72
86
  ParticipantLabel,
@@ -18,6 +18,7 @@ import {
18
18
  } from '../../Participant';
19
19
  import { useTheme } from '../../../contexts/ThemeContext';
20
20
  import { CallContentProps } from '../CallContent';
21
+ import { useIsInPiPMode } from '../../../hooks';
21
22
 
22
23
  /**
23
24
  * Props for the CallParticipantsSpotlight component.
@@ -62,6 +63,8 @@ export const CallParticipantsSpotlight = ({
62
63
  const isScreenShareOnSpotlight = hasScreenShare(participantInSpotlight);
63
64
  const isUserAloneInCall = _allParticipants?.length === 1;
64
65
 
66
+ const isInPiP = useIsInPiPMode();
67
+
65
68
  const participantViewProps: ParticipantViewComponentProps = {
66
69
  ParticipantLabel,
67
70
  ParticipantNetworkQualityIndicator,
@@ -117,7 +120,7 @@ export const CallParticipantsSpotlight = ({
117
120
  {...participantViewProps}
118
121
  />
119
122
  )}
120
- {!isUserAloneInCall && (
123
+ {!isInPiP && !isUserAloneInCall && (
121
124
  <View
122
125
  style={[
123
126
  styles.callParticipantsListContainer,