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

Fabric (New Architecture) codegen support #3487

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d3d12b4
feat: implemented codegenConfig on package.json
yungblud Jan 18, 2024
f01fa46
chore: moved directory location of Fabric component
yungblud Jan 18, 2024
cbbab32
fix: typefix FabricExample
yungblud Jan 18, 2024
6f14e08
chore: pod instaslled FabricExample iOS app
yungblud Jan 19, 2024
25f046a
feat: implemented codegen config on package.json
yungblud Jan 19, 2024
84e06a3
feat: implemented codegen of specs/VideoNativeComponent
yungblud Jan 19, 2024
aa03b54
chore: removed not using type Filter
yungblud Jan 19, 2024
fc243b0
feat: removed unnecessary export on codegen tyepes
yungblud Jan 19, 2024
6deb74b
Revert "feat: removed unnecessary export on codegen tyepes"
yungblud Jan 19, 2024
49d3f59
refactor: fixed types on Video component and modified types with code…
yungblud Jan 19, 2024
ce872c7
feat: modified codegenNativeComponent naming (RCTVideo)
yungblud Jan 19, 2024
6a50754
feat: pod installed example basic app
yungblud Jan 19, 2024
0c4bd9c
feat: bump up react-native dev dependency version to 0.73.2 for suppo…
yungblud Jan 20, 2024
c9f6a92
feat: support array param types on event callback function codegen types
yungblud Jan 20, 2024
946d6a7
chore: pod installed ios basic example
yungblud Jan 20, 2024
7944195
feat: modified source prop as optional type
yungblud Jan 22, 2024
d63ac94
feat: add original src/VideoComponent.ts again
yungblud Jan 23, 2024
8346b32
Revert "feat: add original src/VideoComponent.ts again"
yungblud Jan 23, 2024
f503306
feat: add original src/VideoComponent.ts again with original file name
yungblud Jan 23, 2024
7ce6785
feat: git rm src/specs/VideoNativeComponent.ts
yungblud Jan 23, 2024
10422a2
feat: git mv VideoNativeComponent.ts
yungblud Jan 23, 2024
1a99d30
feat: git mv src/specs/VideoNativeComponent.ts
yungblud Jan 23, 2024
5287d69
feat: git mv src/VideoNativeComponent.ts src/specs/VideoNativeCompone…
yungblud Jan 23, 2024
b7db238
Merge remote-tracking branch 'upstream/master' into feature/implement…
yungblud Jan 25, 2024
67c648e
feat: implemented array type handling on android JAVA
yungblud Jan 25, 2024
6c0fe68
feat: updated iOS requestHeaders parsing native
yungblud Jan 30, 2024
e69666d
feat: use safeGetArray on android, removed not using import too
yungblud Jan 30, 2024
d1a858a
feat: temporary commit - reusing enum types for remaining docs types
yungblud Jan 30, 2024
2ef456a
feat: implemented mixed type of SelectedTrack.value for JS layer
yungblud Feb 7, 2024
941dab4
Merge remote-tracking branch 'upstream/master' into feature/implement…
yungblud Mar 1, 2024
859cfa3
Merge remote-tracking branch 'upstream/master' into feature/implement…
yungblud Mar 6, 2024
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
Expand Up @@ -18,7 +18,6 @@
import com.facebook.react.bridge.Dynamic;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.ReadableMapKeySetIterator;
import com.facebook.react.common.MapBuilder;
import com.facebook.react.uimanager.ThemedReactContext;
import com.facebook.react.uimanager.ViewGroupManager;
Expand Down Expand Up @@ -128,18 +127,19 @@ public void setDRM(final ReactExoplayerView videoView, @Nullable ReadableMap drm
if (drm != null && drm.hasKey(PROP_DRM_TYPE)) {
String drmType = ReactBridgeUtils.safeGetString(drm, PROP_DRM_TYPE);
String drmLicenseServer = ReactBridgeUtils.safeGetString(drm, PROP_DRM_LICENSESERVER);
ReadableMap drmHeaders = ReactBridgeUtils.safeGetMap(drm, PROP_DRM_HEADERS);
ReadableArray drmHeadersArray = ReactBridgeUtils.safeGetArray(drm, PROP_DRM_HEADERS);
if (drmType != null && drmLicenseServer != null && Util.getDrmUuid(drmType) != null) {
UUID drmUUID = Util.getDrmUuid(drmType);
videoView.setDrmType(drmUUID);
videoView.setDrmLicenseUrl(drmLicenseServer);
if (drmHeaders != null) {
if (drmHeadersArray != null) {
ArrayList<String> drmKeyRequestPropertiesList = new ArrayList<>();
ReadableMapKeySetIterator itr = drmHeaders.keySetIterator();
while (itr.hasNextKey()) {
String key = itr.nextKey();
for (int i = 0; i < drmHeadersArray.size(); i++) {
ReadableMap current = drmHeadersArray.getMap(i);
String key = current.hasKey("key") ? current.getString("key") : null;
String value = current.hasKey("value") ? current.getString("value") : null;
drmKeyRequestPropertiesList.add(key);
drmKeyRequestPropertiesList.add(drmHeaders.getString(key));
drmKeyRequestPropertiesList.add(value);
}
videoView.setDrmLicenseHeader(drmKeyRequestPropertiesList.toArray(new String[0]));
}
Expand All @@ -157,7 +157,20 @@ public void setSrc(final ReactExoplayerView videoView, @Nullable ReadableMap src
int cropEndMs = ReactBridgeUtils.safeGetInt(src, PROP_SRC_CROP_END, -1);
String extension = ReactBridgeUtils.safeGetString(src, PROP_SRC_TYPE, null);

Map<String, String> headers = src.hasKey(PROP_SRC_HEADERS) ? ReactBridgeUtils.toStringMap(src.getMap(PROP_SRC_HEADERS)) : new HashMap<>();
Map<String, String> headers = new HashMap<>();
ReadableArray propSrcHeadersArray = ReactBridgeUtils.safeGetArray(src, PROP_SRC_HEADERS);
if (propSrcHeadersArray != null) {
if (propSrcHeadersArray.size() > 0) {
for (int i = 0; i < propSrcHeadersArray.size(); i++) {
ReadableMap current = propSrcHeadersArray.getMap(i);
String key = current.hasKey("key") ? current.getString("key") : null;
String value = current.hasKey("value") ? current.getString("value") : null;
if (key != null && value != null) {
headers.put(key, value);
}
}
}
}

if (TextUtils.isEmpty(uriString)) {
videoView.clearSrc();
Expand Down
13 changes: 13 additions & 0 deletions examples/FabricExample/ios/FabricExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -597,6 +598,10 @@
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
};
Expand Down Expand Up @@ -638,6 +643,10 @@
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand All @@ -661,6 +670,10 @@
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down
Loading
Loading