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

Add placeholderSrc if AMP #4049

Merged
merged 14 commits into from
Oct 2, 2019
Merged

Add placeholderSrc if AMP #4049

merged 14 commits into from
Oct 2, 2019

Conversation

pjlee11
Copy link

@pjlee11 pjlee11 commented Sep 30, 2019

part of 4044

Requires the image in #4048 to be publicly available

Overall change: If the request is AMP add placeholderSrc if it's canonical add showPlaceholder=false


  • I have assigned myself to this PR and the corresponding issues
  • Automated (jest and/or cypress) tests added (for new features) or updated (for existing features)
  • This PR requires manual testing

Testing ensure a placeholder loads on .amp and the validation warning has been removed.

@pjlee11 pjlee11 self-assigned this Sep 30, 2019
@@ -11,6 +11,9 @@ import { RequestContext } from '#contexts/RequestContext';
import { ServiceContext } from '#contexts/ServiceContext';
import embedUrl from '../../../MediaPlayer/helpers/embedUrl';

const liveRadioPlaceholderImageSrc =
'https://news.files.bbci.co.uk/include/articles/public/images/audio-player-placeholder.png';
Copy link
Contributor

Choose a reason for hiding this comment

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

Potentially a stupid question but should we be putting this image through iChef to ensure the most optimal size is returned?

Copy link
Author

Choose a reason for hiding this comment

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

For it to go through ichef it needs to be published on one of the stacks ichef knows about. Given we want this fixed quickly just using the single static image and allowing the browser to stretch it should be fine.

We can look to improve this when UX provide us an asset (this image is currently one I've generated temporarily), and then we can evaluate what this placeholder for AMP should look like on mobile widths.

@pjlee11
Copy link
Author

pjlee11 commented Oct 1, 2019

MP4 example of the AMP placeholder being loaded before the SMP iframe is loading into the page.

Audio placeholder for AMP.mp4.zip
Had to zip the MP4 😞

@pjlee11 pjlee11 marked this pull request as ready for review October 1, 2019 12:24
package.json Show resolved Hide resolved
Copy link
Contributor

@ibMadbouly ibMadbouly left a comment

Choose a reason for hiding this comment

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

👍

@pjlee11 pjlee11 merged commit 4c93e68 into latest Oct 2, 2019
@pjlee11 pjlee11 deleted the liveradio-AMP-placeholder-image branch October 2, 2019 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ws-media World Service Media
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants