Skip to content

SYM-22: Support MP3 audio in legacy web embeds#266

Merged
redreceipt merged 1 commit into
mainfrom
sym-22-support-mp3-audio-in-legacy-web-embeds-copy
Mar 11, 2026
Merged

SYM-22: Support MP3 audio in legacy web embeds#266
redreceipt merged 1 commit into
mainfrom
sym-22-support-mp3-audio-in-legacy-web-embeds-copy

Conversation

@redreceipt
Copy link
Copy Markdown
Member

@redreceipt redreceipt commented Mar 10, 2026

🐛 Issue

Closes SYM-22
Closes APO-7576
Closes APO-7468

✏️ Solution

Legacy embed playback only selected YouTube or HLS video sources, so content items with only an MP3 source rendered no player at all.

This change keeps the existing YouTube/HLS priority but falls back to the first available media source when those formats are absent. That allows MP3-backed legacy embeds to render through the existing player path without changing the current preferred-source behavior.

🔬 To Test

  1. Run cd packages/web-shared && npx -y yarn@1.22.22 lint.
  2. Run cd web-embeds && npx -y yarn@1.22.22 lint.
  3. Run cd web-embeds && CI=1 npx -y yarn@1.22.22 test --watch=false --runInBand --testPathPattern=VideoPlayer.test.js and confirm the MP3-only VideoPlayer test passes.
  4. Run cd web-embeds && npx -y yarn@1.22.22 build.
  5. Run cd micro-service && npx -y yarn@1.22.22 build.
  6. Open a legacy embed page backed by a content item whose only media source is an MP3 URL and confirm the player renders instead of showing only the cover image / empty media area.

📸 Screenshots

seacoast-pr266-validation

@linear
Copy link
Copy Markdown

linear Bot commented Mar 10, 2026

@redreceipt redreceipt marked this pull request as ready for review March 10, 2026 19:28
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

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: f2285ed17a

ℹ️ 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".

? props.parentNode?.stream?.sources[0]?.uri
: videoMedia?.sources[0]?.uri;
? props.parentNode?.stream?.sources?.find((streamSource) => streamSource?.uri)?.uri
: videoMedia?.sources?.find((videoSource) => videoSource?.uri)?.uri;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Select the matched preferred source URI

After this change, hlsMedia/youtubeMedia can match a video because a later entry in sources contains .m3u8 or youtu, but the player URL is still chosen as the first non-empty source URI. In a mixed-source item (for example, MP3 first and HLS second), this silently drops the intended YouTube/HLS preference and can route playback to the wrong format. Use the URI that matched the preferred type (or compute preferred source directly) instead of always taking the first URI.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@nlewis84 nlewis84 left a comment

Choose a reason for hiding this comment

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

@redreceipt I spent 25 minutes trying to test this unsuccessfully. I trust your code changes and I'm sure you are going to validate in prod and follow up with another PR if for some reason this doesn't work.

@redreceipt redreceipt added this pull request to the merge queue Mar 11, 2026
Merged via the queue into main with commit f6080be Mar 11, 2026
1 check passed
@redreceipt redreceipt deleted the sym-22-support-mp3-audio-in-legacy-web-embeds-copy branch March 11, 2026 01:23
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.

2 participants