Skip to content
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: minor
Type: enhancement

VideoPress Block: Added 'Play Inline' setting to play a video inline instead of full-screen on mobile devices when enabled.
8 changes: 8 additions & 0 deletions projects/plugins/jetpack/extensions/blocks/videopress/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ const VideoPressEdit = CoreVideoEdit =>
controls,
loop,
muted,
playsinline,
poster,
preload,
videoPressClassNames,
Expand Down Expand Up @@ -321,6 +322,11 @@ const VideoPressEdit = CoreVideoEdit =>
onChange={ this.toggleAttribute( 'controls' ) }
checked={ controls }
/>
<ToggleControl
label={ __( 'Play Inline', 'jetpack' ) }
onChange={ this.toggleAttribute( 'playsinline' ) }
checked={ playsinline }
/>
<SelectControl
label={ __( 'Preload', 'jetpack' ) }
value={ preload }
Expand Down Expand Up @@ -491,6 +497,7 @@ export default createHigherOrderComponent(
guid,
loop,
muted,
playsinline,
poster,
preload,
seekbarColor,
Expand All @@ -505,6 +512,7 @@ export default createHigherOrderComponent(
controls,
loop,
muted,
playsinline,
poster,
preload,
seekbarColor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const addVideoPressSupport = ( settings, name ) => {
muted: {
type: 'boolean',
},
playsInline: {
playsinline: {
type: 'boolean',
},
poster: {
Expand Down
2 changes: 2 additions & 0 deletions projects/plugins/jetpack/extensions/blocks/videopress/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const VideoPressSave = CoreVideoSave => props => {
guid,
loop,
muted,
playsinline,
poster,
preload,
videoPressClassNames,
Expand Down Expand Up @@ -48,6 +49,7 @@ const VideoPressSave = CoreVideoSave => props => {
controls,
loop,
muted,
playsinline,
poster,
preload,
seekbarColor,
Expand Down
3 changes: 3 additions & 0 deletions projects/plugins/jetpack/extensions/blocks/videopress/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const getVideoPressUrl = (
controls,
loop,
muted,
playsinline,
poster,
preload,
seekbarColor,
Expand All @@ -26,13 +27,15 @@ export const getVideoPressUrl = (
// - Controls: Turned on by default.
// - Loop: Turned off by default.
// - Muted: Turned off by default.
// - Plays Inline: Turned off by default.
// - Poster: No image by default.
// - Preload: None by default.
const options = {
...( autoplay && { autoPlay: true } ),
...( ! controls && { controls: false } ),
...( loop && { loop: true } ),
...( muted && { muted: true, persistVolume: false } ),
...( playsinline && { playsinline: true } ),
...( poster && { posterUrl: poster } ),
...( preload !== 'none' && { preloadContent: preload } ),
...( seekbarColor !== '' && { sbc: seekbarColor } ),
Expand Down