prismcast 1.8.0 → 1.10.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 (392) hide show
  1. package/README.md +6 -6
  2. package/dist/app.d.ts +1 -1
  3. package/dist/app.js +41 -13
  4. package/dist/app.js.map +1 -1
  5. package/dist/browser/cdp.d.ts +4 -6
  6. package/dist/browser/cdp.js +18 -22
  7. package/dist/browser/cdp.js.map +1 -1
  8. package/dist/browser/channelSelection.d.ts +41 -11
  9. package/dist/browser/channelSelection.js +75 -24
  10. package/dist/browser/channelSelection.js.map +1 -1
  11. package/dist/browser/display.d.ts +1 -1
  12. package/dist/browser/index.d.ts +8 -8
  13. package/dist/browser/index.js +44 -45
  14. package/dist/browser/index.js.map +1 -1
  15. package/dist/browser/login.d.ts +2 -2
  16. package/dist/browser/login.js +1 -1
  17. package/dist/browser/manifestInterceptor.d.ts +77 -0
  18. package/dist/browser/manifestInterceptor.js +323 -0
  19. package/dist/browser/manifestInterceptor.js.map +1 -0
  20. package/dist/browser/precaching.d.ts +1 -1
  21. package/dist/browser/precaching.js +23 -23
  22. package/dist/browser/precaching.js.map +1 -1
  23. package/dist/browser/tuning/comcastPolymer.d.ts +1 -1
  24. package/dist/browser/tuning/cox.d.ts +1 -1
  25. package/dist/browser/tuning/directv.d.ts +1 -1
  26. package/dist/browser/tuning/directv.js +65 -69
  27. package/dist/browser/tuning/directv.js.map +1 -1
  28. package/dist/browser/tuning/fox.d.ts +1 -1
  29. package/dist/browser/tuning/fox.js +172 -15
  30. package/dist/browser/tuning/fox.js.map +1 -1
  31. package/dist/browser/tuning/hbo.d.ts +1 -1
  32. package/dist/browser/tuning/hbo.js +7 -7
  33. package/dist/browser/tuning/hbo.js.map +1 -1
  34. package/dist/browser/tuning/hulu.d.ts +1 -1
  35. package/dist/browser/tuning/hulu.js +120 -113
  36. package/dist/browser/tuning/hulu.js.map +1 -1
  37. package/dist/browser/tuning/shared.d.ts +3 -3
  38. package/dist/browser/tuning/shared.js +5 -5
  39. package/dist/browser/tuning/sling.d.ts +1 -1
  40. package/dist/browser/tuning/sling.js +30 -30
  41. package/dist/browser/tuning/sling.js.map +1 -1
  42. package/dist/browser/tuning/spectrum.d.ts +1 -1
  43. package/dist/browser/tuning/spectrum.js +21 -22
  44. package/dist/browser/tuning/spectrum.js.map +1 -1
  45. package/dist/browser/tuning/thumbnailRow.d.ts +1 -1
  46. package/dist/browser/tuning/thumbnailRow.js +1 -1
  47. package/dist/browser/tuning/tileClick.d.ts +1 -1
  48. package/dist/browser/tuning/tileClick.js +5 -5
  49. package/dist/browser/tuning/xfinity.d.ts +1 -1
  50. package/dist/browser/tuning/youtubeTv.d.ts +1 -1
  51. package/dist/browser/tuning/youtubeTv.js +17 -18
  52. package/dist/browser/tuning/youtubeTv.js.map +1 -1
  53. package/dist/browser/video.d.ts +20 -6
  54. package/dist/browser/video.js +30 -38
  55. package/dist/browser/video.js.map +1 -1
  56. package/dist/channels/index.d.ts +1 -2
  57. package/dist/channels/index.js +475 -442
  58. package/dist/channels/index.js.map +1 -1
  59. package/dist/config/channelForm.d.ts +58 -0
  60. package/dist/config/channelForm.js +129 -0
  61. package/dist/config/channelForm.js.map +1 -0
  62. package/dist/config/consistencyProbe.d.ts +7 -0
  63. package/dist/config/consistencyProbe.js +143 -0
  64. package/dist/config/consistencyProbe.js.map +1 -0
  65. package/dist/config/health.d.ts +7 -6
  66. package/dist/config/health.js +78 -65
  67. package/dist/config/health.js.map +1 -1
  68. package/dist/config/index.d.ts +1 -1
  69. package/dist/config/index.js +21 -14
  70. package/dist/config/index.js.map +1 -1
  71. package/dist/config/paths.d.ts +9 -3
  72. package/dist/config/paths.js +12 -4
  73. package/dist/config/paths.js.map +1 -1
  74. package/dist/config/persistence.context.d.ts +8 -0
  75. package/dist/config/persistence.context.js +30 -0
  76. package/dist/config/persistence.context.js.map +1 -0
  77. package/dist/config/persistence.d.ts +157 -0
  78. package/dist/config/persistence.js +446 -0
  79. package/dist/config/persistence.js.map +1 -0
  80. package/dist/config/presets.d.ts +14 -4
  81. package/dist/config/presets.js +84 -75
  82. package/dist/config/presets.js.map +1 -1
  83. package/dist/config/profiles.d.ts +2 -2
  84. package/dist/config/profiles.js +7 -9
  85. package/dist/config/profiles.js.map +1 -1
  86. package/dist/config/servicePacks.d.ts +46 -0
  87. package/dist/config/{providerPacks.js → servicePacks.js} +50 -53
  88. package/dist/config/servicePacks.js.map +1 -0
  89. package/dist/config/services.d.ts +228 -0
  90. package/dist/config/services.js +772 -0
  91. package/dist/config/services.js.map +1 -0
  92. package/dist/config/sites.d.ts +3 -3
  93. package/dist/config/sites.js +75 -75
  94. package/dist/config/sites.js.map +1 -1
  95. package/dist/config/userChannels.d.ts +522 -54
  96. package/dist/config/userChannels.js +1343 -366
  97. package/dist/config/userChannels.js.map +1 -1
  98. package/dist/config/userConfig.d.ts +108 -13
  99. package/dist/config/userConfig.js +296 -143
  100. package/dist/config/userConfig.js.map +1 -1
  101. package/dist/config/userProfiles.d.ts +34 -16
  102. package/dist/config/userProfiles.js +189 -100
  103. package/dist/config/userProfiles.js.map +1 -1
  104. package/dist/hdhr/channelMap.d.ts +1 -1
  105. package/dist/hdhr/channelMap.js +10 -16
  106. package/dist/hdhr/channelMap.js.map +1 -1
  107. package/dist/hdhr/deviceId.js +10 -9
  108. package/dist/hdhr/deviceId.js.map +1 -1
  109. package/dist/hdhr/discover.js +4 -5
  110. package/dist/hdhr/discover.js.map +1 -1
  111. package/dist/hdhr/index.js +12 -19
  112. package/dist/hdhr/index.js.map +1 -1
  113. package/dist/index.js +12 -12
  114. package/dist/index.js.map +1 -1
  115. package/dist/native/codecInference.d.ts +44 -0
  116. package/dist/native/codecInference.js +327 -0
  117. package/dist/native/codecInference.js.map +1 -0
  118. package/dist/native/decrypt.d.ts +1 -1
  119. package/dist/native/index.d.ts +5 -5
  120. package/dist/native/index.js +45 -67
  121. package/dist/native/index.js.map +1 -1
  122. package/dist/native/probe.d.ts +27 -9
  123. package/dist/native/probe.js +159 -68
  124. package/dist/native/probe.js.map +1 -1
  125. package/dist/native/proxy.d.ts +4 -2
  126. package/dist/native/proxy.js +56 -53
  127. package/dist/native/proxy.js.map +1 -1
  128. package/dist/native/tokenExpiry.d.ts +22 -0
  129. package/dist/native/tokenExpiry.js +153 -0
  130. package/dist/native/tokenExpiry.js.map +1 -0
  131. package/dist/routes/assets.js +3 -3
  132. package/dist/routes/assets.js.map +1 -1
  133. package/dist/routes/auth.js +9 -13
  134. package/dist/routes/auth.js.map +1 -1
  135. package/dist/routes/components.js +2 -2
  136. package/dist/routes/components.js.map +1 -1
  137. package/dist/routes/config/channels/endpoints/browse.d.ts +6 -0
  138. package/dist/routes/config/channels/endpoints/browse.js +195 -0
  139. package/dist/routes/config/channels/endpoints/browse.js.map +1 -0
  140. package/dist/routes/config/channels/endpoints/bulk.d.ts +6 -0
  141. package/dist/routes/config/channels/endpoints/bulk.js +128 -0
  142. package/dist/routes/config/channels/endpoints/bulk.js.map +1 -0
  143. package/dist/routes/config/channels/endpoints/crud.d.ts +6 -0
  144. package/dist/routes/config/channels/endpoints/crud.js +504 -0
  145. package/dist/routes/config/channels/endpoints/crud.js.map +1 -0
  146. package/dist/routes/config/channels/endpoints/importExport.d.ts +6 -0
  147. package/dist/routes/config/channels/endpoints/importExport.js +131 -0
  148. package/dist/routes/config/channels/endpoints/importExport.js.map +1 -0
  149. package/dist/routes/config/channels/endpoints/predefined.d.ts +6 -0
  150. package/dist/routes/config/channels/endpoints/predefined.js +78 -0
  151. package/dist/routes/config/channels/endpoints/predefined.js.map +1 -0
  152. package/dist/routes/config/channels/endpoints/prefs.d.ts +6 -0
  153. package/dist/routes/config/channels/endpoints/prefs.js +58 -0
  154. package/dist/routes/config/channels/endpoints/prefs.js.map +1 -0
  155. package/dist/routes/config/channels/endpoints/service.d.ts +6 -0
  156. package/dist/routes/config/channels/endpoints/service.js +149 -0
  157. package/dist/routes/config/channels/endpoints/service.js.map +1 -0
  158. package/dist/routes/config/channels/endpoints/tags.d.ts +6 -0
  159. package/dist/routes/config/channels/endpoints/tags.js +185 -0
  160. package/dist/routes/config/channels/endpoints/tags.js.map +1 -0
  161. package/dist/routes/config/channels/http/handler.d.ts +10 -0
  162. package/dist/routes/config/channels/http/handler.js +20 -0
  163. package/dist/routes/config/channels/http/handler.js.map +1 -0
  164. package/dist/routes/config/channels/http/playlistHint.d.ts +25 -0
  165. package/dist/routes/config/channels/http/playlistHint.js +40 -0
  166. package/dist/routes/config/channels/http/playlistHint.js.map +1 -0
  167. package/dist/routes/config/channels/http/serviceWarning.d.ts +10 -0
  168. package/dist/routes/config/channels/http/serviceWarning.js +28 -0
  169. package/dist/routes/config/channels/http/serviceWarning.js.map +1 -0
  170. package/dist/routes/config/channels/index.d.ts +3 -3
  171. package/dist/routes/config/channels/index.js +2 -2
  172. package/dist/routes/config/channels/index.js.map +1 -1
  173. package/dist/routes/config/channels/{routes.d.ts → setup.d.ts} +1 -1
  174. package/dist/routes/config/channels/setup.js +23 -0
  175. package/dist/routes/config/channels/setup.js.map +1 -0
  176. package/dist/routes/config/channels/table.d.ts +13 -13
  177. package/dist/routes/config/channels/table.js +291 -184
  178. package/dist/routes/config/channels/table.js.map +1 -1
  179. package/dist/routes/config/http/envelope.d.ts +111 -0
  180. package/dist/routes/config/http/envelope.js +103 -0
  181. package/dist/routes/config/http/envelope.js.map +1 -0
  182. package/dist/routes/config/index.d.ts +9 -9
  183. package/dist/routes/config/index.js +5 -5
  184. package/dist/routes/config/index.js.map +1 -1
  185. package/dist/routes/config/{providers.js → services.js} +105 -99
  186. package/dist/routes/config/services.js.map +1 -0
  187. package/dist/routes/config/settings.d.ts +1 -1
  188. package/dist/routes/config/settings.js +85 -60
  189. package/dist/routes/config/settings.js.map +1 -1
  190. package/dist/routes/debug.js +17 -18
  191. package/dist/routes/debug.js.map +1 -1
  192. package/dist/routes/health.js +1 -1
  193. package/dist/routes/health.js.map +1 -1
  194. package/dist/routes/icons.js +2 -2
  195. package/dist/routes/icons.js.map +1 -1
  196. package/dist/routes/index.js +2 -2
  197. package/dist/routes/index.js.map +1 -1
  198. package/dist/routes/logs.js +23 -34
  199. package/dist/routes/logs.js.map +1 -1
  200. package/dist/routes/mpegts.js +1 -1
  201. package/dist/routes/playlist.d.ts +5 -5
  202. package/dist/routes/playlist.js +84 -61
  203. package/dist/routes/playlist.js.map +1 -1
  204. package/dist/routes/root/content.js +82 -61
  205. package/dist/routes/root/content.js.map +1 -1
  206. package/dist/routes/root/index.js +2 -5
  207. package/dist/routes/root/index.js.map +1 -1
  208. package/dist/routes/root/scripts/channels.js +538 -581
  209. package/dist/routes/root/scripts/channels.js.map +1 -1
  210. package/dist/routes/root/scripts/config.js +868 -1022
  211. package/dist/routes/root/scripts/config.js.map +1 -1
  212. package/dist/routes/root/scripts/index.d.ts +4 -4
  213. package/dist/routes/root/scripts/shared.js +445 -197
  214. package/dist/routes/root/scripts/shared.js.map +1 -1
  215. package/dist/routes/root/scripts/status.d.ts +4 -0
  216. package/dist/routes/root/scripts/status.handlers.d.ts +182 -0
  217. package/dist/routes/root/scripts/status.handlers.js +713 -0
  218. package/dist/routes/root/scripts/status.handlers.js.map +1 -0
  219. package/dist/routes/root/scripts/status.js +85 -436
  220. package/dist/routes/root/scripts/status.js.map +1 -1
  221. package/dist/routes/root/styles.js +16 -8
  222. package/dist/routes/root/styles.js.map +1 -1
  223. package/dist/routes/services.d.ts +6 -0
  224. package/dist/routes/{providers.js → services.js} +58 -55
  225. package/dist/routes/services.js.map +1 -0
  226. package/dist/routes/sse.d.ts +16 -0
  227. package/dist/routes/sse.js +29 -0
  228. package/dist/routes/sse.js.map +1 -0
  229. package/dist/routes/streams.js +10 -23
  230. package/dist/routes/streams.js.map +1 -1
  231. package/dist/routes/ui.d.ts +2 -2
  232. package/dist/routes/ui.js +2 -0
  233. package/dist/routes/ui.js.map +1 -1
  234. package/dist/routes/upgrade.js +6 -7
  235. package/dist/routes/upgrade.js.map +1 -1
  236. package/dist/service/commands.context.d.ts +6 -0
  237. package/dist/service/commands.context.js +47 -0
  238. package/dist/service/commands.context.js.map +1 -0
  239. package/dist/service/commands.d.ts +53 -8
  240. package/dist/service/commands.js +172 -192
  241. package/dist/service/commands.js.map +1 -1
  242. package/dist/service/generators.context.d.ts +6 -0
  243. package/dist/service/generators.context.js +45 -0
  244. package/dist/service/generators.context.js.map +1 -0
  245. package/dist/service/generators.d.ts +56 -16
  246. package/dist/service/generators.js +509 -291
  247. package/dist/service/generators.js.map +1 -1
  248. package/dist/service/index.d.ts +2 -2
  249. package/dist/streaming/clients.d.ts +2 -2
  250. package/dist/streaming/clients.js +2 -2
  251. package/dist/streaming/codec.d.ts +2 -2
  252. package/dist/streaming/codec.js +0 -1
  253. package/dist/streaming/codec.js.map +1 -1
  254. package/dist/streaming/fmp4Segmenter.d.ts +2 -2
  255. package/dist/streaming/fmp4Segmenter.js +12 -12
  256. package/dist/streaming/hls.d.ts +7 -7
  257. package/dist/streaming/hls.js +104 -92
  258. package/dist/streaming/hls.js.map +1 -1
  259. package/dist/streaming/hlsResume.d.ts +3 -3
  260. package/dist/streaming/hlsResume.js +6 -6
  261. package/dist/streaming/hlsResume.js.map +1 -1
  262. package/dist/streaming/hlsSegments.d.ts +5 -2
  263. package/dist/streaming/hlsSegments.js +14 -9
  264. package/dist/streaming/hlsSegments.js.map +1 -1
  265. package/dist/streaming/monitor.d.ts +12 -12
  266. package/dist/streaming/monitor.js +98 -66
  267. package/dist/streaming/monitor.js.map +1 -1
  268. package/dist/streaming/mp4Parser.d.ts +34 -4
  269. package/dist/streaming/mp4Parser.js +111 -29
  270. package/dist/streaming/mp4Parser.js.map +1 -1
  271. package/dist/streaming/mpegts.d.ts +1 -1
  272. package/dist/streaming/mpegts.js +13 -10
  273. package/dist/streaming/mpegts.js.map +1 -1
  274. package/dist/streaming/playlistBuilder.d.ts +1 -1
  275. package/dist/streaming/playlistBuilder.js +2 -2
  276. package/dist/streaming/preroll.d.ts +9 -9
  277. package/dist/streaming/preroll.js +40 -42
  278. package/dist/streaming/preroll.js.map +1 -1
  279. package/dist/streaming/pretune.js +4 -4
  280. package/dist/streaming/pretune.js.map +1 -1
  281. package/dist/streaming/recovery.d.ts +3 -3
  282. package/dist/streaming/recovery.js +4 -4
  283. package/dist/streaming/registry.d.ts +6 -6
  284. package/dist/streaming/registry.js +4 -8
  285. package/dist/streaming/registry.js.map +1 -1
  286. package/dist/streaming/setup.d.ts +11 -10
  287. package/dist/streaming/setup.js +120 -71
  288. package/dist/streaming/setup.js.map +1 -1
  289. package/dist/streaming/showInfo.d.ts +9 -3
  290. package/dist/streaming/showInfo.js +33 -27
  291. package/dist/streaming/showInfo.js.map +1 -1
  292. package/dist/streaming/statusEmitter.d.ts +8 -7
  293. package/dist/streaming/statusEmitter.js +5 -5
  294. package/dist/streaming/statusEmitter.js.map +1 -1
  295. package/dist/types/channels.d.ts +139 -36
  296. package/dist/types/channels.js +39 -1
  297. package/dist/types/channels.js.map +1 -1
  298. package/dist/types/config.d.ts +22 -3
  299. package/dist/types/index.d.ts +9 -8
  300. package/dist/types/index.js +1 -0
  301. package/dist/types/index.js.map +1 -1
  302. package/dist/types/profiles.d.ts +14 -13
  303. package/dist/types/selection.d.ts +49 -5
  304. package/dist/types/shared.d.ts +1 -1
  305. package/dist/types/streaming.d.ts +2 -2
  306. package/dist/upgrade/commands.context.d.ts +6 -0
  307. package/dist/upgrade/commands.context.js +29 -0
  308. package/dist/upgrade/commands.context.js.map +1 -0
  309. package/dist/upgrade/commands.d.ts +29 -2
  310. package/dist/upgrade/commands.js +87 -134
  311. package/dist/upgrade/commands.js.map +1 -1
  312. package/dist/upgrade/detection.context.d.ts +6 -0
  313. package/dist/upgrade/detection.context.js +24 -0
  314. package/dist/upgrade/detection.context.js.map +1 -0
  315. package/dist/upgrade/detection.d.ts +140 -10
  316. package/dist/upgrade/detection.js +153 -66
  317. package/dist/upgrade/detection.js.map +1 -1
  318. package/dist/upgrade/index.d.ts +2 -2
  319. package/dist/utils/chromeFetch.d.ts +1 -1
  320. package/dist/utils/chromeFetch.js +2 -2
  321. package/dist/utils/clock.d.ts +14 -0
  322. package/dist/utils/clock.js +28 -0
  323. package/dist/utils/clock.js.map +1 -0
  324. package/dist/utils/debugFilter.d.ts +1 -1
  325. package/dist/utils/debugFilter.js +8 -6
  326. package/dist/utils/debugFilter.js.map +1 -1
  327. package/dist/utils/delay.d.ts +2 -3
  328. package/dist/utils/delay.js +10 -16
  329. package/dist/utils/delay.js.map +1 -1
  330. package/dist/utils/evaluate.js +12 -14
  331. package/dist/utils/evaluate.js.map +1 -1
  332. package/dist/utils/ffmpeg.context.d.ts +6 -0
  333. package/dist/utils/ffmpeg.context.js +31 -0
  334. package/dist/utils/ffmpeg.context.js.map +1 -0
  335. package/dist/utils/ffmpeg.d.ts +85 -29
  336. package/dist/utils/ffmpeg.js +126 -129
  337. package/dist/utils/ffmpeg.js.map +1 -1
  338. package/dist/utils/fileLogger.d.ts +18 -2
  339. package/dist/utils/fileLogger.js +60 -31
  340. package/dist/utils/fileLogger.js.map +1 -1
  341. package/dist/utils/format.d.ts +7 -1
  342. package/dist/utils/format.js +22 -2
  343. package/dist/utils/format.js.map +1 -1
  344. package/dist/utils/html.js +1 -3
  345. package/dist/utils/html.js.map +1 -1
  346. package/dist/utils/index.d.ts +21 -20
  347. package/dist/utils/index.js +1 -0
  348. package/dist/utils/index.js.map +1 -1
  349. package/dist/utils/logger.js +31 -45
  350. package/dist/utils/logger.js.map +1 -1
  351. package/dist/utils/m3u.d.ts +18 -3
  352. package/dist/utils/m3u.js +28 -14
  353. package/dist/utils/m3u.js.map +1 -1
  354. package/dist/utils/memo.d.ts +19 -0
  355. package/dist/utils/memo.js +53 -0
  356. package/dist/utils/memo.js.map +1 -0
  357. package/dist/utils/morganStream.js +4 -4
  358. package/dist/utils/morganStream.js.map +1 -1
  359. package/dist/utils/pid.d.ts +2 -2
  360. package/dist/utils/pid.js +2 -2
  361. package/dist/utils/platform.d.ts +1 -1
  362. package/dist/utils/platform.js +3 -2
  363. package/dist/utils/platform.js.map +1 -1
  364. package/dist/utils/retry.d.ts +2 -0
  365. package/dist/utils/retry.js +9 -7
  366. package/dist/utils/retry.js.map +1 -1
  367. package/dist/utils/sanitize.d.ts +2 -2
  368. package/dist/utils/sanitize.js +4 -4
  369. package/dist/utils/streamContext.d.ts +7 -0
  370. package/dist/utils/streamContext.js +10 -1
  371. package/dist/utils/streamContext.js.map +1 -1
  372. package/dist/utils/timing.d.ts +6 -3
  373. package/dist/utils/timing.js +10 -6
  374. package/dist/utils/timing.js.map +1 -1
  375. package/dist/utils/version.d.ts +3 -2
  376. package/dist/utils/version.js +15 -28
  377. package/dist/utils/version.js.map +1 -1
  378. package/package.json +14 -10
  379. package/dist/config/providerPacks.d.ts +0 -46
  380. package/dist/config/providerPacks.js.map +0 -1
  381. package/dist/config/providers.d.ts +0 -175
  382. package/dist/config/providers.js +0 -691
  383. package/dist/config/providers.js.map +0 -1
  384. package/dist/native/intercept.d.ts +0 -35
  385. package/dist/native/intercept.js +0 -184
  386. package/dist/native/intercept.js.map +0 -1
  387. package/dist/routes/config/channels/routes.js +0 -1477
  388. package/dist/routes/config/channels/routes.js.map +0 -1
  389. package/dist/routes/config/providers.js.map +0 -1
  390. package/dist/routes/providers.d.ts +0 -6
  391. package/dist/routes/providers.js.map +0 -1
  392. /package/dist/routes/config/{providers.d.ts → services.d.ts} +0 -0
