Skip to content

fix(player): always enable MP2 software decoding#569

Merged
stackia merged 1 commit into
mainfrom
codex/always-enable-mp2-soft-decode
Jun 24, 2026
Merged

fix(player): always enable MP2 software decoding#569
stackia merged 1 commit into
mainfrom
codex/always-enable-mp2-soft-decode

Conversation

@stackia

@stackia stackia commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove the web player setting that allowed MP2 audio software decoding to be disabled.
  • Always provide the MP2 WASM decoder when creating the player pipeline, without UA-based defaults.
  • Remove MP2 software decoding as a separately documented web player feature.

Why

Recent Chrome builds switched the default audio decoding path from FFmpeg to Symphonia, which means MPEG-1 Layer 2 / MP2 audio may no longer be decoded natively. Keeping the MP2 software decoder always enabled prevents no-audio playback on affected Chrome versions and avoids relying on browser UA detection for the default behavior.

Related

Related issue: #568

Notes

src/embedded_web_data.h is intentionally not included in this PR.

Validation

  • pnpm run type-check:tsc
  • pnpm run lint:biome
  • pnpm run docs:build

@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-569.eastasia.1.azurestaticapps.net

@stackia stackia force-pushed the codex/always-enable-mp2-soft-decode branch from 3c56bf1 to d91ff0e Compare June 24, 2026 15:10
@stackia stackia marked this pull request as ready for review June 24, 2026 15:11
@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-569.eastasia.1.azurestaticapps.net

@stackia stackia marked this pull request as draft June 24, 2026 15:12
@stackia stackia marked this pull request as ready for review June 24, 2026 15:13
@stackia stackia merged commit b3336b7 into main Jun 24, 2026
9 of 10 checks passed
@stackia stackia deleted the codex/always-enable-mp2-soft-decode branch June 24, 2026 15:14

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d91ff0e4a0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const activeId = getActiveSlotId();
const activePlayer = slotPlayerRef(activeId).current;
if (!newSegments.length || !activePlayer) return;
const activePlayer = slotPlayerRef(activeId).current ?? createPlayerForSlot(activeId);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Create the initial player before loading segments

On a fresh /player mount, the segments effect below still returns when the active slot has no player, but this commit removed the mount-time decoder effect that used to create slot A. That means the first non-empty segments update after loading a playlist never calls handleLoadSegments, so this new lazy createPlayerForSlot fallback is never reached and no MediaSource/player is created until some unrelated path creates one.

Useful? React with 👍 / 👎.

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.

1 participant