Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for VideoPress v5 #22602

Merged
merged 18 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 13 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
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
commit: e4abec201fc3d79d32d28752e2477413be787659
github_org: wordpress-mobile
repo_name: gutenberg-mobile
10 changes: 5 additions & 5 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-e4abec201fc3d79d32d28752e2477413be787659.podspec`)
- JTAppleCalendar (~> 8.0.5)
- Kanvas (~> 1.4.4)
- MediaEditor (>= 1.2.2, ~> 1.2)
Expand All @@ -129,7 +129,6 @@ DEPENDENCIES:
SPEC REPOS:
https://github.com/wordpress-mobile/cocoapods-specs.git:
- WordPressAuthenticator
- WordPressKit
- WordPressShared
trunk:
- Alamofire
Expand Down Expand Up @@ -159,6 +158,7 @@ SPEC REPOS:
- UIDeviceIdentifier
- WordPress-Aztec-iOS
- WordPress-Editor-iOS
- WordPressKit
- WordPressUI
- wpxmlrpc
- ZendeskCommonUISDK
Expand All @@ -175,7 +175,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-e4abec201fc3d79d32d28752e2477413be787659.podspec

CHECKOUT OPTIONS:
FSInteractiveMap:
Expand All @@ -194,7 +194,7 @@ SPEC CHECKSUMS:
FSInteractiveMap: a396f610f48b76cb540baa87139d056429abda86
Gifu: 416d4e38c4c2fed012f019e0a1d3ffcb58e5b842
Gridicons: 4455b9f366960121430e45997e32112ae49ffe1d
Gutenberg: ba97dd36571958f64108233a692e6057f5010dc2
Gutenberg: 675ed62028dd2b197ca705e519cf9676f398827a
JTAppleCalendar: 16c6501b22cb27520372c28b0a2e0b12c8d0cd73
Kanvas: cc027f8058de881a4ae2b5aa5f05037b6d054d08
MediaEditor: d08314cfcbfac74361071a306b4bc3a39b3356ae
Expand All @@ -213,7 +213,7 @@ SPEC CHECKSUMS:
WordPress-Aztec-iOS: fbebd569c61baa252b3f5058c0a2a9a6ada686bb
WordPress-Editor-iOS: bda9f7f942212589b890329a0cb22547311749ef
WordPressAuthenticator: 0891ba77c788044d32fe67a4d0435fdd598cecbd
WordPressKit: 7189845e0325fc6022a02638b572e1de8c1d7cc6
WordPressKit: c1ba7b4f531693a0914f676423808fdffd820d81
WordPressShared: cad7777b283d3ce2752f283df587342a581cd49b
WordPressUI: a491454affda3b0fb812812e637dc5e8f8f6bd06
wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd
Expand Down
2 changes: 1 addition & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
24.4
-----

* [**] 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]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, since VideoPress v5 is a Jetpack block and it won't be available in the WP app, we should consider adding the prefix [Jetpack-only].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in bf07e03, thanks!


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"];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See related comment on Android PR for selecting this version number: https://github.com/wordpress-mobile/WordPress-Android/pull/20181/files#r1497916911

}

- (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