Skip to content

Commit

Permalink
If a video has a featured image, set as poster automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed May 3, 2019
1 parent 2b53dd9 commit e3d92a5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions assets/src/blocks/amp-story-page/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,8 @@ class EditPage extends Component {
mediaUrl: media.url,
mediaId: media.id,
mediaType,
poster: VIDEO_BACKGROUND_TYPE === mediaType && media.image ? media.image.src : undefined,
} );

if ( IMAGE_BACKGROUND_TYPE === mediaType ) {
this.props.setAttributes( { poster: undefined } );
}
}

removeBackgroundColor( index ) {
Expand Down

0 comments on commit e3d92a5

Please sign in to comment.