Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSTEAM1-700: Display media on Live Page #11198

Merged
merged 30 commits into from
Dec 5, 2023

Conversation

alex-magana
Copy link
Contributor

@alex-magana alex-magana commented Nov 27, 2023

Resolves JIRA [WSTEAM1-700]

Overall changes

Adds support for rendering video on a Live Page post

Code changes

  • Adds a video handler to the PostContent componentsToRender mapping.
  • Adds a LivePageMediaPlayer container to render video on the Live Page.
  • Adds modules to retrieve AV data from blocks for Optimo, CPS and Live Page blocks.

Testing

  1. Setup the Next.js app as per instructions here.
  2. Visit http://localhost.bbc.co.uk:7081/pidgin/live/c7p765ynk9qt?renderer_env=test
  3. Posts containing video should display the media player.

Helpful Links

Add Links to useful resources related to this PR if applicable.

Coding Standards

Repository use guidelines

@alex-magana alex-magana changed the title WSTEAM1-641: Display media on Live Page WSTEAM1-700: Display media on Live Page Dec 1, 2023
@alex-magana alex-magana marked this pull request as ready for review December 1, 2023 12:56
Comment on lines +4 to +10
const getPlayerProps = ({ pageType, ...params }) => {
const propsHandler = {
live: getLivePageProps,
}[pageType];

return propsHandler ? propsHandler(params) : getDefaultProps(params);
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Quite like this approach. Should set us up well for building out the Media player in Simorgh later 👍

Copy link
Contributor

@amoore108 amoore108 left a comment

Choose a reason for hiding this comment

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

Looks great 👍

Think its worth commenting for other reviewers that we are going to be replacing the MediaPlayer component, starting with Live pages, in the new year, so we don't really need to Typescript-ify, apply component standards etc just yet. Its just a copy of the existing ArticleMediaPlayer component to get it on the page and will be replaced in the near future.

@alex-magana alex-magana merged commit 2307615 into latest Dec 5, 2023
@alex-magana alex-magana deleted the WSTEAM1-641-display-media-live-page branch December 5, 2023 13:29
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.

4 participants