Skip to content

Commit

Permalink
Initial support for VideoPress v5 (#22602)
Browse files Browse the repository at this point in the history
  • Loading branch information
Siobhan Bamber authored Feb 23, 2024
2 parents 4335508 + d38dea8 commit 4ad3d59
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gutenberg/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
#
# LOCAL_GUTENBERG=../my-gutenberg-fork bundle exec pod install
ref:
tag: v1.112.0
tag: v1.113.0-alpha1
github_org: wordpress-mobile
repo_name: gutenberg-mobile
6 changes: 3 additions & 3 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ DEPENDENCIES:
- FSInteractiveMap (from `https://github.com/wordpress-mobile/FSInteractiveMap.git`, tag `0.2.0`)
- Gifu (= 3.3.1)
- Gridicons (~> 1.2)
- Gutenberg (from `https://cdn.a8c-ci.services/gutenberg-mobile/Gutenberg-v1.112.0.podspec`)
- Gutenberg (from `https://cdn.a8c-ci.services/gutenberg-mobile/Gutenberg-v1.113.0-alpha1.podspec`)
- JTAppleCalendar (~> 8.0.5)
- Kanvas (~> 1.4.4)
- MediaEditor (>= 1.2.2, ~> 1.2)
Expand Down Expand Up @@ -174,7 +174,7 @@ EXTERNAL SOURCES:
:git: https://github.com/wordpress-mobile/FSInteractiveMap.git
:tag: 0.2.0
Gutenberg:
:podspec: https://cdn.a8c-ci.services/gutenberg-mobile/Gutenberg-v1.112.0.podspec
:podspec: https://cdn.a8c-ci.services/gutenberg-mobile/Gutenberg-v1.113.0-alpha1.podspec
WordPressKit:
:commit: f335202c98b972dd2a426dfe0e06780a38579ee7
:git: https://github.com/wordpress-mobile/WordPressKit-iOS.git
Expand All @@ -199,7 +199,7 @@ SPEC CHECKSUMS:
FSInteractiveMap: a396f610f48b76cb540baa87139d056429abda86
Gifu: 416d4e38c4c2fed012f019e0a1d3ffcb58e5b842
Gridicons: 4455b9f366960121430e45997e32112ae49ffe1d
Gutenberg: ba97dd36571958f64108233a692e6057f5010dc2
Gutenberg: fc2335dc3877dbeeb0c0a92d0fed5dc0a13751ba
JTAppleCalendar: 16c6501b22cb27520372c28b0a2e0b12c8d0cd73
Kanvas: cc027f8058de881a4ae2b5aa5f05037b6d054d08
MediaEditor: d08314cfcbfac74361071a306b4bc3a39b3356ae
Expand Down
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
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]
* [**] [internal] Refactored .org REST API calls. [#22612]

24.3
Expand Down
2 changes: 2 additions & 0 deletions WordPress/Classes/Models/Blog.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ typedef NS_ENUM(NSUInteger, BlogFeature) {
BlogFeatureTiledGallery,
/// Does the blog support the VideoPress block?
BlogFeatureVideoPress,
/// Does the blog support v5 of the VideoPress block?
BlogFeatureVideoPressV5,
/// Does the blog support Facebook embed block?
BlogFeatureFacebookEmbed,
/// Does the blog support Instagram embed block?
Expand Down
7 changes: 7 additions & 0 deletions WordPress/Classes/Models/Blog.m
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,8 @@ - (BOOL)supports:(BlogFeature)feature
return [self supportsTiledGallery];
case BlogFeatureVideoPress:
return [self supportsVideoPress];
case BlogFeatureVideoPressV5:
return [self supportsVideoPressV5];
case BlogFeatureFacebookEmbed:
return [self supportsEmbedVariation: @"9.0"];
case BlogFeatureInstagramEmbed:
Expand Down Expand Up @@ -733,6 +735,11 @@ - (BOOL)supportsVideoPress
return self.isHostedAtWPcom;
}

- (BOOL)supportsVideoPressV5
{
return self.isHostedAtWPcom || self.isAtomic || [self hasRequiredJetpackVersion:@"8.5"];
}

- (BOOL)supportsEmbedVariation:(NSString *)requiredJetpackVersion
{
return [self hasRequiredJetpackVersion:requiredJetpackVersion] || self.isHostedAtWPcom;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,7 @@ extension GutenbergViewController: GutenbergBridgeDataSource {
.layoutGridBlock: false,
.tiledGalleryBlock: false,
.videoPressBlock: false,
.videoPressV5Support: false,
.unsupportedBlockEditor: false,
.canEnableUnsupportedBlockEditor: false,
.isAudioBlockMediaUploadEnabled: !isFreeWPCom,
Expand All @@ -1248,6 +1249,8 @@ extension GutenbergViewController: GutenbergBridgeDataSource {
.layoutGridBlock: post.blog.supports(.layoutGrid),
.tiledGalleryBlock: post.blog.supports(.tiledGallery),
.videoPressBlock: post.blog.supports(.videoPress),
.videoPressV5Support:
post.blog.supports(.videoPressV5),
.unsupportedBlockEditor: isUnsupportedBlockEditorEnabled,
.canEnableUnsupportedBlockEditor: post.blog.jetpack?.isConnected ?? false,
.isAudioBlockMediaUploadEnabled: !isFreeWPCom,
Expand Down

0 comments on commit 4ad3d59

Please sign in to comment.