@syra.fm/sdk 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/README.md +33 -4
  2. package/lib/commonjs/client.js +268 -0
  3. package/lib/commonjs/client.js.map +1 -0
  4. package/lib/commonjs/errors.js +22 -0
  5. package/lib/commonjs/errors.js.map +1 -0
  6. package/lib/commonjs/index.js +63 -0
  7. package/lib/commonjs/index.js.map +1 -0
  8. package/lib/commonjs/index.native.js +28 -0
  9. package/lib/commonjs/index.native.js.map +1 -0
  10. package/lib/commonjs/live/assets/icons/spaces-icon.js +42 -0
  11. package/lib/commonjs/live/assets/icons/spaces-icon.js.map +1 -0
  12. package/lib/commonjs/live/assets/icons/syra-icon.js +43 -0
  13. package/lib/commonjs/live/assets/icons/syra-icon.js.map +1 -0
  14. package/lib/commonjs/live/colors.js +54 -0
  15. package/lib/commonjs/live/colors.js.map +1 -0
  16. package/lib/commonjs/live/components/AnimatedPulse.js +38 -0
  17. package/lib/commonjs/live/components/AnimatedPulse.js.map +1 -0
  18. package/lib/commonjs/live/components/AnimatedSpeakerRing.js +90 -0
  19. package/lib/commonjs/live/components/AnimatedSpeakerRing.js.map +1 -0
  20. package/lib/commonjs/live/components/CreateRoomSheet.js +688 -0
  21. package/lib/commonjs/live/components/CreateRoomSheet.js.map +1 -0
  22. package/lib/commonjs/live/components/InsightsPanel.js +333 -0
  23. package/lib/commonjs/live/components/InsightsPanel.js.map +1 -0
  24. package/lib/commonjs/live/components/LiveRoomSheet.js +1196 -0
  25. package/lib/commonjs/live/components/LiveRoomSheet.js.map +1 -0
  26. package/lib/commonjs/live/components/MiniRoomBar.js +162 -0
  27. package/lib/commonjs/live/components/MiniRoomBar.js.map +1 -0
  28. package/lib/commonjs/live/components/PanelHeader.js +57 -0
  29. package/lib/commonjs/live/components/PanelHeader.js.map +1 -0
  30. package/lib/commonjs/live/components/PodcastStreamPicker.js +1190 -0
  31. package/lib/commonjs/live/components/PodcastStreamPicker.js.map +1 -0
  32. package/lib/commonjs/live/components/RecordingCard.js +192 -0
  33. package/lib/commonjs/live/components/RecordingCard.js.map +1 -0
  34. package/lib/commonjs/live/components/RecordingsPanel.js +305 -0
  35. package/lib/commonjs/live/components/RecordingsPanel.js.map +1 -0
  36. package/lib/commonjs/live/components/RoomCard.js +349 -0
  37. package/lib/commonjs/live/components/RoomCard.js.map +1 -0
  38. package/lib/commonjs/live/components/StreamConfigModal.js +656 -0
  39. package/lib/commonjs/live/components/StreamConfigModal.js.map +1 -0
  40. package/lib/commonjs/live/components/StreamConfigPanel.js +822 -0
  41. package/lib/commonjs/live/components/StreamConfigPanel.js.map +1 -0
  42. package/lib/commonjs/live/context/LiveConfigContext.js +46 -0
  43. package/lib/commonjs/live/context/LiveConfigContext.js.map +1 -0
  44. package/lib/commonjs/live/context/LiveRoomContext.js +195 -0
  45. package/lib/commonjs/live/context/LiveRoomContext.js.map +1 -0
  46. package/lib/commonjs/live/hooks/useActiveSpeakers.js +35 -0
  47. package/lib/commonjs/live/hooks/useActiveSpeakers.js.map +1 -0
  48. package/lib/commonjs/live/hooks/useRoomAudio.js +129 -0
  49. package/lib/commonjs/live/hooks/useRoomAudio.js.map +1 -0
  50. package/lib/commonjs/live/hooks/useRoomConnection.js +177 -0
  51. package/lib/commonjs/live/hooks/useRoomConnection.js.map +1 -0
  52. package/lib/commonjs/live/hooks/useRoomManager.js +37 -0
  53. package/lib/commonjs/live/hooks/useRoomManager.js.map +1 -0
  54. package/lib/commonjs/live/hooks/useRoomUsers.js +52 -0
  55. package/lib/commonjs/live/hooks/useRoomUsers.js.map +1 -0
  56. package/lib/commonjs/live/index.js +341 -0
  57. package/lib/commonjs/live/index.js.map +1 -0
  58. package/lib/commonjs/live/services/livekitService.js +20 -0
  59. package/lib/commonjs/live/services/livekitService.js.map +1 -0
  60. package/lib/commonjs/live/services/spaceSocketService.js +181 -0
  61. package/lib/commonjs/live/services/spaceSocketService.js.map +1 -0
  62. package/lib/commonjs/live/services/spacesService.js +642 -0
  63. package/lib/commonjs/live/services/spacesService.js.map +1 -0
  64. package/lib/commonjs/live/types.js +6 -0
  65. package/lib/commonjs/live/types.js.map +1 -0
  66. package/lib/commonjs/live/validation.js +238 -0
  67. package/lib/commonjs/live/validation.js.map +1 -0
  68. package/lib/commonjs/package.json +1 -0
  69. package/{dist/cjs → lib/commonjs}/schema.js +55 -47
  70. package/lib/commonjs/schema.js.map +1 -0
  71. package/lib/module/client.js +264 -0
  72. package/lib/module/client.js.map +1 -0
  73. package/lib/module/errors.js +17 -0
  74. package/lib/module/errors.js.map +1 -0
  75. package/lib/module/index.js +6 -0
  76. package/lib/module/index.js.map +1 -0
  77. package/lib/module/index.native.js +5 -0
  78. package/lib/module/index.native.js.map +1 -0
  79. package/lib/module/live/assets/icons/spaces-icon.js +34 -0
  80. package/lib/module/live/assets/icons/spaces-icon.js.map +1 -0
  81. package/lib/module/live/assets/icons/syra-icon.js +36 -0
  82. package/lib/module/live/assets/icons/syra-icon.js.map +1 -0
  83. package/lib/module/live/colors.js +49 -0
  84. package/lib/module/live/colors.js.map +1 -0
  85. package/lib/module/live/components/AnimatedPulse.js +33 -0
  86. package/lib/module/live/components/AnimatedPulse.js.map +1 -0
  87. package/lib/module/live/components/AnimatedSpeakerRing.js +85 -0
  88. package/lib/module/live/components/AnimatedSpeakerRing.js.map +1 -0
  89. package/lib/module/live/components/CreateRoomSheet.js +682 -0
  90. package/lib/module/live/components/CreateRoomSheet.js.map +1 -0
  91. package/lib/module/live/components/InsightsPanel.js +327 -0
  92. package/lib/module/live/components/InsightsPanel.js.map +1 -0
  93. package/lib/module/live/components/LiveRoomSheet.js +1190 -0
  94. package/lib/module/live/components/LiveRoomSheet.js.map +1 -0
  95. package/lib/module/live/components/MiniRoomBar.js +155 -0
  96. package/lib/module/live/components/MiniRoomBar.js.map +1 -0
  97. package/lib/module/live/components/PanelHeader.js +52 -0
  98. package/lib/module/live/components/PanelHeader.js.map +1 -0
  99. package/lib/module/live/components/PodcastStreamPicker.js +1183 -0
  100. package/lib/module/live/components/PodcastStreamPicker.js.map +1 -0
  101. package/lib/module/live/components/RecordingCard.js +187 -0
  102. package/lib/module/live/components/RecordingCard.js.map +1 -0
  103. package/lib/module/live/components/RecordingsPanel.js +299 -0
  104. package/lib/module/live/components/RecordingsPanel.js.map +1 -0
  105. package/lib/module/live/components/RoomCard.js +343 -0
  106. package/lib/module/live/components/RoomCard.js.map +1 -0
  107. package/lib/module/live/components/StreamConfigModal.js +650 -0
  108. package/lib/module/live/components/StreamConfigModal.js.map +1 -0
  109. package/lib/module/live/components/StreamConfigPanel.js +816 -0
  110. package/lib/module/live/components/StreamConfigPanel.js.map +1 -0
  111. package/lib/module/live/context/LiveConfigContext.js +40 -0
  112. package/lib/module/live/context/LiveConfigContext.js.map +1 -0
  113. package/lib/module/live/context/LiveRoomContext.js +189 -0
  114. package/lib/module/live/context/LiveRoomContext.js.map +1 -0
  115. package/lib/module/live/hooks/useActiveSpeakers.js +31 -0
  116. package/lib/module/live/hooks/useActiveSpeakers.js.map +1 -0
  117. package/lib/module/live/hooks/useRoomAudio.js +125 -0
  118. package/lib/module/live/hooks/useRoomAudio.js.map +1 -0
  119. package/lib/module/live/hooks/useRoomConnection.js +173 -0
  120. package/lib/module/live/hooks/useRoomConnection.js.map +1 -0
  121. package/lib/module/live/hooks/useRoomManager.js +32 -0
  122. package/lib/module/live/hooks/useRoomManager.js.map +1 -0
  123. package/lib/module/live/hooks/useRoomUsers.js +46 -0
  124. package/lib/module/live/hooks/useRoomUsers.js.map +1 -0
  125. package/lib/module/live/index.js +42 -0
  126. package/lib/module/live/index.js.map +1 -0
  127. package/lib/module/live/services/livekitService.js +16 -0
  128. package/lib/module/live/services/livekitService.js.map +1 -0
  129. package/lib/module/live/services/spaceSocketService.js +176 -0
  130. package/lib/module/live/services/spaceSocketService.js.map +1 -0
  131. package/lib/module/live/services/spacesService.js +639 -0
  132. package/lib/module/live/services/spacesService.js.map +1 -0
  133. package/lib/module/live/types.js +4 -0
  134. package/lib/module/live/types.js.map +1 -0
  135. package/lib/module/live/validation.js +229 -0
  136. package/lib/module/live/validation.js.map +1 -0
  137. package/lib/module/package.json +1 -0
  138. package/{dist/esm → lib/module}/schema.js +47 -39
  139. package/lib/module/schema.js.map +1 -0
  140. package/{dist/types → lib/typescript/commonjs}/client.d.ts +1 -0
  141. package/lib/typescript/commonjs/client.d.ts.map +1 -0
  142. package/{dist/types → lib/typescript/commonjs}/errors.d.ts +1 -0
  143. package/lib/typescript/commonjs/errors.d.ts.map +1 -0
  144. package/{dist/types → lib/typescript/commonjs}/index.d.ts +1 -0
  145. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  146. package/lib/typescript/commonjs/index.native.d.ts +3 -0
  147. package/lib/typescript/commonjs/index.native.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/live/assets/icons/spaces-icon.d.ts +13 -0
  149. package/lib/typescript/commonjs/live/assets/icons/spaces-icon.d.ts.map +1 -0
  150. package/lib/typescript/commonjs/live/assets/icons/syra-icon.d.ts +13 -0
  151. package/lib/typescript/commonjs/live/assets/icons/syra-icon.d.ts.map +1 -0
  152. package/lib/typescript/commonjs/live/colors.d.ts +35 -0
  153. package/lib/typescript/commonjs/live/colors.d.ts.map +1 -0
  154. package/lib/typescript/commonjs/live/components/AnimatedPulse.d.ts +8 -0
  155. package/lib/typescript/commonjs/live/components/AnimatedPulse.d.ts.map +1 -0
  156. package/lib/typescript/commonjs/live/components/AnimatedSpeakerRing.d.ts +10 -0
  157. package/lib/typescript/commonjs/live/components/AnimatedSpeakerRing.d.ts.map +1 -0
  158. package/lib/typescript/commonjs/live/components/CreateRoomSheet.d.ts +26 -0
  159. package/lib/typescript/commonjs/live/components/CreateRoomSheet.d.ts.map +1 -0
  160. package/lib/typescript/commonjs/live/components/InsightsPanel.d.ts +11 -0
  161. package/lib/typescript/commonjs/live/components/InsightsPanel.d.ts.map +1 -0
  162. package/lib/typescript/commonjs/live/components/LiveRoomSheet.d.ts +11 -0
  163. package/lib/typescript/commonjs/live/components/LiveRoomSheet.d.ts.map +1 -0
  164. package/lib/typescript/commonjs/live/components/MiniRoomBar.d.ts +15 -0
  165. package/lib/typescript/commonjs/live/components/MiniRoomBar.d.ts.map +1 -0
  166. package/lib/typescript/commonjs/live/components/PanelHeader.d.ts +10 -0
  167. package/lib/typescript/commonjs/live/components/PanelHeader.d.ts.map +1 -0
  168. package/lib/typescript/commonjs/live/components/PodcastStreamPicker.d.ts +54 -0
  169. package/lib/typescript/commonjs/live/components/PodcastStreamPicker.d.ts.map +1 -0
  170. package/lib/typescript/commonjs/live/components/RecordingCard.d.ts +11 -0
  171. package/lib/typescript/commonjs/live/components/RecordingCard.d.ts.map +1 -0
  172. package/lib/typescript/commonjs/live/components/RecordingsPanel.d.ts +12 -0
  173. package/lib/typescript/commonjs/live/components/RecordingsPanel.d.ts.map +1 -0
  174. package/lib/typescript/commonjs/live/components/RoomCard.d.ts +38 -0
  175. package/lib/typescript/commonjs/live/components/RoomCard.d.ts.map +1 -0
  176. package/lib/typescript/commonjs/live/components/StreamConfigModal.d.ts +11 -0
  177. package/lib/typescript/commonjs/live/components/StreamConfigModal.d.ts.map +1 -0
  178. package/lib/typescript/commonjs/live/components/StreamConfigPanel.d.ts +13 -0
  179. package/lib/typescript/commonjs/live/components/StreamConfigPanel.d.ts.map +1 -0
  180. package/lib/typescript/commonjs/live/context/LiveConfigContext.d.ts +78 -0
  181. package/lib/typescript/commonjs/live/context/LiveConfigContext.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/live/context/LiveRoomContext.d.ts +12 -0
  183. package/lib/typescript/commonjs/live/context/LiveRoomContext.d.ts.map +1 -0
  184. package/lib/typescript/commonjs/live/hooks/useActiveSpeakers.d.ts +3 -0
  185. package/lib/typescript/commonjs/live/hooks/useActiveSpeakers.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/live/hooks/useRoomAudio.d.ts +16 -0
  187. package/lib/typescript/commonjs/live/hooks/useRoomAudio.d.ts.map +1 -0
  188. package/lib/typescript/commonjs/live/hooks/useRoomConnection.d.ts +29 -0
  189. package/lib/typescript/commonjs/live/hooks/useRoomConnection.d.ts.map +1 -0
  190. package/lib/typescript/commonjs/live/hooks/useRoomManager.d.ts +11 -0
  191. package/lib/typescript/commonjs/live/hooks/useRoomManager.d.ts.map +1 -0
  192. package/lib/typescript/commonjs/live/hooks/useRoomUsers.d.ts +5 -0
  193. package/lib/typescript/commonjs/live/hooks/useRoomUsers.d.ts.map +1 -0
  194. package/lib/typescript/commonjs/live/index.d.ts +25 -0
  195. package/lib/typescript/commonjs/live/index.d.ts.map +1 -0
  196. package/lib/typescript/commonjs/live/services/livekitService.d.ts +7 -0
  197. package/lib/typescript/commonjs/live/services/livekitService.d.ts.map +1 -0
  198. package/lib/typescript/commonjs/live/services/spaceSocketService.d.ts +69 -0
  199. package/lib/typescript/commonjs/live/services/spaceSocketService.d.ts.map +1 -0
  200. package/lib/typescript/commonjs/live/services/spacesService.d.ts +181 -0
  201. package/lib/typescript/commonjs/live/services/spacesService.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/live/types.d.ts +100 -0
  203. package/lib/typescript/commonjs/live/types.d.ts.map +1 -0
  204. package/lib/typescript/commonjs/live/validation.d.ts +658 -0
  205. package/lib/typescript/commonjs/live/validation.d.ts.map +1 -0
  206. package/lib/typescript/commonjs/package.json +1 -0
  207. package/{dist/types → lib/typescript/commonjs}/schema.d.ts +1 -0
  208. package/lib/typescript/commonjs/schema.d.ts.map +1 -0
  209. package/lib/typescript/module/client.d.ts +141 -0
  210. package/lib/typescript/module/client.d.ts.map +1 -0
  211. package/lib/typescript/module/errors.d.ts +9 -0
  212. package/lib/typescript/module/errors.d.ts.map +1 -0
  213. package/lib/typescript/module/index.d.ts +6 -0
  214. package/lib/typescript/module/index.d.ts.map +1 -0
  215. package/lib/typescript/module/index.native.d.ts +3 -0
  216. package/lib/typescript/module/index.native.d.ts.map +1 -0
  217. package/lib/typescript/module/live/assets/icons/spaces-icon.d.ts +13 -0
  218. package/lib/typescript/module/live/assets/icons/spaces-icon.d.ts.map +1 -0
  219. package/lib/typescript/module/live/assets/icons/syra-icon.d.ts +13 -0
  220. package/lib/typescript/module/live/assets/icons/syra-icon.d.ts.map +1 -0
  221. package/lib/typescript/module/live/colors.d.ts +35 -0
  222. package/lib/typescript/module/live/colors.d.ts.map +1 -0
  223. package/lib/typescript/module/live/components/AnimatedPulse.d.ts +8 -0
  224. package/lib/typescript/module/live/components/AnimatedPulse.d.ts.map +1 -0
  225. package/lib/typescript/module/live/components/AnimatedSpeakerRing.d.ts +10 -0
  226. package/lib/typescript/module/live/components/AnimatedSpeakerRing.d.ts.map +1 -0
  227. package/lib/typescript/module/live/components/CreateRoomSheet.d.ts +26 -0
  228. package/lib/typescript/module/live/components/CreateRoomSheet.d.ts.map +1 -0
  229. package/lib/typescript/module/live/components/InsightsPanel.d.ts +11 -0
  230. package/lib/typescript/module/live/components/InsightsPanel.d.ts.map +1 -0
  231. package/lib/typescript/module/live/components/LiveRoomSheet.d.ts +11 -0
  232. package/lib/typescript/module/live/components/LiveRoomSheet.d.ts.map +1 -0
  233. package/lib/typescript/module/live/components/MiniRoomBar.d.ts +15 -0
  234. package/lib/typescript/module/live/components/MiniRoomBar.d.ts.map +1 -0
  235. package/lib/typescript/module/live/components/PanelHeader.d.ts +10 -0
  236. package/lib/typescript/module/live/components/PanelHeader.d.ts.map +1 -0
  237. package/lib/typescript/module/live/components/PodcastStreamPicker.d.ts +54 -0
  238. package/lib/typescript/module/live/components/PodcastStreamPicker.d.ts.map +1 -0
  239. package/lib/typescript/module/live/components/RecordingCard.d.ts +11 -0
  240. package/lib/typescript/module/live/components/RecordingCard.d.ts.map +1 -0
  241. package/lib/typescript/module/live/components/RecordingsPanel.d.ts +12 -0
  242. package/lib/typescript/module/live/components/RecordingsPanel.d.ts.map +1 -0
  243. package/lib/typescript/module/live/components/RoomCard.d.ts +38 -0
  244. package/lib/typescript/module/live/components/RoomCard.d.ts.map +1 -0
  245. package/lib/typescript/module/live/components/StreamConfigModal.d.ts +11 -0
  246. package/lib/typescript/module/live/components/StreamConfigModal.d.ts.map +1 -0
  247. package/lib/typescript/module/live/components/StreamConfigPanel.d.ts +13 -0
  248. package/lib/typescript/module/live/components/StreamConfigPanel.d.ts.map +1 -0
  249. package/lib/typescript/module/live/context/LiveConfigContext.d.ts +78 -0
  250. package/lib/typescript/module/live/context/LiveConfigContext.d.ts.map +1 -0
  251. package/lib/typescript/module/live/context/LiveRoomContext.d.ts +12 -0
  252. package/lib/typescript/module/live/context/LiveRoomContext.d.ts.map +1 -0
  253. package/lib/typescript/module/live/hooks/useActiveSpeakers.d.ts +3 -0
  254. package/lib/typescript/module/live/hooks/useActiveSpeakers.d.ts.map +1 -0
  255. package/lib/typescript/module/live/hooks/useRoomAudio.d.ts +16 -0
  256. package/lib/typescript/module/live/hooks/useRoomAudio.d.ts.map +1 -0
  257. package/lib/typescript/module/live/hooks/useRoomConnection.d.ts +29 -0
  258. package/lib/typescript/module/live/hooks/useRoomConnection.d.ts.map +1 -0
  259. package/lib/typescript/module/live/hooks/useRoomManager.d.ts +11 -0
  260. package/lib/typescript/module/live/hooks/useRoomManager.d.ts.map +1 -0
  261. package/lib/typescript/module/live/hooks/useRoomUsers.d.ts +5 -0
  262. package/lib/typescript/module/live/hooks/useRoomUsers.d.ts.map +1 -0
  263. package/lib/typescript/module/live/index.d.ts +25 -0
  264. package/lib/typescript/module/live/index.d.ts.map +1 -0
  265. package/lib/typescript/module/live/services/livekitService.d.ts +7 -0
  266. package/lib/typescript/module/live/services/livekitService.d.ts.map +1 -0
  267. package/lib/typescript/module/live/services/spaceSocketService.d.ts +69 -0
  268. package/lib/typescript/module/live/services/spaceSocketService.d.ts.map +1 -0
  269. package/lib/typescript/module/live/services/spacesService.d.ts +181 -0
  270. package/lib/typescript/module/live/services/spacesService.d.ts.map +1 -0
  271. package/lib/typescript/module/live/types.d.ts +100 -0
  272. package/lib/typescript/module/live/types.d.ts.map +1 -0
  273. package/lib/typescript/module/live/validation.d.ts +658 -0
  274. package/lib/typescript/module/live/validation.d.ts.map +1 -0
  275. package/lib/typescript/module/package.json +1 -0
  276. package/lib/typescript/module/schema.d.ts +1072 -0
  277. package/lib/typescript/module/schema.d.ts.map +1 -0
  278. package/package.json +123 -21
  279. package/src/index.native.ts +2 -0
  280. package/src/live/assets/icons/spaces-icon.tsx +15 -0
  281. package/src/live/assets/icons/syra-icon.tsx +13 -0
  282. package/src/live/assets/sounds/intro.mp3 +0 -0
  283. package/src/live/colors.ts +57 -0
  284. package/src/live/components/AnimatedPulse.tsx +52 -0
  285. package/src/live/components/AnimatedSpeakerRing.tsx +101 -0
  286. package/src/live/components/CreateRoomSheet.tsx +654 -0
  287. package/src/live/components/InsightsPanel.tsx +202 -0
  288. package/src/live/components/LiveRoomSheet.tsx +970 -0
  289. package/src/live/components/MiniRoomBar.tsx +167 -0
  290. package/src/live/components/PanelHeader.tsx +36 -0
  291. package/src/live/components/PodcastStreamPicker.tsx +1155 -0
  292. package/src/live/components/RecordingCard.tsx +154 -0
  293. package/src/live/components/RecordingsPanel.tsx +252 -0
  294. package/src/live/components/RoomCard.tsx +343 -0
  295. package/src/live/components/StreamConfigModal.tsx +600 -0
  296. package/src/live/components/StreamConfigPanel.tsx +729 -0
  297. package/src/live/context/LiveConfigContext.tsx +96 -0
  298. package/src/live/context/LiveRoomContext.tsx +235 -0
  299. package/src/live/hooks/useActiveSpeakers.ts +39 -0
  300. package/src/live/hooks/useRoomAudio.ts +103 -0
  301. package/src/live/hooks/useRoomConnection.ts +162 -0
  302. package/src/live/hooks/useRoomManager.ts +17 -0
  303. package/src/live/hooks/useRoomUsers.ts +52 -0
  304. package/src/live/index.ts +104 -0
  305. package/src/live/services/livekitService.ts +11 -0
  306. package/src/live/services/spaceSocketService.ts +136 -0
  307. package/src/live/services/spacesService.ts +692 -0
  308. package/src/live/types.ts +119 -0
  309. package/src/live/validation.ts +279 -0
  310. package/dist/cjs/client.js +0 -244
  311. package/dist/cjs/errors.js +0 -16
  312. package/dist/cjs/index.js +0 -15
  313. package/dist/cjs/package.json +0 -3
  314. package/dist/esm/client.js +0 -240
  315. package/dist/esm/errors.js +0 -12
  316. package/dist/esm/index.js +0 -3
  317. package/dist/esm/package.json +0 -3
