Skip to content

Support AudioMedia in legacy embeds#267

Merged
redreceipt merged 2 commits into
mainfrom
apo-7576-audio-media-fallback
Mar 11, 2026
Merged

Support AudioMedia in legacy embeds#267
redreceipt merged 2 commits into
mainfrom
apo-7576-audio-media-fallback

Conversation

@redreceipt
Copy link
Copy Markdown
Member

Summary

  • query content item audios in legacy embeds alongside videos
  • fall back to AudioMedia when a content item has no VideoMedia attached
  • add a regression test for audio-only content items

Testing

  • npm test -- --watch=false --runInBand VideoPlayer.test.js

Closes APO-7576
Closes APO-7468

@linear
Copy link
Copy Markdown

linear Bot commented Mar 11, 2026

@redreceipt
Copy link
Copy Markdown
Member Author

@nlewis84 when i tested the first time, i simulated the data wrong 😢 i forgot we have separate audio media fields. this fixes that

@redreceipt redreceipt enabled auto-merge March 11, 2026 18:31
const hasSource = (video) => video.sources?.some((source) => source?.uri);
const mediaItems = props.parentNode?.videos?.length
? props.parentNode.videos
: props.parentNode?.audios || [];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think I'm okay with this but just want to call out that this is a variance from how we do this on mobile.

On mobile, the video player only plays the video if one exists. There is now a separate audio player that exists below the cover image that plays audio if there is audio.

If there is both audio and video available, both players are visible.

I don't think we have an audio player on web right now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@conrad-vanl is the legacy embed repo. I added audio support in a previous PR

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

seacoast-audio

@redreceipt redreceipt added this pull request to the merge queue Mar 11, 2026
@nlewis84
Copy link
Copy Markdown
Contributor

@redreceipt Is the CS looped in that client that is reporting this should get moved off this old infrastructure asap?

Merged via the queue into main with commit 2c6c310 Mar 11, 2026
1 check passed
@redreceipt redreceipt deleted the apo-7576-audio-media-fallback branch March 11, 2026 18:50
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