Skip to content

Improve transcoding error handling and update type definitions - #7

Merged
harusharu merged 6 commits into
mainfrom
streaming-platform-redesign
Aug 17, 2026
Merged

Improve transcoding error handling and update type definitions#7
harusharu merged 6 commits into
mainfrom
streaming-platform-redesign

Conversation

@harusharu

Copy link
Copy Markdown
Owner
  • Enhanced error handling for transcoding processes to improve reliability and feedback.
  • Updated Next.js type imports to development versions to ensure compatibility.
  • Refined internal type definitions across the codebase for better type safety.

v0 Session

v0 and others added 2 commits August 17, 2026 17:09
Co-authored-by: Harshal Sawant <109863197+harusharu@users.noreply.github.com>
Co-authored-by: Harshal Sawant <109863197+harusharu@users.noreply.github.com>
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
harustream Ready Ready Preview Aug 17, 2026 5:50pm

Co-authored-by: Harshal Sawant <109863197+harusharu@users.noreply.github.com>
Co-authored-by: Harshal Sawant <109863197+harusharu@users.noreply.github.com>
…actor Results component to group by provider; update SettingsView layout

Co-authored-by: Harshal Sawant <109863197+harusharu@users.noreply.github.com>
…ovider catalog updates

Co-authored-by: Harshal Sawant <109863197+harusharu@users.noreply.github.com>
@harusharu
harusharu requested a lite review from Copilot August 17, 2026 17:53
@harusharu
harusharu merged commit dee6a95 into main Aug 17, 2026
3 checks passed
@harusharu
harusharu deleted the streaming-platform-redesign branch August 17, 2026 17:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR shifts discovery (home feed + search) from single-provider browsing to an aggregated “all providers” catalog, while enriching Media with provider metadata so the UI can attribute results to sources. It also improves the robustness of the MediaSource (transcode) playback path and refreshes several UI surfaces (settings, cards, modals, global background styling).

Changes:

  • Aggregate featured + search results across all live providers and annotate Media items with provider metadata.
  • Improve MSE/transcode playback lifecycle handling (buffer events, reader cancellation, end-of-stream gating) and add a safer transcode planning failure path.
  • UI/layout refresh across home/search/settings/player, plus global background/selection styling.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/lib/media/streamProxy.ts Simplifies HLS manifest rewriting so non-comment URI lines are consistently resolved/proxied.
src/lib/hooks/useProviders.ts Adds abortable provider refreshes and avoids redundant provider list updates via a signature.
src/lib/hooks/useMseStream.ts Improves MSE cleanup/error handling (reader cancel, buffer listeners, end-of-stream gating).
src/lib/api/types.ts Extends Media schema with provider identity + multi-provider attribution fields.
src/lib/api/client.ts Adds multi-provider featured/search fan-out, per-item annotation, and merge/deduping helpers.
src/components/layout/Header.tsx Removes the active-provider pill UI from the header.
src/components/layout/App.tsx Switches home/search to multi-provider discovery and updates provider selection behavior for meta/playback calls.
src/components/features/settings/SettingsView.tsx Reworks settings layout and adds provider refresh affordance + “source strategy” explainer.
src/components/features/search/Results.tsx Groups rendered results by provider attribution for clearer provenance.
src/components/features/player/PlayerModal.tsx Adjusts player UX and error recovery; simplifies controls; tweaks stream classification inputs.
src/components/features/player/DetailModal.tsx Updates modal layout/styling.
src/components/features/home/Rail.tsx Adjusts rail spacing/styling for the refreshed home layout.
src/components/features/home/Hero.tsx Updates hero styling/gradients to match the new visual design.
src/components/features/home/Card.tsx Adds provider badge/year parsing and refreshes card UI styling/content layout.
src/app/globals.css Adds global background gradient styling and selection colors.
src/app/api/play/route.ts Adds explicit try/catch around transcode planning with improved logging and a 502 response on failure.
Suppressed comments (2)

src/components/features/player/PlayerModal.tsx:400

  • autoAdvance is hard-coded to true, so the user’s settings.autoAdvance preference (still exposed in Settings) no longer has any effect. Wire the setting back through AppPlayerModalPlayerBridge so the toggle actually controls episode auto-advance.
                <PlayerBridge
                  kind={kind}
                  source={source}
                  savedPosition={savedPosition}
                  rate={rate}
                  setRate={setRate}
                  autoAdvance={true}
                  stalledMessage={stalledMessage}
                  setStalledMessage={setStalledMessage}

src/components/layout/App.tsx:216

  • Same issue as onOpen: using item.providerId ?? settings.provider will ignore the preferred provider whenever providerId is present. Prefer settings.provider when it’s listed in item.providerIds so playback/metadata resolution follows the configured ordering.
      try {
        const meta = await getMeta(item.link, item.providerId ?? settings.provider);
        if (session !== playerSessionRef.current) return;

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +52 to +59
const signature = body.providers
.map((provider) => `${provider.id}:${provider.name}`)
.join('|');
if (signature !== lastSignatureRef.current) {
lastSignatureRef.current = signature;
setProviders(body.providers);
setAvailableProviders(body.providers);
}
Comment on lines 297 to 300
// Which renderer serves the current source: HLS via Vidstack's internal
// hls.js, a natively playable MP4, or the ffmpeg transcode proxy (MKV et al.).
const kind = classifySource(source ?? '', sourceType);
const kind = classifySource(source ?? '', undefined);

Comment on lines 191 to +192
try {
const meta = await getMeta(item.link, settings.provider);
const meta = await getMeta(item.link, item.providerId ?? settings.provider);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants