diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 77db9de8a38a..8d7c0bf91690 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -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 ----- diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java b/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java index 80f000355921..d739a18b867b 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java @@ -2488,6 +2488,7 @@ private GutenbergPropsBuilder getGutenbergPropsBuilder() { false, false, false, + false, true, false, !isFreeWPCom, @@ -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), diff --git a/WordPress/src/main/java/org/wordpress/android/util/SiteUtils.java b/WordPress/src/main/java/org/wordpress/android/util/SiteUtils.java index 416d19eb0cc4..f4f3a4549be8 100644 --- a/WordPress/src/main/java/org/wordpress/android/util/SiteUtils.java +++ b/WordPress/src/main/java/org/wordpress/android/util/SiteUtils.java @@ -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"; @@ -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)); } diff --git a/build.gradle b/build.gradle index 743b387e0d37..b978e54055d5 100644 --- a/build.gradle +++ b/build.gradle @@ -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' diff --git a/libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergPropsBuilder.kt b/libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergPropsBuilder.kt index 53ad2c0c9aae..27bce5ff0990 100644 --- a/libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergPropsBuilder.kt +++ b/libs/editor/src/main/java/org/wordpress/android/editor/gutenberg/GutenbergPropsBuilder.kt @@ -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, @@ -38,6 +39,7 @@ data class GutenbergPropsBuilder( enableLayoutGridBlock = enableLayoutGridBlock, enableTiledGalleryBlock = enableTiledGalleryBlock, enableVideoPressBlock = enableVideoPressBlock, + enableVideoPressV5Support = enableVideoPressV5Support, enableFacebookEmbed = enableFacebookEmbed, enableInstagramEmbed = enableInstagramEmbed, enableLoomEmbed = enableLoomEmbed,