package/README.md CHANGED
@@ -23,18 +23,18 @@ The name PrismCast reflects what the project does: like a prism transforming lig
23
23
  ## Features
24
24
 
25
25
  ### Channels and Streaming
26
- - **8 builtin providers** - Hulu, YouTube TV, Sling TV, Fox, HBO Max, DirecTV Stream, Spectrum TV, and Xfinity Stream with hundreds of preconfigured channels ready to stream. Just authenticate with your TV provider and you're ready to go.
27
- - **Native HLS streaming** - For TV Everywhere sites that deliver non-DRMed streams, PrismCast automatically bypasses screen capture and consumes the stream directly — delivering full provider quality with significantly lower CPU usage. This is especially valuable for Hulu + Live TV subscribers who can use their TVE credentials to stream channels like A&E, Food Network, HGTV, History, Discovery, and many more at native quality through those networks' own sites. Also works with Fox One, Fox Sports, BET, C-SPAN, VH1, and others. DRM-protected providers automatically fall back to screen capture.
28
- - **User-defined provider profiles** - Add support for any streaming site without waiting for a builtin update. A step-by-step builder wizard guides you through profile creation, and shareable provider packs let you export and import complete provider setups.
26
+ - **8 builtin services** - Hulu, YouTube TV, Sling TV, Fox, HBO Max, DirecTV Stream, Spectrum TV, and Xfinity Stream with hundreds of preconfigured channels ready to stream. Just authenticate with your TV provider and you're ready to go.
27
+ - **Native HLS streaming** - For TV Everywhere sites that deliver non-DRMed streams, PrismCast automatically bypasses screen capture and consumes the stream directly — delivering full service quality with significantly lower CPU usage. This is especially valuable for Hulu + Live TV subscribers who can use their TVE credentials to stream channels like A&E, Food Network, HGTV, History, Discovery, and many more at native quality through those networks' own sites. Also works with Fox One, Fox Sports, BET, C-SPAN, VH1, and others. DRM-protected services automatically fall back to screen capture.
28
+ - **User-defined service profiles** - Add support for any streaming site without waiting for a builtin update. A step-by-step builder wizard guides you through profile creation, and shareable service packs let you export and import complete service setups.
29
29
  - **Custom channel support** - Easily add your own streaming sources through the web interface, from YouTube live streams to niche international channels. If a site plays video in Chrome, there's a good chance PrismCast can capture it.
