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

RNMobile: Ensure playsInline attribute conforms when falling back to core Video block #35981

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

RNMobile: Ensure playsInline setting always conforms to Video block schema.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ const VideoPressSave = CoreVideoSave => props => {
* @see https://github.com/WordPress/gutenberg/blob/c5f9bd88125282a0c35f887cc8d835f065893112/packages/editor/src/hooks/generated-class-name.js#L42
* @see https://github.com/Automattic/wp-calypso/pull/30546#issuecomment-463637946
*/
return CoreVideoSave( props );
// Rename `playsinline` to `playsInline` to conform the block schema of core Video block.
const { playsinline: videoPressPlayinline, ...restAttributes } = props.attributes;
const coreVideoAttributes = { ...restAttributes, playsInline: playsinline };

return CoreVideoSave( {
...props,
attributes: coreVideoAttributes,
} );
}

const url = getVideoPressUrl( guid, {
Expand Down
Loading