Skip to content

Commit

Permalink
Merge pull request #20181 from wordpress-mobile/gutenberg/support-for…
Browse files Browse the repository at this point in the history
…-videopress-v5

Initial support for VideoPress v5
  • Loading branch information
Siobhan Bamber authored Feb 23, 2024
2 parents efa163c + a44b752 commit 961d85f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

24.4
-----

* [**] [Jetpack-only] Block editor: Introduce VideoPress v5 support, to fix issues using video block with dotcom and Jetpack sites [https://github.com/wordpress-mobile/gutenberg-mobile/pull/6634]

24.3
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2488,6 +2488,7 @@ private GutenbergPropsBuilder getGutenbergPropsBuilder() {
false,
false,
false,
false,
true,
false,
!isFreeWPCom,
Expand All @@ -2506,6 +2507,7 @@ private GutenbergPropsBuilder getGutenbergPropsBuilder() {
SiteUtils.supportsLayoutGridFeature(mSite),
SiteUtils.supportsTiledGalleryFeature(mSite),
SiteUtils.supportsVideoPressFeature(mSite),
SiteUtils.supportsVideoPressV5Feature(mSite, SiteUtils.WP_VIDEOPRESS_V5_JETPACK_VERSION),
SiteUtils.supportsEmbedVariationFeature(mSite, SiteUtils.WP_FACEBOOK_EMBED_JETPACK_VERSION),
SiteUtils.supportsEmbedVariationFeature(mSite, SiteUtils.WP_INSTAGRAM_EMBED_JETPACK_VERSION),
SiteUtils.supportsEmbedVariationFeature(mSite, SiteUtils.WP_LOOM_EMBED_JETPACK_VERSION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class SiteUtils {
public static final String GB_EDITOR_NAME = "gutenberg";
public static final String AZTEC_EDITOR_NAME = "aztec";
public static final String WP_STORIES_CREATOR_NAME = "wp_stories_creator";
public static final String WP_VIDEOPRESS_V5_JETPACK_VERSION = "8.5";
public static final String WP_STORIES_JETPACK_VERSION = "9.1";
public static final String WP_CONTACT_INFO_JETPACK_VERSION = "8.5";
public static final String WP_FACEBOOK_EMBED_JETPACK_VERSION = "9.0";
Expand Down Expand Up @@ -340,6 +341,11 @@ public static boolean supportsVideoPressFeature(SiteModel site) {
return site != null && site.isWPCom();
}

public static boolean supportsVideoPressV5Feature(SiteModel site, String minimalJetpackVersion) {
return site != null && site.isWPCom() || site.isWPComAtomic() || checkMinimalJetpackVersion(site,
minimalJetpackVersion);
}

public static boolean supportsEmbedVariationFeature(SiteModel site, String minimalJetpackVersion) {
return site != null && (site.isWPCom() || checkMinimalJetpackVersion(site, minimalJetpackVersion));
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ext {
automatticRestVersion = '1.0.8'
automatticStoriesVersion = '2.4.0'
automatticTracksVersion = '3.4.0'
gutenbergMobileVersion = 'v1.112.0'
gutenbergMobileVersion = 'v1.113.0-alpha1'
wordPressAztecVersion = 'v2.0'
wordPressFluxCVersion = '2.67.0'
wordPressLoginVersion = '1.14.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ data class GutenbergPropsBuilder(
private val enableLayoutGridBlock: Boolean,
private val enableTiledGalleryBlock: Boolean,
private val enableVideoPressBlock: Boolean,
private val enableVideoPressV5Support: Boolean,
private val enableFacebookEmbed: Boolean,
private val enableInstagramEmbed: Boolean,
private val enableLoomEmbed: Boolean,
Expand All @@ -38,6 +39,7 @@ data class GutenbergPropsBuilder(
enableLayoutGridBlock = enableLayoutGridBlock,
enableTiledGalleryBlock = enableTiledGalleryBlock,
enableVideoPressBlock = enableVideoPressBlock,
enableVideoPressV5Support = enableVideoPressV5Support,
enableFacebookEmbed = enableFacebookEmbed,
enableInstagramEmbed = enableInstagramEmbed,
enableLoomEmbed = enableLoomEmbed,
Expand Down

0 comments on commit 961d85f

Please sign in to comment.