30
30
  - **Plex integration** - Builtin HDHomeRun emulation lets Plex discover PrismCast as a network tuner. Add it as a DVR source in Plex for live TV and recording.
31
31
  - **Multiple concurrent streams** - Stream up to 10 channels simultaneously (configurable), perfect for recording multiple shows at once.
32
32
  - **Session persistence** - Log in to your TV provider once and Chrome remembers your session across restarts.
33
- - **Quality presets** - Choose from 480p to 1080p presets that set the Chrome viewport dimensions. These presets influence the resolution that providers deliver, though Chrome and the provider ultimately determine the actual stream quality.
33
+ - **Quality presets** - Choose from 480p to 1080p presets that set the Chrome viewport dimensions. These presets influence the resolution that services deliver, though Chrome and the service ultimately determine the actual stream quality.
34
34
 
35
35
  ### Web Interface
36
36
  - **Real-time dashboard** - Monitor all active streams with live health status, duration, memory usage, and (when recording via Channels DVR) the name of the show being recorded.
37
- - **Channel health indicators** - Green/red status dots and provider authentication badges show at-a-glance which channels are working and which providers are logged in.
37
+ - **Channel health indicators** - Green/red status dots and authentication badges show at-a-glance which channels are working and which services are logged in.
38
38
  - **Channel management** - Add, edit, and delete custom channels directly in the browser. No config files to edit.
