Repository navigation
Add playsInline option in Video block - #14500
Conversation
| checked={ controls } | ||
| /> | ||
| <ToggleControl | ||
| label={ __( 'Playsinline' ) } |
There was a problem hiding this comment.
| label={ __( 'Playsinline' ) } | |
| label={ __( 'Play inline' ) } |
There was a problem hiding this comment.
Thank you so much @swissspidy ❤️ I was quite confused about what to set the label as 😓 Fixed in this commit.
| poster, | ||
| preload, | ||
| src, | ||
| playsinline, |
There was a problem hiding this comment.
Can you update this variable/attribute name to be written as playsInline? I think it is what React expects and it also reads easier that way.
|
Thanks for yet another contribution 😃 |
|
Thank you so much @gziolo ❤️ |
|
It looks like this has been merged into Gutenberg master, but I'm not seeing the option in WordPress 5.2.2 still. Has the base version of Gutenberg in WordPress itself not been updated to the version including this patch yet? |
|
@fienen Only features from Gutenberg 5.3 and earlier were included in WordPress 5.2.x , which means it's not expected this is present in 5.2.2 (this was included in Gutenberg 5.4). |
…#13134) Add the video settings allowing to customize several options for the VideoPress player rendered by the video block (extended by our VideoPress extension for Gutenberg). Now, after inserting a VideoPress-enhanced video block, a user can set the following settings: - Autoplay: whether to start playing as soon as the player renders (note that some browsers can prevent a video from being autoplayed). - Loop: whether to loop the video. - Muted: whether the video should start in a muted state. - Playback controls: whether show the controls to allow the user to control video playback. - Preload: what content is loaded before the video is played: - None: Indicates that the video should not be preloaded. - Metadata: Indicates that only video metadata (e.g. length) is fetched. - Auto: Indicates that the whole video file can be downloaded, even if the user is not expected to use it. - Poster image: image to be shown while the video is downloading. Given that these settings modifies the URL saved in the block content, any existing post containing a VideoPress-enhanced video block would result in a "invalid content" error. In order to support those posts, a deprecated version of the block has been added. These changes also introduces a new `playsInline` attribute (added in core in WordPress/gutenberg#14500), but it's currently unmodifiable, since VideoPress doesn't support it yet.
|
Sorry, but I still get the following warning when I add a video block to my page. |
|
@danihazler Thanks for your feedback, this is an old PR. Can you open a new issue? Which browser are you using? |
Description
This PR closes #14422 which requests the addition of a
playsInlineoption in thevideoblock.How has this been tested?
This PR has been tested by going through the following steps:
InspectorControls.playsinlineattribute to the<video>tag.Screenshots
Types of changes
This PR just mocks the other attributes in the block like "Autoplay", "Muted" and acts accordingly.
Checklist: