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

Support of poster image for video block is missing #4837

Closed
benoitchantre opened this issue Feb 2, 2018 · 9 comments · Fixed by #9335
Closed

Support of poster image for video block is missing #4837

benoitchantre opened this issue Feb 2, 2018 · 9 comments · Fixed by #9335
Assignees
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Feature] Media Anything that impacts the experience of managing media [Type] Enhancement A suggestion for improvement.

Comments

@benoitchantre
Copy link
Contributor

benoitchantre commented Feb 2, 2018

At the moment, there's no option to set the cover poster image for a video.

Tested with Gutenberg 2.1

@jeffpaul jeffpaul added the [Type] Enhancement A suggestion for improvement. label Mar 8, 2018
@karmatosed
Copy link
Member

For now, lets close this as the cover image block stands on it's own. If we were going to add video we would probably have another cover video block. I don't think though that's something we're considering right now for version one. It could be an awesome plugin block though for someone to make.

@benoitchantre
Copy link
Contributor Author

@karmatosed I realize my wording was wrong. I wanted to say the Poster Image is missing. Here's a screenshot taken when Gutenberg is disabled.

capture d ecran 2018-05-30 a 16 41 15

When Gutenberg is enabled, this feature is missing.

@karmatosed karmatosed added the [Feature] Media Anything that impacts the experience of managing media label May 30, 2018
@karmatosed
Copy link
Member

Ah! Thanks for the clarification.

@karmatosed karmatosed reopened this May 30, 2018
@benoitchantre benoitchantre changed the title Support of cover image for video block is missing Support of poster image for video block is missing Jun 1, 2018
@SergioEstevao
Copy link
Contributor

This will also be great to support this because of the mobile apps, WordPress iOS editor uses the poster image to represent the video in the editor. This allows us to show something to the users without waiting to get a frame from the video source.

@gziolo
Copy link
Member

gziolo commented Jun 25, 2018

@jorgefilipecosta or @danielbachhuber, any hints on how to get the poster image from the media object after the upload is done? I'd like to help get it solved as this is one of the last blockers to have WordPress mobile apps to work with Gutenberg without those annoying compatibility issues.

@SergioEstevao
Copy link
Contributor

SergioEstevao commented Jun 25, 2018

@gziolo so if you are using VideoPress (trough Jetpack) you can query the VideoPress API and get an thumbnail URL to use.

On WordPress.org I don't know if there is any standard mechanism to get a thumbnail.

Meanwhile I also pushed a PR on Aztec to allow to display videos correctly even when a poster image is not defined.

@gziolo
Copy link
Member

gziolo commented Jun 25, 2018

Initially, maybe all we need is just an attribute which is able to recognize this poster so it wouldn't break if you open it on mobile and then back on the web. I think it needs to work both ways.

@danielbachhuber danielbachhuber added the Backwards Compatibility Issues or PRs that impact backwards compatability label Jun 25, 2018
@danielbachhuber
Copy link
Member

@gziolo To clarify existing behavior, the WordPress Classic Editor inserts a [video] shortcode for videos:

[video width="1280" height="720" mp4="http://wordpress-develop.test/wp-content/uploads/2018/06/SampleVideo_1280x720_1mb.mp4"][/video]

Once the shortcode is within the post, there's an Edit icon you can use to get to the poster image screen:

image

image

The poster image is only stored as an attribute on the shortcode, not within the database:

image

Gutenberg will need to support <video poster="#"> and have some UI for setting the attribute value.

Hope this helps clarify.

Related #7501

@gziolo gziolo modified the milestones: 3.2, 3.3 Jul 5, 2018
@gziolo gziolo removed their assignment Jul 10, 2018
@Soean Soean self-assigned this Jul 12, 2018
@aduth aduth modified the milestones: 3.3, 3.4 Jul 18, 2018
@jorgefilipecosta
Copy link
Member

Sorry @gziolo I missed your ping.

I think in Gutenberg the best way to have a poster image is a button on the video block toolbar that allows selecting one from the media gallery plus an inspector UI that allows previewing it or even drag & drop a post image.
The poster image should just be an attribute of the video block.

As @danielbachhuber referred poster image is just a property of the shortcode where it is used it is not stored in the database and the same video may have different poster images in different places.

@pento pento modified the milestones: 3.4, 3.5 Jul 30, 2018
@gziolo gziolo modified the milestones: 3.5, 3.6 Aug 8, 2018
@youknowriad youknowriad removed this from the 3.6 milestone Aug 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Feature] Media Anything that impacts the experience of managing media [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.