Skip to content

Commit

Permalink
RNMobile: Ensure playsInline attribute conforms when falling back t…
Browse files Browse the repository at this point in the history
…o core Video block (#35981)

* fix: Rename playsInline to conform to Video block

Co-Authored-By: Carlos Garcia <[email protected]>

* docs: Add CHANGELOG entry

---------

Co-authored-by: Carlos Garcia <[email protected]>
  • Loading branch information
Siobhan Bamber and fluiddot authored Feb 28, 2024
1 parent 2415cf1 commit 69c0650
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
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

0 comments on commit 69c0650

Please sign in to comment.