@@ -0,0 +1,816 @@
1
+ "use strict";
2
+
3
+ import React, { useState, useEffect, useRef } from 'react';
4
+ import { View, Text, StyleSheet, TouchableOpacity, TextInput, Image, ActivityIndicator, Platform, ScrollView } from 'react-native';
5
+ import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
6
+ import * as ImagePicker from 'expo-image-picker';
7
+ import { useLiveConfig } from "../context/LiveConfigContext.js";
8
+ import { PanelHeader } from "./PanelHeader.js";
9
+ import { PodcastStreamPicker, MusicPicker } from "./PodcastStreamPicker.js";
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ function appendNativeFile(formData, file) {
12
+ const nativeFormData = formData;
13
+ nativeFormData.append('file', file);
14
+ }
15
+ export function StreamConfigPanel({
16
+ roomId,
17
+ roomStatus,
18
+ initialStreamUrl,
19
+ initialRtmpUrl,
20
+ initialStreamKey,
21
+ onClose,
22
+ onStreamStarted
23
+ }) {
24
+ const {
25
+ useTheme,
26
+ roomsService,
27
+ toast,
28
+ onRoomChanged
29
+ } = useLiveConfig();
30
+ const theme = useTheme();
31
+ const initialUrl = initialStreamUrl?.trim() ?? '';
32
+ const hasExistingKey = !!initialStreamKey;
33
+ const isEditingUrlStream = roomStatus === 'live' && initialUrl.length > 0;
34
+ const [mode, setMode] = useState(hasExistingKey ? 'rtmp' : 'url');
35
+ const [loading, setLoading] = useState(false);
36
+ const [streamUrl, setStreamUrl] = useState(initialUrl);
37
+ const [rtmpUrl, setRtmpUrl] = useState(initialRtmpUrl || null);
38
+ const [streamKey, setStreamKey] = useState(initialStreamKey || null);
39
+ const [generatingKey, setGeneratingKey] = useState(false);
40
+ const [title, setTitle] = useState('');
41
+ const [description, setDescription] = useState('');
42
+ const [imageCdnUrl, setImageCdnUrl] = useState(null);
43
+ const [imagePreviewUri, setImagePreviewUri] = useState(null);
44
+ const [uploadingImage, setUploadingImage] = useState(false);
45
+ const resetState = () => {
46
+ setStreamUrl('');
47
+ setRtmpUrl(null);
48
+ setStreamKey(null);
49
+ setTitle('');
50
+ setDescription('');
51
+ setImageCdnUrl(null);
52
+ setImagePreviewUri(null);
53
+ setMode('url');
54
+ };
55
+ const handlePickImage = async () => {
56
+ try {
57
+ const result = await ImagePicker.launchImageLibraryAsync({
58
+ mediaTypes: ['images'],
59
+ quality: 0.8,
60
+ allowsEditing: true,
61
+ aspect: [16, 9]
62
+ });
63
+ if (result.canceled || !result.assets?.[0]) return;
64
+ const asset = result.assets[0];
65
+ setImagePreviewUri(asset.uri);
66
+ setUploadingImage(true);
67
+ try {
68
+ const formData = new FormData();
69
+ if (Platform.OS === 'web') {
70
+ const response = await fetch(asset.uri);
71
+ const blob = await response.blob();
72
+ formData.append('file', new File([blob], 'stream-cover.jpg', {
73
+ type: asset.mimeType || 'image/jpeg'
74
+ }));
75
+ } else {
76
+ const nativeFile = {
77
+ uri: asset.uri,
78
+ name: 'stream-cover.jpg',
79
+ type: asset.mimeType || 'image/jpeg'
80
+ };
81
+ appendNativeFile(formData, nativeFile);
82
+ }
83
+ const cdnUrl = await roomsService.uploadRoomImage(roomId, formData);
84
+ if (cdnUrl) {
85
+ setImageCdnUrl(cdnUrl);
86
+ } else {
87
+ toast.error('Failed to upload image');
88
+ setImagePreviewUri(null);
89
+ }
90
+ } catch (err) {
91
+ console.error('Image upload error:', err);
92
+ toast.error('Failed to upload image');
93
+ setImagePreviewUri(null);
94
+ } finally {
95
+ setUploadingImage(false);
96
+ }
97
+ } catch (err) {
98
+ console.error('Image picker error:', err);
99
+ toast.error('Could not open image picker');
100
+ }
101
+ };
102
+ const ensureRoomLive = async () => {
103
+ if (roomStatus === 'live') return true;
104
+ if (roomStatus === 'scheduled') {
105
+ const started = await roomsService.startRoom(roomId);
106
+ if (!started) {
107
+ toast.error('Failed to start room');
108
+ return false;
109
+ }
110
+ onRoomChanged?.(roomId);
111
+ return true;
112
+ }
113
+ toast.error('Room cannot be started');
114
+ return false;
115
+ };
116
+ const handleStartUrlStream = async () => {
117
+ if (!streamUrl.trim() || loading) return;
118
+ setLoading(true);
119
+ try {
120
+ if (!(await ensureRoomLive())) return;
121
+ const result = await roomsService.startStream(roomId, {
122
+ url: streamUrl.trim(),
123
+ title: title.trim() || undefined,
124
+ image: imageCdnUrl || undefined,
125
+ description: description.trim() || undefined
126
+ });
127
+ if (result) {
128
+ toast.success('Stream started');
129
+ resetState();
130
+ onStreamStarted();
131
+ onClose();
132
+ } else {
133
+ toast.error('Failed to start stream');
134
+ }
135
+ } catch {
136
+ toast.error('Failed to start stream');
137
+ } finally {
138
+ setLoading(false);
139
+ }
140
+ };
141
+ const handleStartPodcast = async (syraPodcastId, episodeId) => {
142
+ if (loading) return;
143
+ setLoading(true);
144
+ try {
145
+ if (!(await ensureRoomLive())) return;
146
+ const result = await roomsService.startPodcastStream(roomId, {
147
+ syraPodcastId,
148
+ episodeId
149
+ });
150
+ if (result) {
151
+ toast.success('Stream started');
152
+ resetState();
153
+ onStreamStarted();
154
+ onClose();
155
+ } else {
156
+ toast.error('Failed to start stream');
157
+ }
158
+ } catch {
159
+ toast.error('Failed to start stream');
160
+ } finally {
161
+ setLoading(false);
162
+ }
163
+ };
164
+
165
+ // Start a multi-episode session: the first episode plays now, the rest are
166
+ // persisted as the room's up-next queue.
167
+ const handleStartPodcastQueue = async items => {
168
+ if (loading || items.length === 0) return;
169
+ const [first, ...rest] = items;
170
+ setLoading(true);
171
+ try {
172
+ if (!(await ensureRoomLive())) return;
173
+ const result = await roomsService.startPodcastStream(roomId, {
174
+ syraPodcastId: first.syraPodcastId,
175
+ episodeId: first.episodeId,
176
+ queue: rest
177
+ });
178
+ if (result) {
179
+ toast.success('Stream started');
180
+ resetState();
181
+ onStreamStarted();
182
+ onClose();
183
+ } else {
184
+ toast.error('Failed to start stream');
185
+ }
186
+ } catch {
187
+ toast.error('Failed to start stream');
188
+ } finally {
189
+ setLoading(false);
190
+ }
191
+ };
192
+
193
+ // Stream a single Syra track into the room (a "listening party").
194
+ const handleStartTrack = async trackId => {
195
+ if (loading) return;
196
+ setLoading(true);
197
+ try {
198
+ if (!(await ensureRoomLive())) return;
199
+ const result = await roomsService.startTrackStream(roomId, {
200
+ trackId
201
+ });
202
+ if (result) {
203
+ toast.success('Stream started');
204
+ resetState();
205
+ onStreamStarted();
206
+ onClose();
207
+ } else {
208
+ toast.error('Failed to start stream');
209
+ }
210
+ } catch {
211
+ toast.error('Failed to start stream');
212
+ } finally {
213
+ setLoading(false);
214
+ }
215
+ };
216
+
217
+ // Start a multi-track session: the first track plays now, the rest are
218
+ // persisted as the room's up-next queue.
219
+ const handleStartTrackQueue = async trackIds => {
220
+ if (loading || trackIds.length === 0) return;
221
+ const [first, ...rest] = trackIds;
222
+ setLoading(true);
223
+ try {
224
+ if (!(await ensureRoomLive())) return;
225
+ const result = await roomsService.startTrackStream(roomId, {
226
+ trackId: first,
227
+ queue: rest.map(trackId => ({
228
+ trackId
229
+ }))
230
+ });
231
+ if (result) {
232
+ toast.success('Stream started');
233
+ resetState();
234
+ onStreamStarted();
235
+ onClose();
236
+ } else {
237
+ toast.error('Failed to start stream');
238
+ }
239
+ } catch {
240
+ toast.error('Failed to start stream');
241
+ } finally {
242
+ setLoading(false);
243
+ }
244
+ };
245
+ const generatingRef = useRef(false);
246
+ const generateKey = async () => {
247
+ if (generatingRef.current) return;
248
+ generatingRef.current = true;
249
+ setGeneratingKey(true);
250
+ try {
251
+ if (!(await ensureRoomLive())) return;
252
+ const result = await roomsService.generateStreamKey(roomId, {
253
+ title: title.trim() || undefined,
254
+ image: imageCdnUrl || undefined,
255
+ description: description.trim() || undefined
256
+ });
257
+ if (result?.streamKey) {
258
+ setRtmpUrl(result.rtmpUrl || '');
259
+ setStreamKey(result.streamKey);
260
+ } else {
261
+ console.error('Generate stream key response:', JSON.stringify(result, null, 2));
262
+ toast.error('Failed to generate stream key');
263
+ }
264
+ } catch (err) {
265
+ console.error('Generate stream key error:', err);
266
+ const msg = err instanceof Error ? err.message : 'Unknown error';
267
+ toast.error(`Stream key error: ${msg}`);
268
+ } finally {
269
+ setGeneratingKey(false);
270
+ generatingRef.current = false;
271
+ }
272
+ };
273
+
274
+ // Auto-generate RTMP credentials when switching to the External App tab
275
+ useEffect(() => {
276
+ if (mode === 'rtmp' && !streamKey && !generatingRef.current) {
277
+ generateKey();
278
+ }
279
+ // eslint-disable-next-line react-hooks/exhaustive-deps
280
+ }, [mode]);
281
+ const handleUpdateMetadata = async () => {
282
+ if (loading) return;
283
+ const trimmedUrl = streamUrl.trim();
284
+ if (mode === 'url' && !trimmedUrl) {
285
+ toast.error('Stream URL is required');
286
+ return;
287
+ }
288
+ setLoading(true);
289
+ try {
290
+ const success = await roomsService.updateStreamMetadata(roomId, {
291
+ ...(mode === 'url' ? {
292
+ url: trimmedUrl
293
+ } : {}),
294
+ title: title.trim() || undefined,
295
+ image: imageCdnUrl || undefined,
296
+ description: description.trim() || undefined
297
+ });
298
+ if (success) {
299
+ toast.success('Stream info updated');
300
+ onStreamStarted();
301
+ } else {
302
+ toast.error('Failed to update stream info');
303
+ }
304
+ } catch {
305
+ toast.error('Failed to update stream info');
306
+ } finally {
307
+ setLoading(false);
308
+ }
309
+ };
310
+ const copyToClipboard = async (text, label) => {
311
+ try {
312
+ if (Platform.OS === 'web') {
313
+ await navigator.clipboard.writeText(text);
314
+ } else {
315
+ const {
316
+ Clipboard
317
+ } = require('react-native');
318
+ Clipboard.setString(text);
319
+ }
320
+ toast.success(`${label} copied`);
321
+ } catch {
322
+ toast.error('Failed to copy');
323
+ }
324
+ };
325
+ return /*#__PURE__*/_jsxs(View, {
326
+ style: styles.container,
327
+ children: [/*#__PURE__*/_jsx(PanelHeader, {
328
+ title: "Stream Setup",
329
+ theme: theme,
330
+ onBack: onClose
331
+ }), /*#__PURE__*/_jsxs(View, {
332
+ style: styles.modeSelector,
333
+ children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
334
+ style: [styles.modeTab, {
335
+ borderColor: theme.colors.border
336
+ }, mode === 'url' && {
337
+ backgroundColor: theme.colors.primary,
338
+ borderColor: theme.colors.primary
339
+ }],
340
+ onPress: () => setMode('url'),
341
+ children: [/*#__PURE__*/_jsx(MaterialCommunityIcons, {
342
+ name: "link",
343
+ size: 16,
344
+ color: mode === 'url' ? '#FFFFFF' : theme.colors.text
345
+ }), /*#__PURE__*/_jsx(Text, {
346
+ style: [styles.modeTabText, {
347
+ color: mode === 'url' ? '#FFFFFF' : theme.colors.text
348
+ }],
349
+ children: "Stream URL"
350
+ })]
351
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
352
+ style: [styles.modeTab, {
353
+ borderColor: theme.colors.border
354
+ }, mode === 'rtmp' && {
355
+ backgroundColor: theme.colors.primary,
356
+ borderColor: theme.colors.primary
357
+ }],
358
+ onPress: () => setMode('rtmp'),
359
+ children: [/*#__PURE__*/_jsx(MaterialCommunityIcons, {
360
+ name: "key",
361
+ size: 16,
362
+ color: mode === 'rtmp' ? '#FFFFFF' : theme.colors.text
363
+ }), /*#__PURE__*/_jsx(Text, {
364
+ style: [styles.modeTabText, {
365
+ color: mode === 'rtmp' ? '#FFFFFF' : theme.colors.text
366
+ }],
367
+ children: "External App"
368
+ })]
369
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
370
+ style: [styles.modeTab, {
371
+ borderColor: theme.colors.border
372
+ }, mode === 'podcast' && {
373
+ backgroundColor: theme.colors.primary,
374
+ borderColor: theme.colors.primary
375
+ }],
376
+ onPress: () => setMode('podcast'),
377
+ children: [/*#__PURE__*/_jsx(MaterialCommunityIcons, {
378
+ name: "podcast",
379
+ size: 16,
380
+ color: mode === 'podcast' ? '#FFFFFF' : theme.colors.text
381
+ }), /*#__PURE__*/_jsx(Text, {
382
+ style: [styles.modeTabText, {
383
+ color: mode === 'podcast' ? '#FFFFFF' : theme.colors.text
384
+ }],
385
+ children: "Podcast"
386
+ })]
387
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
388
+ style: [styles.modeTab, {
389
+ borderColor: theme.colors.border
390
+ }, mode === 'music' && {
391
+ backgroundColor: theme.colors.primary,
392
+ borderColor: theme.colors.primary
393
+ }],
394
+ onPress: () => setMode('music'),
395
+ children: [/*#__PURE__*/_jsx(MaterialCommunityIcons, {
396
+ name: "music",
397
+ size: 16,
398
+ color: mode === 'music' ? '#FFFFFF' : theme.colors.text
399
+ }), /*#__PURE__*/_jsx(Text, {
400
+ style: [styles.modeTabText, {
401
+ color: mode === 'music' ? '#FFFFFF' : theme.colors.text
402
+ }],
403
+ children: "Music"
404
+ })]
405
+ })]
406
+ }), mode === 'podcast' ? /*#__PURE__*/_jsx(PodcastStreamPicker, {
407
+ onSelectEpisode: handleStartPodcast,
408
+ onStartQueue: handleStartPodcastQueue
409
+ }) : mode === 'music' ? /*#__PURE__*/_jsx(MusicPicker, {
410
+ onSelectTrack: handleStartTrack,
411
+ onStartQueue: handleStartTrackQueue
412
+ }) : /*#__PURE__*/_jsxs(ScrollView, {
413
+ style: {
414
+ flex: 1
415
+ },
416
+ contentContainerStyle: styles.scrollContent,
417
+ showsVerticalScrollIndicator: false,
418
+ keyboardShouldPersistTaps: "handled",
419
+ children: [mode === 'url' && /*#__PURE__*/_jsx(View, {
420
+ style: styles.section,
421
+ children: /*#__PURE__*/_jsx(TextInput, {
422
+ style: [styles.input, {
423
+ backgroundColor: `${theme.colors.card}80`,
424
+ borderColor: theme.colors.border,
425
+ color: theme.colors.text
426
+ }],
427
+ placeholder: "Stream URL (m3u8, Icecast, etc.)",
428
+ placeholderTextColor: theme.colors.textSecondary,
429
+ value: streamUrl,
430
+ onChangeText: setStreamUrl,
431
+ autoCapitalize: "none",
432
+ autoCorrect: false,
433
+ keyboardType: "url"
434
+ })
435
+ }), mode === 'rtmp' && /*#__PURE__*/_jsx(View, {
436
+ style: styles.section,
437
+ children: !streamKey ? /*#__PURE__*/_jsxs(View, {
438
+ style: styles.loadingBox,
439
+ children: [/*#__PURE__*/_jsx(ActivityIndicator, {
440
+ size: "small",
441
+ color: theme.colors.primary
442
+ }), /*#__PURE__*/_jsx(Text, {
443
+ style: [styles.loadingText, {
444
+ color: theme.colors.textSecondary
445
+ }],
446
+ children: "Generating stream key..."
447
+ })]
448
+ }) : /*#__PURE__*/_jsxs(View, {
449
+ style: styles.credentialsBox,
450
+ children: [/*#__PURE__*/_jsx(Text, {
451
+ style: [styles.credLabel, {
452
+ color: theme.colors.textSecondary
453
+ }],
454
+ children: "RTMP URL"
455
+ }), /*#__PURE__*/_jsxs(View, {
456
+ style: [styles.credRow, {
457
+ backgroundColor: `${theme.colors.card}80`,
458
+ borderColor: theme.colors.border
459
+ }],
460
+ children: [/*#__PURE__*/_jsx(Text, {
461
+ style: [styles.credValue, {
462
+ color: theme.colors.text
463
+ }],
464
+ numberOfLines: 1,
465
+ children: rtmpUrl
466
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
467
+ onPress: () => copyToClipboard(rtmpUrl ?? '', 'RTMP URL'),
468
+ style: styles.copyBtn,
469
+ children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
470
+ name: "content-copy",
471
+ size: 18,
472
+ color: theme.colors.primary
473
+ })
474
+ })]
475
+ }), /*#__PURE__*/_jsx(Text, {
476
+ style: [styles.credLabel, {
477
+ color: theme.colors.textSecondary,
478
+ marginTop: 12
479
+ }],
480
+ children: "Stream Key"
481
+ }), /*#__PURE__*/_jsxs(View, {
482
+ style: [styles.credRow, {
483
+ backgroundColor: `${theme.colors.card}80`,
484
+ borderColor: theme.colors.border
485
+ }],
486
+ children: [/*#__PURE__*/_jsx(Text, {
487
+ style: [styles.credValue, {
488
+ color: theme.colors.text
489
+ }],
490
+ numberOfLines: 1,
491
+ children: streamKey
492
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
493
+ onPress: () => {
494
+ if (streamKey) copyToClipboard(streamKey, 'Stream key');
495
+ },
496
+ style: styles.copyBtn,
497
+ children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
498
+ name: "content-copy",
499
+ size: 18,
500
+ color: theme.colors.primary
501
+ })
502
+ })]
503
+ }), /*#__PURE__*/_jsxs(View, {
504
+ style: styles.infoRow,
505
+ children: [/*#__PURE__*/_jsx(MaterialCommunityIcons, {
506
+ name: "information",
507
+ size: 16,
508
+ color: theme.colors.textSecondary
509
+ }), /*#__PURE__*/_jsx(Text, {
510
+ style: [styles.infoText, {
511
+ color: theme.colors.textSecondary
512
+ }],
513
+ children: "Use these in OBS or your streaming app. Audio will play in the room once you start streaming."
514
+ })]
515
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
516
+ style: styles.regenerateBtn,
517
+ onPress: () => {
518
+ setStreamKey(null);
519
+ setRtmpUrl(null);
520
+ generateKey();
521
+ },
522
+ disabled: generatingKey,
523
+ children: [/*#__PURE__*/_jsx(MaterialCommunityIcons, {
524
+ name: "refresh",
525
+ size: 16,
526
+ color: theme.colors.textSecondary
527
+ }), /*#__PURE__*/_jsx(Text, {
528
+ style: [styles.regenerateText, {
529
+ color: theme.colors.textSecondary
530
+ }],
531
+ children: "Regenerate key"
532
+ })]
533
+ })]
534
+ })
535
+ }), /*#__PURE__*/_jsxs(View, {
536
+ style: styles.section,
537
+ children: [/*#__PURE__*/_jsx(Text, {
538
+ style: [styles.sectionLabel, {
539
+ color: theme.colors.textSecondary
540
+ }],
541
+ children: "Stream Info (optional)"
542
+ }), /*#__PURE__*/_jsx(TextInput, {
543
+ style: [styles.input, {
544
+ backgroundColor: `${theme.colors.card}80`,
545
+ borderColor: theme.colors.border,
546
+ color: theme.colors.text
547
+ }],
548
+ placeholder: "Title",
549
+ placeholderTextColor: theme.colors.textSecondary,
550
+ value: title,
551
+ onChangeText: setTitle,
552
+ maxLength: 200
553
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
554
+ style: [styles.imagePicker, {
555
+ backgroundColor: `${theme.colors.card}80`,
556
+ borderColor: theme.colors.border
557
+ }],
558
+ onPress: handlePickImage,
559
+ disabled: uploadingImage,
560
+ children: [imagePreviewUri ? /*#__PURE__*/_jsx(Image, {
561
+ source: {
562
+ uri: imagePreviewUri
563
+ },
564
+ style: styles.imagePreview
565
+ }) : /*#__PURE__*/_jsxs(View, {
566
+ style: styles.imagePickerPlaceholder,
567
+ children: [/*#__PURE__*/_jsx(MaterialCommunityIcons, {
568
+ name: "image",
569
+ size: 24,
570
+ color: theme.colors.textSecondary
571
+ }), /*#__PURE__*/_jsx(Text, {
572
+ style: [styles.imagePickerText, {
573
+ color: theme.colors.textSecondary
574
+ }],
575
+ children: "Cover image"
576
+ })]
577
+ }), uploadingImage && /*#__PURE__*/_jsx(View, {
578
+ style: styles.imageOverlay,
579
+ children: /*#__PURE__*/_jsx(ActivityIndicator, {
580
+ size: "small",
581
+ color: "#FFFFFF"
582
+ })
583
+ })]
584
+ }), /*#__PURE__*/_jsx(TextInput, {
585
+ style: [styles.input, styles.inputMultiline, {
586
+ backgroundColor: `${theme.colors.card}80`,
587
+ borderColor: theme.colors.border,
588
+ color: theme.colors.text
589
+ }],
590
+ placeholder: "Description",
591
+ placeholderTextColor: theme.colors.textSecondary,
592
+ value: description,
593
+ onChangeText: setDescription,
594
+ maxLength: 500,
595
+ multiline: true,
596
+ numberOfLines: 2
597
+ })]
598
+ }), /*#__PURE__*/_jsxs(View, {
599
+ style: styles.footer,
600
+ children: [mode === 'url' && /*#__PURE__*/_jsxs(TouchableOpacity, {
601
+ style: [styles.startBtn, {
602
+ backgroundColor: streamUrl.trim() ? theme.colors.primary : theme.colors.backgroundSecondary,
603
+ opacity: loading ? 0.6 : 1
604
+ }],
605
+ onPress: isEditingUrlStream ? handleUpdateMetadata : handleStartUrlStream,
606
+ disabled: !streamUrl.trim() || loading,
607
+ children: [loading ? /*#__PURE__*/_jsx(ActivityIndicator, {
608
+ size: "small",
609
+ color: "#FFFFFF"
610
+ }) : isEditingUrlStream ? /*#__PURE__*/_jsx(MaterialCommunityIcons, {
611
+ name: "content-save",
612
+ size: 18,
613
+ color: streamUrl.trim() ? '#FFFFFF' : theme.colors.textSecondary
614
+ }) : /*#__PURE__*/_jsx(MaterialCommunityIcons, {
615
+ name: "play",
616
+ size: 18,
617
+ color: streamUrl.trim() ? '#FFFFFF' : theme.colors.textSecondary
618
+ }), /*#__PURE__*/_jsx(Text, {
619
+ style: {
620
+ color: streamUrl.trim() ? '#FFFFFF' : theme.colors.textSecondary,
621
+ fontWeight: '600',
622
+ fontSize: 16
623
+ },
624
+ children: isEditingUrlStream ? 'Save Stream Info' : 'Start Stream'
625
+ })]
626
+ }), mode === 'rtmp' && streamKey && /*#__PURE__*/_jsxs(TouchableOpacity, {
627
+ style: [styles.startBtn, {
628
+ backgroundColor: theme.colors.primary,
629
+ opacity: loading ? 0.6 : 1
630
+ }],
631
+ onPress: handleUpdateMetadata,
632
+ disabled: loading,
633
+ children: [loading ? /*#__PURE__*/_jsx(ActivityIndicator, {
634
+ size: "small",
635
+ color: "#FFFFFF"
636
+ }) : /*#__PURE__*/_jsx(MaterialCommunityIcons, {
637
+ name: "content-save",
638
+ size: 18,
639
+ color: "#FFFFFF"
640
+ }), /*#__PURE__*/_jsx(Text, {
641
+ style: {
642
+ color: '#FFFFFF',
643
+ fontWeight: '600',
644
+ fontSize: 16
645
+ },
646
+ children: "Save Stream Info"
647
+ })]
648
+ })]
649
+ })]
650
+ })]
651
+ });
652
+ }
653
+ const styles = StyleSheet.create({
654
+ container: {
655
+ flex: 1
656
+ },
657
+ scrollContent: {
658
+ paddingBottom: 32
659
+ },
660
+ modeSelector: {
661
+ flexDirection: 'row',
662
+ gap: 10,
663
+ paddingHorizontal: 16,
664
+ paddingTop: 16,
665
+ paddingBottom: 8
666
+ },
667
+ modeTab: {
668
+ flex: 1,
669
+ flexDirection: 'row',
670
+ alignItems: 'center',
671
+ justifyContent: 'center',
672
+ gap: 6,
673
+ paddingVertical: 10,
674
+ borderRadius: 10,
675
+ borderWidth: 1
676
+ },
677
+ modeTabText: {
678
+ fontSize: 14,
679
+ fontWeight: '600'
680
+ },
681
+ section: {
682
+ paddingHorizontal: 16,
683
+ paddingTop: 12,
684
+ gap: 10
685
+ },
686
+ sectionLabel: {
687
+ fontSize: 13,
688
+ fontWeight: '600',
689
+ textTransform: 'uppercase',
690
+ letterSpacing: 0.5,
691
+ marginBottom: 2
692
+ },
693
+ input: {
694
+ borderWidth: 1,
695
+ borderRadius: 10,
696
+ paddingHorizontal: 14,
697
+ paddingVertical: 12,
698
+ fontSize: 15
699
+ },
700
+ inputMultiline: {
701
+ minHeight: 60,
702
+ textAlignVertical: 'top'
703
+ },
704
+ imagePicker: {
705
+ borderWidth: 1,
706
+ borderRadius: 10,
707
+ overflow: 'hidden',
708
+ height: 100
709
+ },
710
+ imagePreview: {
711
+ width: '100%',
712
+ height: '100%',
713
+ resizeMode: 'cover'
714
+ },
715
+ imagePickerPlaceholder: {
716
+ flex: 1,
717
+ alignItems: 'center',
718
+ justifyContent: 'center',
719
+ gap: 4
720
+ },
721
+ imagePickerText: {
722
+ fontSize: 13,
723
+ fontWeight: '500'
724
+ },
725
+ imageOverlay: {
726
+ ...StyleSheet.absoluteFill,
727
+ backgroundColor: 'rgba(0,0,0,0.4)',
728
+ alignItems: 'center',
729
+ justifyContent: 'center'
730
+ },
731
+ generateBtn: {
732
+ flexDirection: 'row',
733
+ alignItems: 'center',
734
+ justifyContent: 'center',
735
+ gap: 8,
736
+ paddingVertical: 14,
737
+ borderRadius: 10
738
+ },
739
+ generateBtnText: {
740
+ color: '#FFFFFF',
741
+ fontSize: 16,
742
+ fontWeight: '600'
743
+ },
744
+ loadingBox: {
745
+ alignItems: 'center',
746
+ justifyContent: 'center',
747
+ gap: 10,
748
+ paddingVertical: 24
749
+ },
750
+ loadingText: {
751
+ fontSize: 14
752
+ },
753
+ credentialsBox: {
754
+ gap: 4
755
+ },
756
+ regenerateBtn: {
757
+ flexDirection: 'row',
758
+ alignItems: 'center',
759
+ justifyContent: 'center',
760
+ gap: 6,
761
+ marginTop: 12,
762
+ paddingVertical: 8
763
+ },
764
+ regenerateText: {
765
+ fontSize: 13,
766
+ fontWeight: '500'
767
+ },
768
+ credLabel: {
769
+ fontSize: 12,
770
+ fontWeight: '600',
771
+ textTransform: 'uppercase',
772
+ letterSpacing: 0.5
773
+ },
774
+ credRow: {
775
+ flexDirection: 'row',
776
+ alignItems: 'center',
777
+ borderWidth: 1,
778
+ borderRadius: 10,
779
+ paddingLeft: 14,
780
+ paddingRight: 4,
781
+ paddingVertical: 4
782
+ },
783
+ credValue: {
784
+ flex: 1,
785
+ fontSize: 13,
786
+ fontFamily: Platform.OS === 'ios' ? 'Menlo' : 'monospace'
787
+ },
788
+ copyBtn: {
789
+ padding: 10
790
+ },
791
+ infoRow: {
792
+ flexDirection: 'row',
793
+ alignItems: 'flex-start',
794
+ gap: 6,
795
+ marginTop: 10
796
+ },
797
+ infoText: {
798
+ flex: 1,
799
+ fontSize: 13,
800
+ lineHeight: 18
801
+ },
802
+ footer: {
803
+ paddingHorizontal: 16,
804
+ paddingTop: 20,
805
+ paddingBottom: 40
806
+ },
807
+ startBtn: {
808
+ flexDirection: 'row',
809
+ alignItems: 'center',
810
+ justifyContent: 'center',
811
+ gap: 8,
812
+ paddingVertical: 14,
813
+ borderRadius: 12
814
+ }
815
+ });
816
+ //# sourceMappingURL=StreamConfigPanel.js.map