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.
- package/README.md +6 -6
- package/dist/app.d.ts +1 -1
- package/dist/app.js +41 -13
- package/dist/app.js.map +1 -1
- package/dist/browser/cdp.d.ts +4 -6
- package/dist/browser/cdp.js +18 -22
- package/dist/browser/cdp.js.map +1 -1
- package/dist/browser/channelSelection.d.ts +41 -11
- package/dist/browser/channelSelection.js +75 -24
- package/dist/browser/channelSelection.js.map +1 -1
- package/dist/browser/display.d.ts +1 -1
- package/dist/browser/index.d.ts +8 -8
- package/dist/browser/index.js +44 -45
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/login.d.ts +2 -2
- package/dist/browser/login.js +1 -1
- package/dist/browser/manifestInterceptor.d.ts +77 -0
- package/dist/browser/manifestInterceptor.js +323 -0
- package/dist/browser/manifestInterceptor.js.map +1 -0
- package/dist/browser/precaching.d.ts +1 -1
- package/dist/browser/precaching.js +23 -23
- package/dist/browser/precaching.js.map +1 -1
- package/dist/browser/tuning/comcastPolymer.d.ts +1 -1
- package/dist/browser/tuning/cox.d.ts +1 -1
- package/dist/browser/tuning/directv.d.ts +1 -1
- package/dist/browser/tuning/directv.js +65 -69
- package/dist/browser/tuning/directv.js.map +1 -1
- package/dist/browser/tuning/fox.d.ts +1 -1
- package/dist/browser/tuning/fox.js +172 -15
- package/dist/browser/tuning/fox.js.map +1 -1
- package/dist/browser/tuning/hbo.d.ts +1 -1
- package/dist/browser/tuning/hbo.js +7 -7
- package/dist/browser/tuning/hbo.js.map +1 -1
- package/dist/browser/tuning/hulu.d.ts +1 -1
- package/dist/browser/tuning/hulu.js +120 -113
- package/dist/browser/tuning/hulu.js.map +1 -1
- package/dist/browser/tuning/shared.d.ts +3 -3
- package/dist/browser/tuning/shared.js +5 -5
- package/dist/browser/tuning/sling.d.ts +1 -1
- package/dist/browser/tuning/sling.js +30 -30
- package/dist/browser/tuning/sling.js.map +1 -1
- package/dist/browser/tuning/spectrum.d.ts +1 -1
- package/dist/browser/tuning/spectrum.js +21 -22
- package/dist/browser/tuning/spectrum.js.map +1 -1
- package/dist/browser/tuning/thumbnailRow.d.ts +1 -1
- package/dist/browser/tuning/thumbnailRow.js +1 -1
- package/dist/browser/tuning/tileClick.d.ts +1 -1
- package/dist/browser/tuning/tileClick.js +5 -5
- package/dist/browser/tuning/xfinity.d.ts +1 -1
- package/dist/browser/tuning/youtubeTv.d.ts +1 -1
- package/dist/browser/tuning/youtubeTv.js +17 -18
- package/dist/browser/tuning/youtubeTv.js.map +1 -1
- package/dist/browser/video.d.ts +20 -6
- package/dist/browser/video.js +30 -38
- package/dist/browser/video.js.map +1 -1
- package/dist/channels/index.d.ts +1 -2
- package/dist/channels/index.js +475 -442
- package/dist/channels/index.js.map +1 -1
- package/dist/config/channelForm.d.ts +58 -0
- package/dist/config/channelForm.js +129 -0
- package/dist/config/channelForm.js.map +1 -0
- package/dist/config/consistencyProbe.d.ts +7 -0
- package/dist/config/consistencyProbe.js +143 -0
- package/dist/config/consistencyProbe.js.map +1 -0
- package/dist/config/health.d.ts +7 -6
- package/dist/config/health.js +78 -65
- package/dist/config/health.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +21 -14
- package/dist/config/index.js.map +1 -1
- package/dist/config/paths.d.ts +9 -3
- package/dist/config/paths.js +12 -4
- package/dist/config/paths.js.map +1 -1
- package/dist/config/persistence.context.d.ts +8 -0
- package/dist/config/persistence.context.js +30 -0
- package/dist/config/persistence.context.js.map +1 -0
- package/dist/config/persistence.d.ts +157 -0
- package/dist/config/persistence.js +446 -0
- package/dist/config/persistence.js.map +1 -0
- package/dist/config/presets.d.ts +14 -4
- package/dist/config/presets.js +84 -75
- package/dist/config/presets.js.map +1 -1
- package/dist/config/profiles.d.ts +2 -2
- package/dist/config/profiles.js +7 -9
- package/dist/config/profiles.js.map +1 -1
- package/dist/config/servicePacks.d.ts +46 -0
- package/dist/config/{providerPacks.js → servicePacks.js} +50 -53
- package/dist/config/servicePacks.js.map +1 -0
- package/dist/config/services.d.ts +228 -0
- package/dist/config/services.js +772 -0
- package/dist/config/services.js.map +1 -0
- package/dist/config/sites.d.ts +3 -3
- package/dist/config/sites.js +75 -75
- package/dist/config/sites.js.map +1 -1
- package/dist/config/userChannels.d.ts +522 -54
- package/dist/config/userChannels.js +1343 -366
- package/dist/config/userChannels.js.map +1 -1
- package/dist/config/userConfig.d.ts +108 -13
- package/dist/config/userConfig.js +296 -143
- package/dist/config/userConfig.js.map +1 -1
- package/dist/config/userProfiles.d.ts +34 -16
- package/dist/config/userProfiles.js +189 -100
- package/dist/config/userProfiles.js.map +1 -1
- package/dist/hdhr/channelMap.d.ts +1 -1
- package/dist/hdhr/channelMap.js +10 -16
- package/dist/hdhr/channelMap.js.map +1 -1
- package/dist/hdhr/deviceId.js +10 -9
- package/dist/hdhr/deviceId.js.map +1 -1
- package/dist/hdhr/discover.js +4 -5
- package/dist/hdhr/discover.js.map +1 -1
- package/dist/hdhr/index.js +12 -19
- package/dist/hdhr/index.js.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/native/codecInference.d.ts +44 -0
- package/dist/native/codecInference.js +327 -0
- package/dist/native/codecInference.js.map +1 -0
- package/dist/native/decrypt.d.ts +1 -1
- package/dist/native/index.d.ts +5 -5
- package/dist/native/index.js +45 -67
- package/dist/native/index.js.map +1 -1
- package/dist/native/probe.d.ts +27 -9
- package/dist/native/probe.js +159 -68
- package/dist/native/probe.js.map +1 -1
- package/dist/native/proxy.d.ts +4 -2
- package/dist/native/proxy.js +56 -53
- package/dist/native/proxy.js.map +1 -1
- package/dist/native/tokenExpiry.d.ts +22 -0
- package/dist/native/tokenExpiry.js +153 -0
- package/dist/native/tokenExpiry.js.map +1 -0
- package/dist/routes/assets.js +3 -3
- package/dist/routes/assets.js.map +1 -1
- package/dist/routes/auth.js +9 -13
- package/dist/routes/auth.js.map +1 -1
- package/dist/routes/components.js +2 -2
- package/dist/routes/components.js.map +1 -1
- package/dist/routes/config/channels/endpoints/browse.d.ts +6 -0
- package/dist/routes/config/channels/endpoints/browse.js +195 -0
- package/dist/routes/config/channels/endpoints/browse.js.map +1 -0
- package/dist/routes/config/channels/endpoints/bulk.d.ts +6 -0
- package/dist/routes/config/channels/endpoints/bulk.js +128 -0
- package/dist/routes/config/channels/endpoints/bulk.js.map +1 -0
- package/dist/routes/config/channels/endpoints/crud.d.ts +6 -0
- package/dist/routes/config/channels/endpoints/crud.js +504 -0
- package/dist/routes/config/channels/endpoints/crud.js.map +1 -0
- package/dist/routes/config/channels/endpoints/importExport.d.ts +6 -0
- package/dist/routes/config/channels/endpoints/importExport.js +131 -0
- package/dist/routes/config/channels/endpoints/importExport.js.map +1 -0
- package/dist/routes/config/channels/endpoints/predefined.d.ts +6 -0
- package/dist/routes/config/channels/endpoints/predefined.js +78 -0
- package/dist/routes/config/channels/endpoints/predefined.js.map +1 -0
- package/dist/routes/config/channels/endpoints/prefs.d.ts +6 -0
- package/dist/routes/config/channels/endpoints/prefs.js +58 -0
- package/dist/routes/config/channels/endpoints/prefs.js.map +1 -0
- package/dist/routes/config/channels/endpoints/service.d.ts +6 -0
- package/dist/routes/config/channels/endpoints/service.js +149 -0
- package/dist/routes/config/channels/endpoints/service.js.map +1 -0
- package/dist/routes/config/channels/endpoints/tags.d.ts +6 -0
- package/dist/routes/config/channels/endpoints/tags.js +185 -0
- package/dist/routes/config/channels/endpoints/tags.js.map +1 -0
- package/dist/routes/config/channels/http/handler.d.ts +10 -0
- package/dist/routes/config/channels/http/handler.js +20 -0
- package/dist/routes/config/channels/http/handler.js.map +1 -0
- package/dist/routes/config/channels/http/playlistHint.d.ts +25 -0
- package/dist/routes/config/channels/http/playlistHint.js +40 -0
- package/dist/routes/config/channels/http/playlistHint.js.map +1 -0
- package/dist/routes/config/channels/http/serviceWarning.d.ts +10 -0
- package/dist/routes/config/channels/http/serviceWarning.js +28 -0
- package/dist/routes/config/channels/http/serviceWarning.js.map +1 -0
- package/dist/routes/config/channels/index.d.ts +3 -3
- package/dist/routes/config/channels/index.js +2 -2
- package/dist/routes/config/channels/index.js.map +1 -1
- package/dist/routes/config/channels/{routes.d.ts → setup.d.ts} +1 -1
- package/dist/routes/config/channels/setup.js +23 -0
- package/dist/routes/config/channels/setup.js.map +1 -0
- package/dist/routes/config/channels/table.d.ts +13 -13
- package/dist/routes/config/channels/table.js +291 -184
- package/dist/routes/config/channels/table.js.map +1 -1
- package/dist/routes/config/http/envelope.d.ts +111 -0
- package/dist/routes/config/http/envelope.js +103 -0
- package/dist/routes/config/http/envelope.js.map +1 -0
- package/dist/routes/config/index.d.ts +9 -9
- package/dist/routes/config/index.js +5 -5
- package/dist/routes/config/index.js.map +1 -1
- package/dist/routes/config/{providers.js → services.js} +105 -99
- package/dist/routes/config/services.js.map +1 -0
- package/dist/routes/config/settings.d.ts +1 -1
- package/dist/routes/config/settings.js +85 -60
- package/dist/routes/config/settings.js.map +1 -1
- package/dist/routes/debug.js +17 -18
- package/dist/routes/debug.js.map +1 -1
- package/dist/routes/health.js +1 -1
- package/dist/routes/health.js.map +1 -1
- package/dist/routes/icons.js +2 -2
- package/dist/routes/icons.js.map +1 -1
- package/dist/routes/index.js +2 -2
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/logs.js +23 -34
- package/dist/routes/logs.js.map +1 -1
- package/dist/routes/mpegts.js +1 -1
- package/dist/routes/playlist.d.ts +5 -5
- package/dist/routes/playlist.js +84 -61
- package/dist/routes/playlist.js.map +1 -1
- package/dist/routes/root/content.js +82 -61
- package/dist/routes/root/content.js.map +1 -1
- package/dist/routes/root/index.js +2 -5
- package/dist/routes/root/index.js.map +1 -1
- package/dist/routes/root/scripts/channels.js +538 -581
- package/dist/routes/root/scripts/channels.js.map +1 -1
- package/dist/routes/root/scripts/config.js +868 -1022
- package/dist/routes/root/scripts/config.js.map +1 -1
- package/dist/routes/root/scripts/index.d.ts +4 -4
- package/dist/routes/root/scripts/shared.js +445 -197
- package/dist/routes/root/scripts/shared.js.map +1 -1
- package/dist/routes/root/scripts/status.d.ts +4 -0
- package/dist/routes/root/scripts/status.handlers.d.ts +182 -0
- package/dist/routes/root/scripts/status.handlers.js +713 -0
- package/dist/routes/root/scripts/status.handlers.js.map +1 -0
- package/dist/routes/root/scripts/status.js +85 -436
- package/dist/routes/root/scripts/status.js.map +1 -1
- package/dist/routes/root/styles.js +16 -8
- package/dist/routes/root/styles.js.map +1 -1
- package/dist/routes/services.d.ts +6 -0
- package/dist/routes/{providers.js → services.js} +58 -55
- package/dist/routes/services.js.map +1 -0
- package/dist/routes/sse.d.ts +16 -0
- package/dist/routes/sse.js +29 -0
- package/dist/routes/sse.js.map +1 -0
- package/dist/routes/streams.js +10 -23
- package/dist/routes/streams.js.map +1 -1
- package/dist/routes/ui.d.ts +2 -2
- package/dist/routes/ui.js +2 -0
- package/dist/routes/ui.js.map +1 -1
- package/dist/routes/upgrade.js +6 -7
- package/dist/routes/upgrade.js.map +1 -1
- package/dist/service/commands.context.d.ts +6 -0
- package/dist/service/commands.context.js +47 -0
- package/dist/service/commands.context.js.map +1 -0
- package/dist/service/commands.d.ts +53 -8
- package/dist/service/commands.js +172 -192
- package/dist/service/commands.js.map +1 -1
- package/dist/service/generators.context.d.ts +6 -0
- package/dist/service/generators.context.js +45 -0
- package/dist/service/generators.context.js.map +1 -0
- package/dist/service/generators.d.ts +56 -16
- package/dist/service/generators.js +509 -291
- package/dist/service/generators.js.map +1 -1
- package/dist/service/index.d.ts +2 -2
- package/dist/streaming/clients.d.ts +2 -2
- package/dist/streaming/clients.js +2 -2
- package/dist/streaming/codec.d.ts +2 -2
- package/dist/streaming/codec.js +0 -1
- package/dist/streaming/codec.js.map +1 -1
- package/dist/streaming/fmp4Segmenter.d.ts +2 -2
- package/dist/streaming/fmp4Segmenter.js +12 -12
- package/dist/streaming/hls.d.ts +7 -7
- package/dist/streaming/hls.js +104 -92
- package/dist/streaming/hls.js.map +1 -1
- package/dist/streaming/hlsResume.d.ts +3 -3
- package/dist/streaming/hlsResume.js +6 -6
- package/dist/streaming/hlsResume.js.map +1 -1
- package/dist/streaming/hlsSegments.d.ts +5 -2
- package/dist/streaming/hlsSegments.js +14 -9
- package/dist/streaming/hlsSegments.js.map +1 -1
- package/dist/streaming/monitor.d.ts +12 -12
- package/dist/streaming/monitor.js +98 -66
- package/dist/streaming/monitor.js.map +1 -1
- package/dist/streaming/mp4Parser.d.ts +34 -4
- package/dist/streaming/mp4Parser.js +111 -29
- package/dist/streaming/mp4Parser.js.map +1 -1
- package/dist/streaming/mpegts.d.ts +1 -1
- package/dist/streaming/mpegts.js +13 -10
- package/dist/streaming/mpegts.js.map +1 -1
- package/dist/streaming/playlistBuilder.d.ts +1 -1
- package/dist/streaming/playlistBuilder.js +2 -2
- package/dist/streaming/preroll.d.ts +9 -9
- package/dist/streaming/preroll.js +40 -42
- package/dist/streaming/preroll.js.map +1 -1
- package/dist/streaming/pretune.js +4 -4
- package/dist/streaming/pretune.js.map +1 -1
- package/dist/streaming/recovery.d.ts +3 -3
- package/dist/streaming/recovery.js +4 -4
- package/dist/streaming/registry.d.ts +6 -6
- package/dist/streaming/registry.js +4 -8
- package/dist/streaming/registry.js.map +1 -1
- package/dist/streaming/setup.d.ts +11 -10
- package/dist/streaming/setup.js +120 -71
- package/dist/streaming/setup.js.map +1 -1
- package/dist/streaming/showInfo.d.ts +9 -3
- package/dist/streaming/showInfo.js +33 -27
- package/dist/streaming/showInfo.js.map +1 -1
- package/dist/streaming/statusEmitter.d.ts +8 -7
- package/dist/streaming/statusEmitter.js +5 -5
- package/dist/streaming/statusEmitter.js.map +1 -1
- package/dist/types/channels.d.ts +139 -36
- package/dist/types/channels.js +39 -1
- package/dist/types/channels.js.map +1 -1
- package/dist/types/config.d.ts +22 -3
- package/dist/types/index.d.ts +9 -8
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/profiles.d.ts +14 -13
- package/dist/types/selection.d.ts +49 -5
- package/dist/types/shared.d.ts +1 -1
- package/dist/types/streaming.d.ts +2 -2
- package/dist/upgrade/commands.context.d.ts +6 -0
- package/dist/upgrade/commands.context.js +29 -0
- package/dist/upgrade/commands.context.js.map +1 -0
- package/dist/upgrade/commands.d.ts +29 -2
- package/dist/upgrade/commands.js +87 -134
- package/dist/upgrade/commands.js.map +1 -1
- package/dist/upgrade/detection.context.d.ts +6 -0
- package/dist/upgrade/detection.context.js +24 -0
- package/dist/upgrade/detection.context.js.map +1 -0
- package/dist/upgrade/detection.d.ts +140 -10
- package/dist/upgrade/detection.js +153 -66
- package/dist/upgrade/detection.js.map +1 -1
- package/dist/upgrade/index.d.ts +2 -2
- package/dist/utils/chromeFetch.d.ts +1 -1
- package/dist/utils/chromeFetch.js +2 -2
- package/dist/utils/clock.d.ts +14 -0
- package/dist/utils/clock.js +28 -0
- package/dist/utils/clock.js.map +1 -0
- package/dist/utils/debugFilter.d.ts +1 -1
- package/dist/utils/debugFilter.js +8 -6
- package/dist/utils/debugFilter.js.map +1 -1
- package/dist/utils/delay.d.ts +2 -3
- package/dist/utils/delay.js +10 -16
- package/dist/utils/delay.js.map +1 -1
- package/dist/utils/evaluate.js +12 -14
- package/dist/utils/evaluate.js.map +1 -1
- package/dist/utils/ffmpeg.context.d.ts +6 -0
- package/dist/utils/ffmpeg.context.js +31 -0
- package/dist/utils/ffmpeg.context.js.map +1 -0
- package/dist/utils/ffmpeg.d.ts +85 -29
- package/dist/utils/ffmpeg.js +126 -129
- package/dist/utils/ffmpeg.js.map +1 -1
- package/dist/utils/fileLogger.d.ts +18 -2
- package/dist/utils/fileLogger.js +60 -31
- package/dist/utils/fileLogger.js.map +1 -1
- package/dist/utils/format.d.ts +7 -1
- package/dist/utils/format.js +22 -2
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/html.js +1 -3
- package/dist/utils/html.js.map +1 -1
- package/dist/utils/index.d.ts +21 -20
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/logger.js +31 -45
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/m3u.d.ts +18 -3
- package/dist/utils/m3u.js +28 -14
- package/dist/utils/m3u.js.map +1 -1
- package/dist/utils/memo.d.ts +19 -0
- package/dist/utils/memo.js +53 -0
- package/dist/utils/memo.js.map +1 -0
- package/dist/utils/morganStream.js +4 -4
- package/dist/utils/morganStream.js.map +1 -1
- package/dist/utils/pid.d.ts +2 -2
- package/dist/utils/pid.js +2 -2
- package/dist/utils/platform.d.ts +1 -1
- package/dist/utils/platform.js +3 -2
- package/dist/utils/platform.js.map +1 -1
- package/dist/utils/retry.d.ts +2 -0
- package/dist/utils/retry.js +9 -7
- package/dist/utils/retry.js.map +1 -1
- package/dist/utils/sanitize.d.ts +2 -2
- package/dist/utils/sanitize.js +4 -4
- package/dist/utils/streamContext.d.ts +7 -0
- package/dist/utils/streamContext.js +10 -1
- package/dist/utils/streamContext.js.map +1 -1
- package/dist/utils/timing.d.ts +6 -3
- package/dist/utils/timing.js +10 -6
- package/dist/utils/timing.js.map +1 -1
- package/dist/utils/version.d.ts +3 -2
- package/dist/utils/version.js +15 -28
- package/dist/utils/version.js.map +1 -1
- package/package.json +14 -10
- package/dist/config/providerPacks.d.ts +0 -46
- package/dist/config/providerPacks.js.map +0 -1
- package/dist/config/providers.d.ts +0 -175
- package/dist/config/providers.js +0 -691
- package/dist/config/providers.js.map +0 -1
- package/dist/native/intercept.d.ts +0 -35
- package/dist/native/intercept.js +0 -184
- package/dist/native/intercept.js.map +0 -1
- package/dist/routes/config/channels/routes.js +0 -1477
- package/dist/routes/config/channels/routes.js.map +0 -1
- package/dist/routes/config/providers.js.map +0 -1
- package/dist/routes/providers.d.ts +0 -6
- package/dist/routes/providers.js.map +0 -1
- /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
|
|
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
|
|
28
|
-
- **User-defined
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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 {
|
|
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,
|
|
29
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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 =
|
|
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 +
|
|
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
|
|
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;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEjH,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,kBAAkB,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAC9I,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACxH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,eAAe,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,mBAAmB,EAC1I,2BAA2B,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACnI,OAAO,EAAE,cAA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,KAAK,CAAC,CAAC,CAAC;QAElE,MAAM,KAAK,CAAC;IACd,CAAC;IAED,0JAA0J;IAC1J,yBAAyB;IACzB,MAAM,eAAe,EAAE,CAAC;AAC1B,CAAC"}
|
package/dist/browser/cdp.d.ts
CHANGED
|
@@ -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
|
|
18
|
-
*
|
|
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.
|
|
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
|
|
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.
|
package/dist/browser/cdp.js
CHANGED
|
@@ -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
|
|
65
|
-
*
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
//
|
|
146
|
-
//
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
/**
|
package/dist/browser/cdp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdp.js","sourceRoot":"","sources":["../../src/browser/cdp.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"cdp.js","sourceRoot":"","sources":["../../src/browser/cdp.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,iBAAiB,EAAE,WAAW,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AAC,IAAI,CAAC,yBAAyB,EAAE;YAE5C,MAAM,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE;YACpC,QAAQ;SACT,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAU;IAE/C,4CAA4C;IAC5C,IAAG,IAAI,CAAC,QAAQ,EAAE,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.
|
|
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
|
|
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.
|
|
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
|
-
*
|
|
100
|
+
* initializePlayback() after page navigation.
|
|
75
101
|
*
|
|
76
|
-
* The function handles:
|
|
77
|
-
* -
|
|
78
|
-
* -
|
|
79
|
-
* -
|
|
80
|
-
*
|
|
81
|
-
*
|
|
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>;
|