39
39
  - **Live log viewer** - Stream server logs in real-time with level filtering, perfect for troubleshooting.
40
40
  - **Configuration UI** - Adjust all settings through an intuitive web interface with instant validation.
@@ -175,7 +175,7 @@ PrismCast includes builtin HDHomeRun emulation, allowing Plex to discover it as
175
175
  PrismCast includes a web-based configuration interface at `http://localhost:5589`. From there you can:
176
176
 
177
177
  - **Manage channels** - View all available channels, add your own custom channels, or override the defaults
178
- - **Filter providers** - Choose which streaming services are active in your environment and filter channels accordingly
178
+ - **Filter services** - Choose which streaming services are active in your environment and filter channels accordingly
179
179
  - **Adjust quality settings** - Choose from presets like 720p or 1080p
180
180
  - **Configure HLS parameters** - Segment duration, buffer size, idle timeout
181
181
  - **Configure HDHomeRun** - Enable or disable Plex integration, set the HDHR port and device name
package/dist/app.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ParsedArgs } from "./index.js";
1
+ import type { ParsedArgs } from "./index.ts";
2
2
  /**
3
3
  * Removes the server PID file if this process owns it. Called during graceful shutdown and from the process exit handler as a fallback. The ownership check
4
4
  * prevents a rejected duplicate instance from deleting the running instance's PID file during its exit handler.
package/dist/app.js CHANGED
@@ -3,9 +3,10 @@
3
3
  * app.ts: Express application builder for PrismCast.
4
4
  */
5
5
  import { CONFIG, displayConfiguration, initializeConfiguration, validateConfiguration } from "./config/index.js";
6
- import { LOG, clearPidFile, createMorganStream, formatError, getCurrentPattern, getPackageVersion, isDebugLogging, isProcessRunning, readPidFile, resolveFFmpegPath, setConsoleLogging, startUpdateChecking, stopUpdateChecking, writePidFile } from "./utils/index.js";
6
+ import { LOG, clearPidFile, createMorganStream, formatError, formatTimestamp, getCurrentPattern, getPackageVersion, isDebugLogging, isProcessRunning, readPidFile, resolveFFmpegPath, setConsoleLogging, startUpdateChecking, stopUpdateChecking, writePidFile } from "./utils/index.js";
7
7
  import { closeBrowser, ensureDataDirectory, getCurrentBrowser, killStaleChrome, minimizeBrowserWindow, prepareExtension, setGracefulShutdown, startBrowserRestartChecking, startStalePageCleanup, stopBrowserRestartChecking, stopStalePageCleanup } from "./browser/index.js";
8
- import { getLogFilePath, getServerPidFilePath } from "./config/paths.js";
8
+ import { ensureAllMigrated, snapshotAllForRelease } from "./config/persistence.js";
9
+ import { getDebugEnv, getLogFilePath, getServerPidFilePath } from "./config/paths.js";
9
10
  import { initializeFileLogger, shutdownFileLogger } from "./utils/fileLogger.js";
10
11
  import { loadResumeState, saveResumeState } from "./streaming/hlsResume.js";
11
12
  import { startHdhrServer, stopHdhrServer } from "./hdhr/index.js";
@@ -13,7 +14,6 @@ import { startPretunePolling, stopPretunePolling } from "./streaming/pretune.js"
13
14
  import { startShowInfoPolling, stopShowInfoPolling } from "./streaming/showInfo.js";
14
15
  import { cleanupIdleStreams } from "./streaming/hls.js";
15
16
  import compression from "compression";
16
- import consoleStamp from "console-stamp";
17
17
  import express from "express";
18
18
  import { generatePreroll } from "./streaming/preroll.js";
19
19
  import { getAllStreams } from "./streaming/registry.js";
@@ -21,12 +21,14 @@ import { initializeUserChannels } from "./config/userChannels.js";
21
21
  import { initializeUserProfiles } from "./config/userProfiles.js";
22
22
  import { loadHealthState } from "./config/health.js";
23
23
  import morgan from "morgan";
24
+ import { runConsistencyProbeAtStartup } from "./config/consistencyProbe.js";
24
25
  import { setupRoutes } from "./routes/index.js";
25
26
  import { terminateStream } from "./streaming/lifecycle.js";
26
27
  import { validateProfiles } from "./config/profiles.js";
27
28
  import { verifyCaptureSystem } from "./streaming/setup.js";
28
- /* The logging mode is set at startup based on the --console CLI flag. When console logging is enabled, timestamps are added via console-stamp and output goes to
29
- * stdout/stderr. When file logging is used (the default), output goes to the configured log file (default: prismcast.log in the data directory).
29
+ /* The logging mode is set at startup based on the --console CLI flag. When console logging is enabled, the four standard console methods are wrapped to prepend a
30
+ * formatTimestamp() prefix so console output matches the file logger's timestamp format. When file logging is used (the default), output goes to the configured
31
+ * log file (default: prismcast.log in the data directory).
30
32
  */
31
33
  // Track whether console logging is enabled, set during startServer().
32
34
  let usingConsoleLogging = false;
@@ -244,12 +246,12 @@ async function buildApp() {
244
246
  });
245
247
  return app;
246
248
  }
247
- /* PrismCast instance guard. Only one server instance should run at a time a second instance would launch a competing Chrome process, bind to the same port, and
249
+ /* PrismCast instance guard. Only one server instance should run at a time - a second instance would launch a competing Chrome process, bind to the same port, and
248
250
  * corrupt shared state. The guard uses a PID file written immediately after the instance check passes, before Chrome launches or the port binds. On the next
249
251
  * startup, we check whether the stored PID is still alive and exit early if so. Stale PID files (from crashes or container restarts) are handled gracefully via
250
252
  * isProcessRunning(), and the exit handler removes the file if startup fails.
251
253
  *
252
- * The ownsServerPid flag tracks whether this process has written the PID file. Without it, the exit handler would unconditionally remove the file including when
254
+ * The ownsServerPid flag tracks whether this process has written the PID file. Without it, the exit handler would unconditionally remove the file - including when
253
255
  * a duplicate instance is rejected by the guard. That would delete the legitimately running instance's PID file, allowing a third instance to bypass the check.
254
256
  */
255
257
  // Tracks whether this process owns the server PID file. Set to true by saveServerPid(), checked by clearServerPid() to avoid removing another instance's file.
@@ -297,9 +299,20 @@ export async function startServer(parsedArgs) {
297
299
  // Set logging mode early before any log calls.
298
300
  usingConsoleLogging = parsedArgs.consoleLogging;
299
301
  setConsoleLogging(parsedArgs.consoleLogging);
300
- // Apply console-stamp for timestamps only when using console logging.
302
+ // Apply timestamps to console output only when using console logging. Wraps the four standard console methods so each call prepends a timestamp matching the
303
+ // file logger's format, ensuring console output and prismcast.log share identical timestamps. The wrappers are installed once at startup and affect every log
304
+ // call from anywhere in the process - ours, Node's internal warnings, third-party library output - without distributing the responsibility across hundreds of
305
+ // call sites. The no-console suppressions are intentional: the entire purpose of this block is to replace console's standard methods with timestamped wrappers.
301
306
  if (parsedArgs.consoleLogging) {
302
- consoleStamp(console, { format: ":date(yyyy/mm/dd HH:MM:ss.l)" });
307
+ const methods = ["log", "info", "warn", "error"];
308
+ for (const method of methods) {
309
+ // eslint-disable-next-line no-console
310
+ const original = console[method].bind(console);
311
+ // eslint-disable-next-line no-console
312
+ console[method] = (...args) => {
313
+ original("[" + formatTimestamp() + "]", ...args);
314
+ };
315
+ }
303
316
  }
304
317
  // Build CLI overrides from parsed arguments. These have the highest priority in the merge order (CLI > env > config.json > defaults).
305
318
  const cliOverrideMap = [
@@ -313,6 +326,18 @@ export async function startServer(parsedArgs) {
313
326
  cliOverrides[configPath] = parsedArgs[argKey];
314
327
  }
315
328
  }
329
+ // Release boot coordinator: snapshot every persistence-managed file before any reads or migrations run, then apply any pending schema migrations across all
330
+ // stores. Both operations are idempotent within a release (snapshots skip when the labeled copy already exists; ensureMigrated skips when the file is at the
331
+ // current schema version). Running them up front guarantees a guaranteed restore point exists for every file at the start of every release boot, even if a
332
+ // subsequent initialize* function or migration discovers a problem and aborts startup.
333
+ try {
334
+ await snapshotAllForRelease("pre-v" + getPackageVersion());
335
+ await ensureAllMigrated();
336
+ }
337
+ catch (error) {
338
+ LOG.error("Failed during release boot coordinator: %s", formatError(error));
339
+ process.exit(1);
340
+ }
316
341
  // Initialize configuration from file and environment variables, then validate. CLI overrides are applied as the highest-priority merge pass. User profiles are
317
342
  // loaded after configuration validation but before profile validation, so that user-defined profiles and domain mappings are available for the validation pass.
318
343
  try {
@@ -329,7 +354,7 @@ export async function startServer(parsedArgs) {
329
354
  // Ensure the data directory exists before any operations that depend on it.
330
355
  await ensureDataDirectory();
331
356
  // Check for an already-running instance before launching Chrome or binding the port. This must come after ensureDataDirectory() since the PID file lives there.
332
- // We write the PID immediately after the check passes to close the race window without this, a second instance launched during Chrome startup or port binding
357
+ // We write the PID immediately after the check passes to close the race window - without this, a second instance launched during Chrome startup or port binding
333
358
  // could pass the same check. If startup subsequently fails, the exit handler calls clearServerPid() to remove the stale file.
334
359
  checkForRunningInstance();
335
360
  saveServerPid();
@@ -342,7 +367,7 @@ export async function startServer(parsedArgs) {
342
367
  displayConfiguration();
343
368
  // Log the debug filter status after the file logger is ready so the message is captured.
344
369
  if (isDebugLogging()) {
345
- const debugEnv = process.env.PRISMCAST_DEBUG;
370
+ const debugEnv = getDebugEnv();
346
371
  if (debugEnv) {
347
372
  LOG.info("Debug logging enabled with filter: %s (from PRISMCAST_DEBUG).", debugEnv);
348
373
  }
@@ -365,8 +390,11 @@ export async function startServer(parsedArgs) {
365
390
  }
366
391
  // Load user channels from channels.json in the data directory if it exists.
367
392
  await initializeUserChannels();
368
- // Load persisted health state (channel health + provider auth) from health.json.
393
+ // Load persisted health state (channel health + domain auth) from health.json.
369
394
  await loadHealthState();
395
+ // Run the cross-store consistency probe now that every store is loaded. Validates foreign-key-style invariants spanning multiple stores (service selections,
396
+ // variant canonicalKey targets, domain profile mappings, service tag filter) and auto-fixes warnings where safe. Errors do not block startup.
397
+ await runConsistencyProbeAtStartup();
370
398
  // Load HLS resume state from the previous shutdown. This seeds sequence numbers so streams resume forward instead of resetting to 0.
371
399
  loadResumeState();
372
400
  killStaleChrome();
@@ -379,7 +407,7 @@ export async function startServer(parsedArgs) {
379
407
  throw error;
380
408
  }
381
409
  // Generate the preroll fMP4 segment for immediate HLS response during stream startup. This runs after browser launch so that display detection has completed and
382
- // getEffectiveViewport() returns the true dimensions ensuring the preroll resolution matches what Chrome MediaRecorder will actually produce.
410
+ // getEffectiveViewport() returns the true dimensions - ensuring the preroll resolution matches what Chrome MediaRecorder will actually produce.
383
411
  await generatePreroll();
384
412
  // Verify the capture system works before accepting requests. This detects stale tabCapture state from a previous Chrome process and exits immediately if
385
413
  // found, since the puppeteer-stream mutex would be permanently leaked. The probe also ensures the STOP_RECORDING cleanup chain completes before returning.
package/dist/app.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA;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BAAmB,EAAE,CAAC;IAEtB,8BAA8B;IAC9B,mBAAmB,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAEzC,uCAAuC;IACvC,IAAI,CAAC;QAEH,MAAM,GAAG,GAAG,MAAM,QAAQ,EAAE,CAAC;QAE7B,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAS,EAAE;YAErE,GAAG,CAAC,IAAI,CAAC,sCAAsC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3F,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAM,KAAK,EAAE,CAAC;QAEd,GAAG,CAAC,KAAK,CAAC,kCAAkC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;QAElE,MAAM,KAAK,CAAC;IACd,CAAC;IAED,0JAA0J;IAC1J,yBAAyB;IACzB,MAAM,eAAe,EAAE,CAAC;AAC1B,CAAC"}
@@ -14,8 +14,8 @@ import type { CDPSession, Page } from "puppeteer-core";
14
14
  */
15
15
  export declare function withCDPSession<T>(page: Page, operation: (session: CDPSession, windowId: number) => Promise<T>): Promise<T | undefined>;
16
16
  /**
17
- * Resizes the browser window to match our target viewport dimensions and optionally minimizes it. This function solves the problem of ensuring the video content
18
- * area exactly matches our configured viewport size.
17
+ * Resizes the browser window to match our target viewport dimensions and minimizes it. This function solves the problem of ensuring the video content area
18
+ * exactly matches our configured viewport size.
19
19
  *
20
20
  * The complication is that browser windows have "chrome" - the title bar, toolbar, borders, and other UI elements that take up space. If we set the window size
21
21
  * to 1280x720, the actual content area will be smaller (perhaps 1280x670 after accounting for the toolbar). To get a 1280x720 content area, we need to add the
@@ -25,12 +25,10 @@ export declare function withCDPSession<T>(page: Page, operation: (session: CDPSe
25
25
  * 1. Measures the current chrome dimensions by comparing window.outerWidth/Height to window.innerWidth/Height
26
26
  * 2. Sets the window size to viewport + chrome dimensions, giving us the exact viewport size we want
27
27
  * 3. Verifies the resize took effect by reading back the window bounds, retrying if dimensions don't match
28
- * 4. Optionally minimizes the window to reduce GPU usage while still allowing capture
28
+ * 4. Minimizes the window to reduce GPU usage while still allowing capture
29
29
  * @param page - The Puppeteer page object.
30
- * @param shouldMinimize - Whether to minimize the window after resizing. Set to true for stream pages (to reduce GPU usage) and false for debug pages (where
31
- * visibility is desired).
32
30
  */
33
- export declare function resizeAndMinimizeWindow(page: Page, shouldMinimize: boolean): Promise<void>;
31
+ export declare function resizeAndMinimizeWindow(page: Page): Promise<void>;
34
32
  /**
35
33
  * Un-minimizes the browser window, restoring it to normal state. This is used when the user needs to interact with the browser, such as during the authentication
36
34
  * login flow where the user must complete TV provider authentication in the visible browser window.
@@ -1,4 +1,4 @@
1
- import { LOG, evaluateWithAbort, formatError } from "../utils/index.js";
1
+ import { LOG, delay, evaluateWithAbort, formatError } from "../utils/index.js";
2
2
  import { CONFIG } from "../config/index.js";
3
3
  import { getBrowserChrome } from "./display.js";
4
4
  import { getEffectiveViewport } from "../config/presets.js";
@@ -61,8 +61,8 @@ export async function withCDPSession(page, operation) {
61
61
  }
62
62
  }
63
63
  /**
64
- * Resizes the browser window to match our target viewport dimensions and optionally minimizes it. This function solves the problem of ensuring the video content
65
- * area exactly matches our configured viewport size.
64
+ * Resizes the browser window to match our target viewport dimensions and minimizes it. This function solves the problem of ensuring the video content area
65
+ * exactly matches our configured viewport size.
66
66
  *
67
67
  * The complication is that browser windows have "chrome" - the title bar, toolbar, borders, and other UI elements that take up space. If we set the window size
68
68
  * to 1280x720, the actual content area will be smaller (perhaps 1280x670 after accounting for the toolbar). To get a 1280x720 content area, we need to add the
@@ -72,12 +72,10 @@ export async function withCDPSession(page, operation) {
72
72
  * 1. Measures the current chrome dimensions by comparing window.outerWidth/Height to window.innerWidth/Height
73
73
  * 2. Sets the window size to viewport + chrome dimensions, giving us the exact viewport size we want
74
74
  * 3. Verifies the resize took effect by reading back the window bounds, retrying if dimensions don't match
75
- * 4. Optionally minimizes the window to reduce GPU usage while still allowing capture
75
+ * 4. Minimizes the window to reduce GPU usage while still allowing capture
76
76
  * @param page - The Puppeteer page object.
77
- * @param shouldMinimize - Whether to minimize the window after resizing. Set to true for stream pages (to reduce GPU usage) and false for debug pages (where
78
- * visibility is desired).
79
77
  */
80
- export async function resizeAndMinimizeWindow(page, shouldMinimize) {
78
+ export async function resizeAndMinimizeWindow(page) {
81
79
  // Early exit if the page is already closed.
82
80
  if (page.isClosed()) {
83
81
  return;
@@ -103,14 +101,14 @@ export async function resizeAndMinimizeWindow(page, shouldMinimize) {
103
101
  }
104
102
  }
105
103
  // Use CDP to set the window bounds with verification. We add the chrome dimensions to our target viewport to get the correct total window size. The resize is
106
- // verified by reading back the window bounds after setting them if the dimensions don't match (e.g., Chrome was still transitioning from maximized to normal
104
+ // verified by reading back the window bounds after setting them - if the dimensions don't match (e.g., Chrome was still transitioning from maximized to normal
107
105
  // state), we retry after a brief delay. CDP requires separate calls for dimensions and window state.
108
106
  await withCDPSession(page, async (session, windowId) => {
109
107
  const viewport = getEffectiveViewport(CONFIG);
110
108
  const targetHeight = viewport.height + uiSize.height;
111
109
  const targetWidth = viewport.width + uiSize.width;
112
110
  // Resize with verification. Each attempt restores the window to "normal" state (idempotent) and sets the target dimensions, then reads back the actual
113
- // bounds to confirm. On macOS, NSWindow state transitions are asynchronous Chrome may acknowledge the "normal" state CDP command before the OS window
111
+ // bounds to confirm. On macOS, NSWindow state transitions are asynchronous - Chrome may acknowledge the "normal" state CDP command before the OS window
114
112
  // manager finishes the transition, causing a subsequent dimension-setting call to be silently ignored. The readback detects this and retries.
115
113
  for (let attempt = 0; attempt < 3; attempt++) {
116
114
  // Ensure the window is in "normal" state. Setting bounds on a maximized window is ignored, so we must restore it first. On retries, this re-sends the
@@ -132,27 +130,25 @@ export async function resizeAndMinimizeWindow(page, shouldMinimize) {
132
130
  if ((result.bounds.height === targetHeight) && (result.bounds.width === targetWidth)) {
133
131
  break;
134
132
  }
135
- // Dimensions didn't match the window manager may still be processing the state transition. Wait briefly before retrying.
133
+ // Dimensions didn't match - the window manager may still be processing the state transition. Wait briefly before retrying.
136
134
  if (attempt < 2) {
137
135
  LOG.debug("browser:lifecycle", "Window resize verification failed (attempt %s): expected %s\u00d7%s, got %s\u00d7%s. Retrying.", attempt + 1, targetWidth, targetHeight, result.bounds.width ?? 0, result.bounds.height ?? 0);
138
136
  // eslint-disable-next-line no-await-in-loop
139
- await new Promise((resolve) => setTimeout(resolve, 100));
137
+ await delay(100);
140
138
  }
141
139
  else {
142
140
  LOG.warn("Window resize failed after %s attempts: expected %s\u00d7%s, got %s\u00d7%s.", attempt + 1, targetWidth, targetHeight, result.bounds.width ?? 0, result.bounds.height ?? 0);
143
141
  }
144
142
  }
145
- // Optionally minimize the window to reduce GPU usage. This must be a separate CDP call because window state cannot be combined with dimensions. Minimizing
146
- // doesn't stop video capture the puppeteer-stream extension captures from the compositor rather than the visible display.
147
- if (shouldMinimize) {
148
- // Brief delay to allow Chrome's window manager to finish processing the resize before minimizing. Without this delay, the minimize can be ignored when
149
- // the window is being significantly resized (e.g., during preset degradation from 1080p to 720p).
150
- await new Promise((resolve) => setTimeout(resolve, 100));
151
- await session.send("Browser.setWindowBounds", {
152
- bounds: { windowState: "minimized" },
153
- windowId
154
- });
155
- }
143
+ // Minimize the window to reduce GPU usage. This must be a separate CDP call because window state cannot be combined with dimensions. Minimizing doesn't stop
144
+ // video capture - the puppeteer-stream extension captures from the compositor rather than the visible display.
145
+ // Brief delay to allow Chrome's window manager to finish processing the resize before minimizing. Without this delay, the minimize can be ignored when
146
+ // the window is being significantly resized (e.g., during preset degradation from 1080p to 720p).
147
+ await delay(100);
148
+ await session.send("Browser.setWindowBounds", {
149
+ bounds: { windowState: "minimized" },
150
+ windowId
151
+ });
156
152
  });
157
153
  }
158
154
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"cdp.js","sourceRoot":"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E,EAAE,CAAC;QAEnB,OAAO;IACT,CAAC;IAED,MAAM,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE;QAErD,gDAAgD;QAChD,MAAM,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE;YAE5C,MAAM,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE;YACjC,QAAQ;SACT,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ChannelSelectorResult, Nullable, ProviderModule, ResolvedSiteProfile } from "../types/index.js";
1
+ import type { ChannelSelectorResult, Nullable, ProviderModule, ResolvedSiteProfile } from "../types/index.ts";
2
2
  import type { Page } from "puppeteer-core";
3
3
  /**
4
4
  * Returns a direct watch URL for the channel specified in the profile, if one can be resolved. Looks up the strategy entry's resolveDirectUrl hook and calls it
@@ -25,6 +25,14 @@ export declare function clearChannelSelectionCaches(): void;
25
25
  * @returns The matching provider module or undefined.
26
26
  */
27
27
  export declare function getProviderBySlug(slug: string): ProviderModule | undefined;
28
+ /**
29
+ * Looks up a provider module by its channel-selection strategy name. Used by code paths that have a resolved profile (and therefore the strategy name) but not
30
+ * a slug. Returns undefined when no provider registers the given strategy or when the strategy is one of the generic non-provider strategies (thumbnailRow,
31
+ * tileClick, etc.).
32
+ * @param strategyName - The ChannelSelectionStrategy value (e.g., "foxGrid", "huluLive", "slingLive").
33
+ * @returns The matching provider module or undefined.
34
+ */
35
+ export declare function getProviderByStrategy(strategyName: string): ProviderModule | undefined;
28
36
  /**
29
37
  * Returns all registered provider module slugs. Used for validation in the checkboxList setting for precache providers.
30
38
  * @returns Array of provider slugs.
@@ -33,7 +41,7 @@ export declare function getProviderSlugs(): string[];
33
41
  /**
34
42
  * Returns slug, label, domain, and optional icon URL for all registered provider modules. Used by the checkboxList setting for precache labels and by the
35
43
  * browse modal for provider picker cards with icons. The domain is extracted from the guide URL. The icon URL is derived from the provider's DOMAIN_CONFIG
36
- * entry the single source of truth for provider icon URLs.
44
+ * entry - the single source of truth for provider icon URLs.
37
45
  * @returns Array of objects with domain, iconUrl, label, noDirectTuneOptimization, and slug properties.
38
46
  */
39
47
  export declare function getProviderModuleInfo(): {
@@ -68,19 +76,41 @@ export declare function getCachedProviderChannels(): {
68
76
  }[];
69
77
  hostname: string;
70
78
  }[];
71
- export { logAvailableChannels, normalizeChannelName, resolveMatchSelector, scrollAndClick } from "./tuning/shared.js";
79
+ export { logAvailableChannels, normalizeChannelName, resolveMatchSelector, scrollAndClick } from "./tuning/shared.ts";
80
+ /**
81
+ * Options that callers may supply to selectChannel(). All fields are optional; omitting them preserves the historical no-op call signature.
82
+ */
83
+ export interface SelectChannelOptions {
84
+ /**
85
+ * Callback invoked when the resolution layer converts a category selector to a concrete per-user channel identifier. The framework calls this with the resolved
86
+ * call sign so the caller can persist the value to the user's channel store. After persistence, subsequent tunes start with the concrete selector and skip the
87
+ * resolution path entirely.
88
+ *
89
+ * Construction of this callback happens in the streaming setup layer where the active channel key and service tag are in scope. selectChannel deliberately does
90
+ * not know about the user channel store; it only invokes the callback the caller supplies. Errors thrown from the callback do not abort the tune - the resolved
91
+ * selector still flows into the strategy and verifier for the current attempt; only persistence to disk is lost.
92
+ *
93
+ * Null/undefined means "do not persist." The resolution still happens and the resolved selector is used for this tune; it just isn't saved. Useful for ad-hoc
94
+ * tunes (no associated channel record) and for testing.
95
+ */
96
+ persistResolution?: (resolvedSelector: string) => Promise<void>;
97
+ }
72
98
  /**
73
99
  * Selects a channel from a multi-channel player UI using the strategy specified in the profile. This is the main entry point for channel selection, called by
74
- * tuneToChannel() after page navigation.
100
+ * initializePlayback() after page navigation.
75
101
  *
76
- * The function handles:
77
- * - Pre-selection scroll phase to force lazy-loaded content into the DOM (when scrollToBottom or scrollSelector+scrollTarget is set)
78
- * - Polling for channel element readiness before strategy dispatch (when profile.channelSelection.matchSelector is set)
79
- * - Strategy dispatch based on profile.channelSelection.strategy
80
- * - No-op for single-channel sites (strategy "none" or no channelSelector)
81
- * - Logging of selection attempts and results
102
+ * The function handles, in order:
103
+ * - No-op short-circuit for single-channel sites (strategy "none" or no channelSelector).
104
+ * - Category resolution: when the active provider declares categorySelectors and the profile's selector matches, resolveCategorySelector() is invoked to convert
105
+ * the category to a concrete per-user identifier. The resolved value replaces profile.channelSelector for the rest of the call and is persisted via the
106
+ * options.persistResolution callback if supplied. Resolution failures fall through with the original category selector - the strategy attempts a best-effort
107
+ * match and the verifier fails open.
108
+ * - Pre-selection scroll phase to force lazy-loaded content into the DOM (when scrollToBottom or scrollSelector+scrollTarget is set).
109
+ * - Polling for channel element readiness before strategy dispatch (when profile.channelSelection.matchSelector is set).
110
+ * - Strategy dispatch based on profile.channelSelection.strategy.
82
111
  * @param page - The Puppeteer page object.
83
112
  * @param profile - The resolved site profile containing channelSelection config and channelSelector slug.
113
+ * @param options - Optional callbacks for the resolution layer. Currently the only field is persistResolution.
84
114
  * @returns Result object with success status and optional failure reason.
85
115
  */
86
- export declare function selectChannel(page: Page, profile: ResolvedSiteProfile): Promise<ChannelSelectorResult>;
116
+ export declare function selectChannel(page: Page, profile: ResolvedSiteProfile, options?: SelectChannelOptions): Promise<ChannelSelectorResult>;