From b33e6df496265270211bf59eca27155810b98069 Mon Sep 17 00:00:00 2001 From: yungblud Date: Thu, 7 Mar 2024 19:35:17 +0900 Subject: [PATCH] Fabric (New Architecture) codegen support (#3487) * feat: implemented codegenConfig on package.json * chore: moved directory location of Fabric component * fix: typefix FabricExample * chore: pod instaslled FabricExample iOS app * feat: implemented codegen config on package.json * feat: implemented codegen of specs/VideoNativeComponent * chore: removed not using type Filter * feat: removed unnecessary export on codegen tyepes * Revert "feat: removed unnecessary export on codegen tyepes" This reverts commit fc243b0ac5c565eda4886cd865c32ba4e812d7ff. * refactor: fixed types on Video component and modified types with codegen types * feat: modified codegenNativeComponent naming (RCTVideo) * feat: pod installed example basic app * feat: bump up react-native dev dependency version to 0.73.2 for supporting codegen array event params * feat: support array param types on event callback function codegen types * chore: pod installed ios basic example * feat: modified source prop as optional type * feat: add original src/VideoComponent.ts again * Revert "feat: add original src/VideoComponent.ts again" This reverts commit d63ac94e5330f7c7fb50374f65f8f3f4e0a225d7. * feat: add original src/VideoComponent.ts again with original file name * feat: git rm src/specs/VideoNativeComponent.ts * feat: git mv VideoNativeComponent.ts * feat: git mv src/specs/VideoNativeComponent.ts * feat: git mv src/VideoNativeComponent.ts src/specs/VideoNativeComponent.ts * feat: implemented array type handling on android JAVA * feat: updated iOS requestHeaders parsing native * feat: use safeGetArray on android, removed not using import too * feat: temporary commit - reusing enum types for remaining docs types * feat: implemented mixed type of SelectedTrack.value for JS layer --- .../exoplayer/ReactExoplayerViewManager.java | 29 +- .../FabricExample.xcodeproj/project.pbxproj | 13 + examples/FabricExample/ios/Podfile.lock | 1042 ++++++++--------- examples/FabricExample/src/VideoPlayer.tsx | 67 +- examples/FabricExample/tsconfig.json | 5 +- examples/basic/ios/Podfile.lock | 12 +- .../ios/videoplayer.xcodeproj/project.pbxproj | 30 +- ios/Video/DataStructures/VideoSource.swift | 12 +- package.json | 12 +- src/Video.tsx | 70 +- src/VideoNativeComponent.ts | 418 ------- src/index.ts | 2 +- src/specs/VideoNativeComponent.ts | 567 +++++++++ src/types/events.ts | 180 +-- src/types/index.ts | 1 + src/utils.ts | 8 + 16 files changed, 1287 insertions(+), 1181 deletions(-) delete mode 100644 src/VideoNativeComponent.ts create mode 100644 src/specs/VideoNativeComponent.ts diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java index 8536bc2b..ee69b28d 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java @@ -18,7 +18,6 @@ import com.brentvatne.common.toolbox.ReactBridgeUtils; 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; @@ -128,18 +127,19 @@ public class ReactExoplayerViewManager extends ViewGroupManager 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])); } @@ -157,7 +157,20 @@ public class ReactExoplayerViewManager extends ViewGroupManager headers = src.hasKey(PROP_SRC_HEADERS) ? ReactBridgeUtils.toStringMap(src.getMap(PROP_SRC_HEADERS)) : new HashMap<>(); + Map 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(); diff --git a/examples/FabricExample/ios/FabricExample.xcodeproj/project.pbxproj b/examples/FabricExample/ios/FabricExample.xcodeproj/project.pbxproj index 7a069980..8ef48fc2 100644 --- a/examples/FabricExample/ios/FabricExample.xcodeproj/project.pbxproj +++ b/examples/FabricExample/ios/FabricExample.xcodeproj/project.pbxproj @@ -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; @@ -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; }; @@ -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; @@ -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; diff --git a/examples/FabricExample/ios/Podfile.lock b/examples/FabricExample/ios/Podfile.lock index 2fc3f613..cd35a33b 100644 --- a/examples/FabricExample/ios/Podfile.lock +++ b/examples/FabricExample/ios/Podfile.lock @@ -2,14 +2,14 @@ PODS: - boost (1.76.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.71.12) - - FBReactNativeSpec (0.71.12): + - FBLazyVector (0.71.15) + - FBReactNativeSpec (0.71.15): - RCT-Folly (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-Core (= 0.71.12) - - React-jsi (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-Core (= 0.71.15) + - React-jsi (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) - Flipper (0.125.0): - Flipper-Folly (~> 2.6) - Flipper-RSocket (~> 1.4) @@ -73,9 +73,9 @@ PODS: - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - - hermes-engine (0.71.12): - - hermes-engine/Pre-built (= 0.71.12) - - hermes-engine/Pre-built (0.71.12) + - hermes-engine (0.71.15): + - hermes-engine/Pre-built (= 0.71.15) + - hermes-engine/Pre-built (0.71.15) - libevent (2.1.12) - OpenSSL-Universal (1.1.1100) - PromisesObjC (2.2.0) @@ -103,26 +103,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.71.12) - - RCTTypeSafety (0.71.12): - - FBLazyVector (= 0.71.12) - - RCTRequired (= 0.71.12) - - React-Core (= 0.71.12) - - React (0.71.12): - - React-Core (= 0.71.12) - - React-Core/DevSupport (= 0.71.12) - - React-Core/RCTWebSocket (= 0.71.12) - - React-RCTActionSheet (= 0.71.12) - - React-RCTAnimation (= 0.71.12) - - React-RCTBlob (= 0.71.12) - - React-RCTImage (= 0.71.12) - - React-RCTLinking (= 0.71.12) - - React-RCTNetwork (= 0.71.12) - - React-RCTSettings (= 0.71.12) - - React-RCTText (= 0.71.12) - - React-RCTVibration (= 0.71.12) - - React-callinvoker (0.71.12) - - React-Codegen (0.71.12): + - RCTRequired (0.71.15) + - RCTTypeSafety (0.71.15): + - FBLazyVector (= 0.71.15) + - RCTRequired (= 0.71.15) + - React-Core (= 0.71.15) + - React (0.71.15): + - React-Core (= 0.71.15) + - React-Core/DevSupport (= 0.71.15) + - React-Core/RCTWebSocket (= 0.71.15) + - React-RCTActionSheet (= 0.71.15) + - React-RCTAnimation (= 0.71.15) + - React-RCTBlob (= 0.71.15) + - React-RCTImage (= 0.71.15) + - React-RCTLinking (= 0.71.15) + - React-RCTNetwork (= 0.71.15) + - React-RCTSettings (= 0.71.15) + - React-RCTText (= 0.71.15) + - React-RCTVibration (= 0.71.15) + - React-callinvoker (0.71.15) + - React-Codegen (0.71.15): - FBReactNativeSpec - hermes-engine - RCT-Folly @@ -135,547 +135,547 @@ PODS: - React-rncore - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.71.12): + - React-Core (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.71.12) - - React-cxxreact (= 0.71.12) + - React-Core/Default (= 0.71.15) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-Core/CoreModulesHeaders (0.71.12): + - React-Core/CoreModulesHeaders (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.12) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-Core/Default (0.71.12): + - React-Core/Default (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 0.71.12) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-Core/DevSupport (0.71.12): + - React-Core/DevSupport (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.71.12) - - React-Core/RCTWebSocket (= 0.71.12) - - React-cxxreact (= 0.71.12) + - React-Core/Default (= 0.71.15) + - React-Core/RCTWebSocket (= 0.71.15) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-jsinspector (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-jsinspector (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-Core/RCTActionSheetHeaders (0.71.12): + - React-Core/RCTActionSheetHeaders (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.12) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-Core/RCTAnimationHeaders (0.71.12): + - React-Core/RCTAnimationHeaders (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.12) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-Core/RCTBlobHeaders (0.71.12): + - React-Core/RCTBlobHeaders (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.12) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-Core/RCTImageHeaders (0.71.12): + - React-Core/RCTImageHeaders (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.12) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-Core/RCTLinkingHeaders (0.71.12): + - React-Core/RCTLinkingHeaders (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.12) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-Core/RCTNetworkHeaders (0.71.12): + - React-Core/RCTNetworkHeaders (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.12) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-Core/RCTSettingsHeaders (0.71.12): + - React-Core/RCTSettingsHeaders (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.12) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-Core/RCTTextHeaders (0.71.12): + - React-Core/RCTTextHeaders (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.12) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-Core/RCTVibrationHeaders (0.71.12): + - React-Core/RCTVibrationHeaders (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.71.12) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-Core/RCTWebSocket (0.71.12): + - React-Core/RCTWebSocket (0.71.15): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.71.12) - - React-cxxreact (= 0.71.12) + - React-Core/Default (= 0.71.15) + - React-cxxreact (= 0.71.15) - React-hermes - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-perflogger (= 0.71.15) - Yoga - - React-CoreModules (0.71.12): + - React-CoreModules (0.71.15): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.12) - - React-Codegen (= 0.71.12) - - React-Core/CoreModulesHeaders (= 0.71.12) - - React-jsi (= 0.71.12) + - RCTTypeSafety (= 0.71.15) + - React-Codegen (= 0.71.15) + - React-Core/CoreModulesHeaders (= 0.71.15) + - React-jsi (= 0.71.15) - React-RCTBlob - - React-RCTImage (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-cxxreact (0.71.12): + - React-RCTImage (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-cxxreact (0.71.15): - boost (= 1.76.0) - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsinspector (= 0.71.12) - - React-logger (= 0.71.12) - - React-perflogger (= 0.71.12) - - React-runtimeexecutor (= 0.71.12) - - React-Fabric (0.71.12): + - React-callinvoker (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsinspector (= 0.71.15) + - React-logger (= 0.71.15) + - React-perflogger (= 0.71.15) + - React-runtimeexecutor (= 0.71.15) + - React-Fabric (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-Fabric/animations (= 0.71.12) - - React-Fabric/attributedstring (= 0.71.12) - - React-Fabric/butter (= 0.71.12) - - React-Fabric/componentregistry (= 0.71.12) - - React-Fabric/componentregistrynative (= 0.71.12) - - React-Fabric/components (= 0.71.12) - - React-Fabric/config (= 0.71.12) - - React-Fabric/core (= 0.71.12) - - React-Fabric/debug_core (= 0.71.12) - - React-Fabric/debug_renderer (= 0.71.12) - - React-Fabric/imagemanager (= 0.71.12) - - React-Fabric/leakchecker (= 0.71.12) - - React-Fabric/mapbuffer (= 0.71.12) - - React-Fabric/mounting (= 0.71.12) - - React-Fabric/runtimescheduler (= 0.71.12) - - React-Fabric/scheduler (= 0.71.12) - - React-Fabric/telemetry (= 0.71.12) - - React-Fabric/templateprocessor (= 0.71.12) - - React-Fabric/textlayoutmanager (= 0.71.12) - - React-Fabric/uimanager (= 0.71.12) - - React-Fabric/utils (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/animations (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-Fabric/animations (= 0.71.15) + - React-Fabric/attributedstring (= 0.71.15) + - React-Fabric/butter (= 0.71.15) + - React-Fabric/componentregistry (= 0.71.15) + - React-Fabric/componentregistrynative (= 0.71.15) + - React-Fabric/components (= 0.71.15) + - React-Fabric/config (= 0.71.15) + - React-Fabric/core (= 0.71.15) + - React-Fabric/debug_core (= 0.71.15) + - React-Fabric/debug_renderer (= 0.71.15) + - React-Fabric/imagemanager (= 0.71.15) + - React-Fabric/leakchecker (= 0.71.15) + - React-Fabric/mapbuffer (= 0.71.15) + - React-Fabric/mounting (= 0.71.15) + - React-Fabric/runtimescheduler (= 0.71.15) + - React-Fabric/scheduler (= 0.71.15) + - React-Fabric/telemetry (= 0.71.15) + - React-Fabric/templateprocessor (= 0.71.15) + - React-Fabric/textlayoutmanager (= 0.71.15) + - React-Fabric/uimanager (= 0.71.15) + - React-Fabric/utils (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/animations (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/attributedstring (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/attributedstring (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/butter (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/butter (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/componentregistry (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/componentregistry (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/componentregistrynative (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/componentregistrynative (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-Fabric/components/activityindicator (= 0.71.12) - - React-Fabric/components/image (= 0.71.12) - - React-Fabric/components/inputaccessory (= 0.71.12) - - React-Fabric/components/legacyviewmanagerinterop (= 0.71.12) - - React-Fabric/components/modal (= 0.71.12) - - React-Fabric/components/root (= 0.71.12) - - React-Fabric/components/safeareaview (= 0.71.12) - - React-Fabric/components/scrollview (= 0.71.12) - - React-Fabric/components/slider (= 0.71.12) - - React-Fabric/components/text (= 0.71.12) - - React-Fabric/components/textinput (= 0.71.12) - - React-Fabric/components/unimplementedview (= 0.71.12) - - React-Fabric/components/view (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components/activityindicator (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-Fabric/components/activityindicator (= 0.71.15) + - React-Fabric/components/image (= 0.71.15) + - React-Fabric/components/inputaccessory (= 0.71.15) + - React-Fabric/components/legacyviewmanagerinterop (= 0.71.15) + - React-Fabric/components/modal (= 0.71.15) + - React-Fabric/components/root (= 0.71.15) + - React-Fabric/components/safeareaview (= 0.71.15) + - React-Fabric/components/scrollview (= 0.71.15) + - React-Fabric/components/slider (= 0.71.15) + - React-Fabric/components/text (= 0.71.15) + - React-Fabric/components/textinput (= 0.71.15) + - React-Fabric/components/unimplementedview (= 0.71.15) + - React-Fabric/components/view (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components/activityindicator (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components/image (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components/image (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components/inputaccessory (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components/inputaccessory (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components/legacyviewmanagerinterop (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components/legacyviewmanagerinterop (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components/modal (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components/modal (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components/root (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components/root (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components/safeareaview (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components/safeareaview (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components/scrollview (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components/scrollview (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components/slider (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components/slider (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components/text (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components/text (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components/textinput (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components/textinput (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components/unimplementedview (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components/unimplementedview (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/components/view (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/components/view (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) - Yoga - - React-Fabric/config (0.71.12): + - React-Fabric/config (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/core (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/core (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/debug_core (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/debug_core (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/debug_renderer (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/debug_renderer (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/imagemanager (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/imagemanager (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - React-RCTImage (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/leakchecker (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - React-RCTImage (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/leakchecker (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/mapbuffer (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/mapbuffer (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/mounting (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/mounting (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/runtimescheduler (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/runtimescheduler (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/scheduler (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/scheduler (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/telemetry (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/telemetry (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/templateprocessor (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/templateprocessor (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/textlayoutmanager (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/textlayoutmanager (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) - React-Fabric/uimanager - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/uimanager (0.71.12): + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/uimanager (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-Fabric/utils (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-Fabric/utils (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - RCTRequired (= 0.71.12) - - RCTTypeSafety (= 0.71.12) - - React-graphics (= 0.71.12) - - React-jsi (= 0.71.12) - - React-jsiexecutor (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-graphics (0.71.12): + - RCTRequired (= 0.71.15) + - RCTTypeSafety (= 0.71.15) + - React-graphics (= 0.71.15) + - React-jsi (= 0.71.15) + - React-jsiexecutor (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-graphics (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - React-Core/Default (= 0.71.12) - - React-hermes (0.71.12): + - React-Core/Default (= 0.71.15) + - React-hermes (0.71.15): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - RCT-Folly/Futures (= 2021.07.22.00) - - React-cxxreact (= 0.71.12) + - React-cxxreact (= 0.71.15) - React-jsi - - React-jsiexecutor (= 0.71.12) - - React-jsinspector (= 0.71.12) - - React-perflogger (= 0.71.12) - - React-jsi (0.71.12): + - React-jsiexecutor (= 0.71.15) + - React-jsinspector (= 0.71.15) + - React-perflogger (= 0.71.15) + - React-jsi (0.71.15): - boost (= 1.76.0) - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-jsiexecutor (0.71.12): + - React-jsiexecutor (0.71.15): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 0.71.12) - - React-jsi (= 0.71.12) - - React-perflogger (= 0.71.12) - - React-jsinspector (0.71.12) - - React-logger (0.71.12): + - React-cxxreact (= 0.71.15) + - React-jsi (= 0.71.15) + - React-perflogger (= 0.71.15) + - React-jsinspector (0.71.15) + - React-logger (0.71.15): - glog - - react-native-video (6.0.0-alpha.6): + - react-native-video (6.0.0-beta.4): - React-Core - - react-native-video/Video (= 6.0.0-alpha.6) - - react-native-video/Video (6.0.0-alpha.6): + - react-native-video/Video (= 6.0.0-beta.4) + - react-native-video/Video (6.0.0-beta.4): - PromisesSwift - React-Core - - React-perflogger (0.71.12) - - React-RCTActionSheet (0.71.12): - - React-Core/RCTActionSheetHeaders (= 0.71.12) - - React-RCTAnimation (0.71.12): + - React-perflogger (0.71.15) + - React-RCTActionSheet (0.71.15): + - React-Core/RCTActionSheetHeaders (= 0.71.15) + - React-RCTAnimation (0.71.15): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.12) - - React-Codegen (= 0.71.12) - - React-Core/RCTAnimationHeaders (= 0.71.12) - - React-jsi (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-RCTAppDelegate (0.71.12): + - RCTTypeSafety (= 0.71.15) + - React-Codegen (= 0.71.15) + - React-Core/RCTAnimationHeaders (= 0.71.15) + - React-jsi (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-RCTAppDelegate (0.71.15): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -683,80 +683,80 @@ PODS: - React-graphics - React-RCTFabric - ReactCommon/turbomodule/core - - React-RCTBlob (0.71.12): + - React-RCTBlob (0.71.15): - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.71.12) - - React-Core/RCTBlobHeaders (= 0.71.12) - - React-Core/RCTWebSocket (= 0.71.12) - - React-jsi (= 0.71.12) - - React-RCTNetwork (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-RCTFabric (0.71.12): + - React-Codegen (= 0.71.15) + - React-Core/RCTBlobHeaders (= 0.71.15) + - React-Core/RCTWebSocket (= 0.71.15) + - React-jsi (= 0.71.15) + - React-RCTNetwork (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-RCTFabric (0.71.15): - RCT-Folly/Fabric (= 2021.07.22.00) - - React-Core (= 0.71.12) - - React-Fabric (= 0.71.12) - - React-RCTImage (= 0.71.12) - - React-RCTImage (0.71.12): + - React-Core (= 0.71.15) + - React-Fabric (= 0.71.15) + - React-RCTImage (= 0.71.15) + - React-RCTImage (0.71.15): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.12) - - React-Codegen (= 0.71.12) - - React-Core/RCTImageHeaders (= 0.71.12) - - React-jsi (= 0.71.12) - - React-RCTNetwork (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-RCTLinking (0.71.12): - - React-Codegen (= 0.71.12) - - React-Core/RCTLinkingHeaders (= 0.71.12) - - React-jsi (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-RCTNetwork (0.71.12): + - RCTTypeSafety (= 0.71.15) + - React-Codegen (= 0.71.15) + - React-Core/RCTImageHeaders (= 0.71.15) + - React-jsi (= 0.71.15) + - React-RCTNetwork (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-RCTLinking (0.71.15): + - React-Codegen (= 0.71.15) + - React-Core/RCTLinkingHeaders (= 0.71.15) + - React-jsi (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-RCTNetwork (0.71.15): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.12) - - React-Codegen (= 0.71.12) - - React-Core/RCTNetworkHeaders (= 0.71.12) - - React-jsi (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-RCTSettings (0.71.12): + - RCTTypeSafety (= 0.71.15) + - React-Codegen (= 0.71.15) + - React-Core/RCTNetworkHeaders (= 0.71.15) + - React-jsi (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-RCTSettings (0.71.15): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.71.12) - - React-Codegen (= 0.71.12) - - React-Core/RCTSettingsHeaders (= 0.71.12) - - React-jsi (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-RCTText (0.71.12): - - React-Core/RCTTextHeaders (= 0.71.12) - - React-RCTVibration (0.71.12): + - RCTTypeSafety (= 0.71.15) + - React-Codegen (= 0.71.15) + - React-Core/RCTSettingsHeaders (= 0.71.15) + - React-jsi (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-RCTText (0.71.15): + - React-Core/RCTTextHeaders (= 0.71.15) + - React-RCTVibration (0.71.15): - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.71.12) - - React-Core/RCTVibrationHeaders (= 0.71.12) - - React-jsi (= 0.71.12) - - ReactCommon/turbomodule/core (= 0.71.12) - - React-rncore (0.71.12) - - React-runtimeexecutor (0.71.12): - - React-jsi (= 0.71.12) - - ReactCommon/turbomodule/bridging (0.71.12): + - React-Codegen (= 0.71.15) + - React-Core/RCTVibrationHeaders (= 0.71.15) + - React-jsi (= 0.71.15) + - ReactCommon/turbomodule/core (= 0.71.15) + - React-rncore (0.71.15) + - React-runtimeexecutor (0.71.15): + - React-jsi (= 0.71.15) + - ReactCommon/turbomodule/bridging (0.71.15): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.71.12) - - React-Core (= 0.71.12) - - React-cxxreact (= 0.71.12) - - React-jsi (= 0.71.12) - - React-logger (= 0.71.12) - - React-perflogger (= 0.71.12) - - ReactCommon/turbomodule/core (0.71.12): + - React-callinvoker (= 0.71.15) + - React-Core (= 0.71.15) + - React-cxxreact (= 0.71.15) + - React-jsi (= 0.71.15) + - React-logger (= 0.71.15) + - React-perflogger (= 0.71.15) + - ReactCommon/turbomodule/core (0.71.15): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.71.12) - - React-Core (= 0.71.12) - - React-cxxreact (= 0.71.12) - - React-jsi (= 0.71.12) - - React-logger (= 0.71.12) - - React-perflogger (= 0.71.12) + - React-callinvoker (= 0.71.15) + - React-Core (= 0.71.15) + - React-cxxreact (= 0.71.15) + - React-jsi (= 0.71.15) + - React-logger (= 0.71.15) + - React-perflogger (= 0.71.15) - SocketRocket (0.6.0) - Yoga (1.14.0) - YogaKit (1.18.1): @@ -930,11 +930,11 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - boost: 57d2868c099736d80fcd648bf211b4431e51a558 + boost: 7dcd2de282d72e344012f7d6564d024930a6a440 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 - FBLazyVector: 4eb7ee83e8d0ad7e20a829485295ff48823c4e4c - FBReactNativeSpec: be2df14ea53a93ca2cfcee55312669505eb90c5f + FBLazyVector: d06bbe89e3a89ee90c4deab1c84bf306ffa5ed37 + FBReactNativeSpec: 6fecc43741c2aed59c2bc6ba2c2f486014e03521 Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -946,45 +946,45 @@ SPEC CHECKSUMS: FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - hermes-engine: b60ebc812e0179a612d8146ac54730d533c804a2 + hermes-engine: 04437e4291ede4af0c76c25e7efd0eacb8fd25e5 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef PromisesSwift: cf9eb58666a43bbe007302226e510b16c1e10959 RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 - RCTRequired: 4db5e3e18b906377a502da5b358ff159ba4783ed - RCTTypeSafety: 6c1a8aed043050de0d537336c95cd1be7b66c272 - React: 214e77358d860a3ed707fede9088e7c00663a087 - React-callinvoker: 8fc1c79c26fbcadce2a5d4a3cb4b2ced2dec3436 - React-Codegen: d88c22066f9d685c3f67399aa595f7aa7e8ffc6b - React-Core: ea541085ca5be10b2be289c7d82eba368b5c4900 - React-CoreModules: d9680e1d551eef1dd764df736a473cf25f701070 - React-cxxreact: 0792e80e291d086b2cf588410f6bc6e752bc1d83 - React-Fabric: 223723f622a7cb4f77741a3a01fa91f66963aa18 - React-graphics: fa303eb6c3b52de9a8a9e38c7aab022b1ce6d3d4 - React-hermes: 0b1bba58112cb7421f1166d527a1a05489f48dbc - React-jsi: 1e41088515c4273ef5b118575337df4671851430 - React-jsiexecutor: 509cd947c28834614808ce056ee8eb700a0662aa - React-jsinspector: ec4dcbfb1f4e72f04f826a0301eceee5fa7ca540 - React-logger: 35538accacf2583693fbc3ee8b53e69a1776fcee - react-native-video: fee89269ad07556d960721f3b62e39be6ace3c90 - React-perflogger: 75b0e25075c67565a830985f3c373e2eae5389e0 - React-RCTActionSheet: a0c3e916b327e297d124d9ebe8b0c721840ee04d - React-RCTAnimation: 3da7025801d7bf0f8cfd94574d6278d5b82a8b88 - React-RCTAppDelegate: 2ef2a2b0f14b0b8e2ed91f88084801fadee5dee6 - React-RCTBlob: 53252ebabe7777fd1c440a34546c64e16b162908 - React-RCTFabric: 7667a890d204af8a42683133250251e698c67e5c - React-RCTImage: e230761bd34d71362dd8b3d51b5cd72674935aa0 - React-RCTLinking: 3294b1b540005628168e5a341963b0eddc3932e8 - React-RCTNetwork: 00c6b2215e54a9fb015c53a5e02b0a852dbb8568 - React-RCTSettings: 2e7e4964f45e9b24c6c32ad30b6ab2ef4a7e2ffc - React-RCTText: a9c712b13cab90e1432e0ad113edc8bdbc691248 - React-RCTVibration: a283fefb8cc29d9740a7ff2e87f72ad10f25a433 - React-rncore: 1809ecfc14066404da300c0d950876bf95852f87 - React-runtimeexecutor: 7902246857a4ead4166869e6c42d4df329ff721d - ReactCommon: a6d1c76b9e10b439e41db225263341240e1cda9f + RCTRequired: 4ce9da4fa2f8a134f62c70e4ab9d971b9d640f41 + RCTTypeSafety: decfec2884f0c523f799600d2b6105cdc15e13db + React: ca22a0b3f199b6acac95416ef7eb96cc84a55103 + React-callinvoker: 366d4449bc2901e89da3f30c6d203c491d060350 + React-Codegen: 6fe71a7e025aa51e73b66ebb092d59a2a7701bae + React-Core: 169395096d2c22872e22cd74e3694a4b041cce76 + React-CoreModules: 8c2a970d9fd778e6016b9297f2c2dddbe78b04ec + React-cxxreact: e61b3e92887bb8fc241326b83d667953ff732923 + React-Fabric: f4ddd27dc414581018db9cbdd362c80e77b08eca + React-graphics: 516c3bb35198e4a2531fd52ab6cfc681dad71874 + React-hermes: 476b93736605b457d1bc390336656c94460205b7 + React-jsi: 9fe8766963aa3aea90bbd477ea63255eb847d404 + React-jsiexecutor: e0cde8d57cee18097b3d2b1bf6404ad25dd8d33b + React-jsinspector: 4ade58a6a355d97a53f847543b14f4cb5033cb70 + React-logger: 56699550750c013096a11dce3bc996e7dd583835 + react-native-video: 6078b448c21630b0a2937436527ad54fd2a1fdd8 + React-perflogger: 0cc42978a483a47f3696171dac2e7033936fc82d + React-RCTActionSheet: ea922b476d24f6d40b8e02ac3228412bd3637468 + React-RCTAnimation: 7be2c148398eaa5beac950b2b5ec7102389ec3ad + React-RCTAppDelegate: dc57448e65541509565b59518e8a81e30ae69bd7 + React-RCTBlob: c1e1e53b334f36b3311c3206036c99f4e5406cdf + React-RCTFabric: 42e8e9067f73fdb2e9d12f0b09003cd49d3da139 + React-RCTImage: 4a2cd71dd8c1954cfab50e244b269d47bdcc76da + React-RCTLinking: c8ff9fe7f5741afc05894c7da4a0d2bd1458f247 + React-RCTNetwork: 93c329744baa8c04057a5a29b790618e0c2a6a68 + React-RCTSettings: bcd09cd3ee26967bdfbc8af174404b8ffabfbc3c + React-RCTText: c525eb78cfe9489f130fa69004ff081a5ae33e06 + React-RCTVibration: a97783e3645ddf852e34da2e015656e309f3a083 + React-rncore: 0fc98082b749bad91dbb7a4bca9cb53386477c81 + React-runtimeexecutor: 8f2ddd9db7874ec7de84f5c55d73aeaaf82908e2 + ReactCommon: 309d965cb51f058d07dea65bc04dcf462911f0a4 SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 - Yoga: 39310a10944fc864a7550700de349183450f8aaa + Yoga: 68c9c592c3e80ec37ff28db20eedb13d84aae5df YogaKit: f782866e155069a2cca2517aafea43200b01fd5a PODFILE CHECKSUM: 780eb8fa466e7a1ad2e9200598bc65585b637433 diff --git a/examples/FabricExample/src/VideoPlayer.tsx b/examples/FabricExample/src/VideoPlayer.tsx index 5ec1bc30..34a4776b 100644 --- a/examples/FabricExample/src/VideoPlayer.tsx +++ b/examples/FabricExample/src/VideoPlayer.tsx @@ -11,7 +11,7 @@ import { View, } from 'react-native'; -import Video, {FilterType, VideoRef} from 'react-native-video'; +import Video, {FilterType, VideoRef, ResizeMode, IgnoreSilentSwitchType, MixWithOthersType} from 'react-native-video'; const filterTypes = [ FilterType.NONE, @@ -32,7 +32,26 @@ const filterTypes = [ FilterType.SEPIA, ]; -class VideoPlayer extends Component { +type SkinType = 'custom' | 'native' | 'embed' + +type State = { + rate: number, + volume: number, + muted: boolean, + resizeMode: ResizeMode, + duration: number, + currentTime: number, + controls: boolean, + paused: boolean, + skin: SkinType, + ignoreSilentSwitch: IgnoreSilentSwitchType, + mixWithOthers: MixWithOthersType, + isBuffering: boolean, + filter: FilterType, + filterEnabled: boolean, +} + +class VideoPlayer extends Component<{}, State> { controlRef: React.RefObject; videoRef: React.RefObject; constructor(props: any) { @@ -44,18 +63,18 @@ class VideoPlayer extends Component { this.controlRef = createRef(); this.videoRef = createRef(); } - state = { + state: State = { rate: 1, volume: 1, muted: false, - resizeMode: 'contain', + resizeMode: ResizeMode.CONTAIN, duration: 0.0, currentTime: 0.0, controls: false, paused: true, skin: 'custom', - ignoreSilentSwitch: null, - mixWithOthers: null, + ignoreSilentSwitch: IgnoreSilentSwitchType.IGNORE, + mixWithOthers: MixWithOthersType.DUCK, isBuffering: false, filter: FilterType.NONE, filterEnabled: true, @@ -110,7 +129,7 @@ class VideoPlayer extends Component { }); } - renderSkinControl(skin) { + renderSkinControl(skin: 'custom' | 'native' | 'embed') { const isSelected = this.state.skin == skin; const selectControls = skin == 'native' || skin == 'embed'; return ( @@ -151,7 +170,7 @@ class VideoPlayer extends Component { ); } - renderResizeModeControl(resizeMode: string) { + renderResizeModeControl(resizeMode: ResizeMode) { const isSelected = this.state.resizeMode == resizeMode; return ( @@ -189,7 +208,7 @@ class VideoPlayer extends Component { ); } - renderIgnoreSilentSwitchControl(ignoreSilentSwitch: string) { + renderIgnoreSilentSwitchControl(ignoreSilentSwitch: IgnoreSilentSwitchType) { const isSelected = this.state.ignoreSilentSwitch == ignoreSilentSwitch; return ( @@ -208,7 +227,7 @@ class VideoPlayer extends Component { ); } - renderMixWithOthersControl(mixWithOthers: string) { + renderMixWithOthersControl(mixWithOthers: MixWithOthersType) { const isSelected = this.state.mixWithOthers == mixWithOthers; return ( @@ -302,21 +321,21 @@ class VideoPlayer extends Component { - {this.renderResizeModeControl('cover')} - {this.renderResizeModeControl('contain')} - {this.renderResizeModeControl('stretch')} + {this.renderResizeModeControl(ResizeMode.COVER)} + {this.renderResizeModeControl(ResizeMode.CONTAIN)} + {this.renderResizeModeControl(ResizeMode.STRETCH)} {Platform.OS === 'ios' ? ( <> - {this.renderIgnoreSilentSwitchControl('ignore')} - {this.renderIgnoreSilentSwitchControl('obey')} + {this.renderIgnoreSilentSwitchControl(IgnoreSilentSwitchType.IGNORE)} + {this.renderIgnoreSilentSwitchControl(IgnoreSilentSwitchType.OBEY)} - {this.renderMixWithOthersControl('mix')} - {this.renderMixWithOthersControl('duck')} + {this.renderMixWithOthersControl(MixWithOthersType.MIX)} + {this.renderMixWithOthersControl(MixWithOthersType.DUCK)} ) : null} @@ -410,21 +429,21 @@ class VideoPlayer extends Component { - {this.renderResizeModeControl('cover')} - {this.renderResizeModeControl('contain')} - {this.renderResizeModeControl('stretch')} + {this.renderResizeModeControl(ResizeMode.COVER)} + {this.renderResizeModeControl(ResizeMode.CONTAIN)} + {this.renderResizeModeControl(ResizeMode.STRETCH)} {Platform.OS === 'ios' ? ( <> - {this.renderIgnoreSilentSwitchControl('ignore')} - {this.renderIgnoreSilentSwitchControl('obey')} + {this.renderIgnoreSilentSwitchControl(IgnoreSilentSwitchType.IGNORE)} + {this.renderIgnoreSilentSwitchControl(IgnoreSilentSwitchType.OBEY)} - {this.renderMixWithOthersControl('mix')} - {this.renderMixWithOthersControl('duck')} + {this.renderMixWithOthersControl(MixWithOthersType.MIX)} + {this.renderMixWithOthersControl(MixWithOthersType.DUCK)} ) : null} diff --git a/examples/FabricExample/tsconfig.json b/examples/FabricExample/tsconfig.json index 6c939fc7..4ab8fc69 100644 --- a/examples/FabricExample/tsconfig.json +++ b/examples/FabricExample/tsconfig.json @@ -4,9 +4,10 @@ "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ "paths": { - "react-native-video": ["../../Video.js"] + "react-native-video": ["../../src/index.ts"], + "react": [ "./node_modules/@types/react" ] }, /* Completeness */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ } } diff --git a/examples/basic/ios/Podfile.lock b/examples/basic/ios/Podfile.lock index 7c88cc2f..eb2298c0 100644 --- a/examples/basic/ios/Podfile.lock +++ b/examples/basic/ios/Podfile.lock @@ -889,10 +889,10 @@ PODS: - React-Mapbuffer (0.73.2): - glog - React-debug - - react-native-video (6.0.0-beta.3): + - react-native-video (6.0.0-beta.4): - React-Core - - react-native-video/Video (= 6.0.0-beta.3) - - react-native-video/Video (6.0.0-beta.3): + - react-native-video/Video (= 6.0.0-beta.4) + - react-native-video/Video (6.0.0-beta.4): - PromisesSwift - React-Core - React-nativeconfig (0.73.2) @@ -1235,11 +1235,11 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: d3f49c53809116a5d38da093a8aa78bf551aed09 - DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 + DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 FBLazyVector: fbc4957d9aa695250b55d879c1d86f79d7e69ab4 FBReactNativeSpec: 86de768f89901ef6ed3207cd686362189d64ac88 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b + glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 hermes-engine: b361c9ef5ef3cda53f66e195599b47e1f84ffa35 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4 @@ -1265,7 +1265,7 @@ SPEC CHECKSUMS: React-jsinspector: 03644c063fc3621c9a4e8bf263a8150909129618 React-logger: 66b168e2b2bee57bd8ce9e69f739d805732a5570 React-Mapbuffer: f40e0ea0df8161075390332dfcb0496442c09371 - react-native-video: 60ecad11b7179ec0e2012dea643775b4fca9b224 + react-native-video: 6078b448c21630b0a2937436527ad54fd2a1fdd8 React-nativeconfig: 4dda3cbbdd1c4ce38450bb10b34b3e54120e4a91 React-NativeModulesApple: d25a530c61e94fb317a0124b1cde1c459e4a47d3 React-perflogger: 29efe63b7ef5fbaaa50ef6eaa92482f98a24b97e diff --git a/examples/basic/ios/videoplayer.xcodeproj/project.pbxproj b/examples/basic/ios/videoplayer.xcodeproj/project.pbxproj index a59261a2..a86577c6 100644 --- a/examples/basic/ios/videoplayer.xcodeproj/project.pbxproj +++ b/examples/basic/ios/videoplayer.xcodeproj/project.pbxproj @@ -591,6 +591,15 @@ " ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", " ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", " ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + " ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + " ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + " ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + " ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + " ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + " ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + " ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + " ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + " ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", ); IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( @@ -611,11 +620,7 @@ "-DFOLLY_MOBILE=1", "-DFOLLY_USE_LIBCPP=1", ); - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - "-Wl -ld_classic ", - ); + OTHER_LDFLAGS = "$(inherited)"; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; @@ -678,6 +683,15 @@ " ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", " ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", " ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + " ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + " ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + " ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + " ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + " ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + " ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + " ${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + " ${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + " ${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", ); IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( @@ -697,11 +711,7 @@ "-DFOLLY_MOBILE=1", "-DFOLLY_USE_LIBCPP=1", ); - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - "-Wl -ld_classic ", - ); + OTHER_LDFLAGS = "$(inherited)"; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; diff --git a/ios/Video/DataStructures/VideoSource.swift b/ios/Video/DataStructures/VideoSource.swift index e9495a33..e2b83bb8 100644 --- a/ios/Video/DataStructures/VideoSource.swift +++ b/ios/Video/DataStructures/VideoSource.swift @@ -40,7 +40,17 @@ struct VideoSource { self.isNetwork = json["isNetwork"] as? Bool ?? false self.isAsset = json["isAsset"] as? Bool ?? false self.shouldCache = json["shouldCache"] as? Bool ?? false - self.requestHeaders = json["requestHeaders"] as? [String: Any] + if let requestHeaders = json["requestHeaders"] as? [[String: Any]] { + var _requestHeaders: [String: Any] = [:] + for requestHeader in requestHeaders { + if let key = requestHeader["key"] as? String, let value = requestHeader["value"] { + _requestHeaders[key] = value + } + } + self.requestHeaders = _requestHeaders + } else { + self.requestHeaders = nil + } self.startPosition = json["startPosition"] as? Int64 self.cropStart = json["cropStart"] as? Int64 self.cropEnd = json["cropEnd"] as? Int64 diff --git a/package.json b/package.json index 196b9b43..f15c017e 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "jest": "^29.7.0", "prettier": "^2.4.1", "react": "18.2.0", - "react-native": "0.72.5", + "react-native": "0.73.2", "react-native-windows": "^0.61.0-0", "release-it": "^16.2.1", "typescript": "5.1.6" @@ -47,7 +47,8 @@ "release": "release-it", "test": "echo no test available", "check-ios": "scripts/swift-format.sh && scripts/swift-lint.sh && scripts/clang-format.sh", - "check-android": "scripts/kotlin-lint.sh" + "check-android": "scripts/kotlin-lint.sh", + "codegen": "node ./node_modules/react-native/scripts/generate-codegen-artifacts.js --path ./ ./output" }, "files": [ "android", @@ -63,5 +64,10 @@ "!**/*.tsbuildinfo", "!docs", "!examples" - ] + ], + "codegenConfig": { + "name": "RNCVideo", + "type": "components", + "jsSrcsDir": "./src/specs" + } } diff --git a/src/Video.tsx b/src/Video.tsx index e0abfbbb..0917481f 100644 --- a/src/Video.tsx +++ b/src/Video.tsx @@ -9,34 +9,37 @@ import React, { } from 'react'; import {View, StyleSheet, Image, Platform} from 'react-native'; import NativeVideoComponent, { + type OnAudioFocusChangedData, + type OnAudioTracksData, + type OnBandwidthUpdateData, + type OnBufferData, + type OnExternalPlaybackChangeData, + type OnGetLicenseData, + type OnLoadData, + type OnLoadStartData, + type OnPictureInPictureStatusChangedData, + type OnPlaybackStateChangedData, + type OnProgressData, + type OnReceiveAdEventData, + type OnSeekData, + type OnTextTrackDataChangedData, + type OnTextTracksData, + type OnTimedMetadataData, + type OnVideoAspectRatioData, + type OnVideoErrorData, + type OnVideoTracksData, type VideoComponentType, -} from './VideoNativeComponent'; + type VideoSrc, +} from './specs/VideoNativeComponent'; import type {StyleProp, ImageStyle, NativeSyntheticEvent} from 'react-native'; -import {getReactTag, resolveAssetSourceForVideo} from './utils'; -import {VideoManager} from './VideoNativeComponent'; -import type { - OnAudioFocusChangedData, - OnAudioTracksData, - OnBandwidthUpdateData, - OnBufferData, - OnExternalPlaybackChangeData, - OnGetLicenseData, - OnLoadData, - OnLoadStartData, - OnPictureInPictureStatusChangedData, - OnPlaybackStateChangedData, - OnProgressData, - OnReceiveAdEventData, - OnSeekData, - OnTextTrackDataChangedData, - OnTextTracksData, - OnTimedMetadataData, - OnVideoAspectRatioData, - OnVideoErrorData, - OnVideoTracksData, - ReactVideoProps, -} from './types'; +import { + generateHeaderForNative, + getReactTag, + resolveAssetSourceForVideo, +} from './utils'; +import {VideoManager} from './specs/VideoNativeComponent'; +import type {ReactVideoProps} from './types/video'; export type VideoSaveData = { uri: string; @@ -120,11 +123,10 @@ const Video = forwardRef( [posterResizeMode], ); - const src = useMemo(() => { + const src = useMemo(() => { if (!source) { return undefined; } - const resolvedSource = resolveAssetSourceForVideo(source); let uri = resolvedSource.uri || ''; if (uri && uri.match(/^\//)) { @@ -149,7 +151,7 @@ const Video = forwardRef( type: resolvedSource.type || '', mainVer: resolvedSource.mainVer || 0, patchVer: resolvedSource.patchVer || 0, - requestHeaders: resolvedSource.headers || {}, + requestHeaders: generateHeaderForNative(resolvedSource.headers), startPosition: resolvedSource.startPosition ?? -1, cropStart: resolvedSource.cropStart || 0, cropEnd: resolvedSource.cropEnd, @@ -168,7 +170,7 @@ const Video = forwardRef( return { type: drm.type, licenseServer: drm.licenseServer, - headers: drm.headers, + headers: generateHeaderForNative(drm.headers), contentId: drm.contentId, certificateUrl: drm.certificateUrl, base64Certificate: drm.base64Certificate, @@ -180,10 +182,13 @@ const Video = forwardRef( if (!selectedTextTrack) { return; } + const value = selectedTextTrack.value + ? `${selectedTextTrack.value}` + : undefined; return { type: selectedTextTrack?.type, - value: selectedTextTrack?.value, + value, }; }, [selectedTextTrack]); @@ -191,10 +196,13 @@ const Video = forwardRef( if (!selectedAudioTrack) { return; } + const value = selectedAudioTrack.value + ? `${selectedAudioTrack.value}` + : undefined; return { type: selectedAudioTrack?.type, - value: selectedAudioTrack?.value, + value, }; }, [selectedAudioTrack]); diff --git a/src/VideoNativeComponent.ts b/src/VideoNativeComponent.ts deleted file mode 100644 index b5c9b982..00000000 --- a/src/VideoNativeComponent.ts +++ /dev/null @@ -1,418 +0,0 @@ -import type { - HostComponent, - NativeSyntheticEvent, - ViewProps, -} from 'react-native'; -import {NativeModules, requireNativeComponent} from 'react-native'; -import type ResizeMode from './types/ResizeMode'; -import type FilterType from './types/FilterType'; -import type Orientation from './types/Orientation'; -import type { - AdEvent, - EnumValues, - OnTextTrackDataChangedData, - OnTextTracksTypeData, -} from './types'; - -// -------- There are types for native component (future codegen) -------- -// if you are looking for types for react component, see src/types/video.ts - -type Headers = Record; - -type VideoSrc = Readonly<{ - uri?: string; - isNetwork?: boolean; - isAsset?: boolean; - shouldCache?: boolean; - type?: string; - mainVer?: number; - patchVer?: number; - requestHeaders?: Headers; - startPosition?: number; - cropStart?: number; - cropEnd?: number; - title?: string; - subtitle?: string; - description?: string; - customImageUri?: string; -}>; - -export type Filter = - | 'None' - | 'CIColorInvert' - | 'CIColorMonochrome' - | 'CIColorPosterize' - | 'CIFalseColor' - | 'CIMaximumComponent' - | 'CIMinimumComponent' - | 'CIPhotoEffectChrome' - | 'CIPhotoEffectFade' - | 'CIPhotoEffectInstant' - | 'CIPhotoEffectMono' - | 'CIPhotoEffectNoir' - | 'CIPhotoEffectProcess' - | 'CIPhotoEffectTonal' - | 'CIPhotoEffectTransfer' - | 'CISepiaTone'; - -export type DRMType = 'widevine' | 'playready' | 'clearkey' | 'fairplay'; - -type DebugConfig = Readonly<{ - enable?: boolean; - thread?: boolean; -}>; - -type Drm = Readonly<{ - type?: DRMType; - licenseServer?: string; - headers?: Headers; - contentId?: string; // ios - certificateUrl?: string; // ios - base64Certificate?: boolean; // ios default: false - useExternalGetLicense?: boolean; // ios -}>; - -type TextTracks = ReadonlyArray< - Readonly<{ - title: string; - language: string; - type: string; - uri: string; - }> ->; - -type TextTrackType = 'system' | 'disabled' | 'title' | 'language' | 'index'; - -type SelectedTextTrack = Readonly<{ - type: TextTrackType; - value?: string | number; -}>; - -type AudioTrackType = 'system' | 'disabled' | 'title' | 'language' | 'index'; - -type SelectedAudioTrack = Readonly<{ - type: AudioTrackType; - value?: string | number; -}>; - -export type Seek = Readonly<{ - time: number; - tolerance?: number; -}>; - -type BufferConfig = Readonly<{ - minBufferMs?: number; - maxBufferMs?: number; - bufferForPlaybackMs?: number; - bufferForPlaybackAfterRebufferMs?: number; - maxHeapAllocationPercent?: number; - minBackBufferMemoryReservePercent?: number; - minBufferMemoryReservePercent?: number; -}>; - -type SelectedVideoTrack = Readonly<{ - type: 'auto' | 'disabled' | 'resolution' | 'index'; - value?: number; -}>; - -type SubtitleStyle = Readonly<{ - fontSize?: number; - paddingTop?: number; - paddingBottom?: number; - paddingLeft?: number; - paddingRight?: number; -}>; - -export type OnLoadData = Readonly<{ - currentTime: number; - duration: number; - naturalSize: Readonly<{ - width: number; - height: number; - orientation: Orientation; - }>; -}> & - OnAudioTracksData & - OnTextTracksData; - -export type OnLoadStartData = Readonly<{ - isNetwork: boolean; - type: string; - uri: string; -}>; - -export type OnVideoAspectRatioData = Readonly<{ - width: number; - height: number; -}>; - -export type OnBufferData = Readonly<{isBuffering: boolean}>; - -export type OnProgressData = Readonly<{ - currentTime: number; - playableDuration: number; - seekableDuration: number; -}>; - -export type OnBandwidthUpdateData = Readonly<{ - bitrate: number; - width?: number; - height?: number; - trackId?: number; -}>; - -export type OnSeekData = Readonly<{ - currentTime: number; - seekTime: number; -}>; - -export type OnPlaybackStateChangedData = Readonly<{ - isPlaying: boolean; -}>; - -export type OnTimedMetadataData = Readonly<{ - metadata: ReadonlyArray< - Readonly<{ - value?: string; - identifier: string; - }> - >; -}>; - -export type OnAudioTracksData = Readonly<{ - audioTracks: ReadonlyArray< - Readonly<{ - index: number; - title?: string; - language?: string; - bitrate?: number; - type?: string; - selected?: boolean; - }> - >; -}>; - -export type OnTextTracksData = Readonly<{ - textTracks: ReadonlyArray< - Readonly<{ - index: number; - title?: string; - language?: string; - /** - * iOS only supports VTT, Android supports all 3 - */ - type?: OnTextTracksTypeData; - selected?: boolean; - }> - >; -}>; - -export type OnVideoTracksData = Readonly<{ - videoTracks: ReadonlyArray< - Readonly<{ - trackId: number; - codecs?: string; - width?: number; - height?: number; - bitrate?: number; - selected?: boolean; - }> - >; -}>; - -export type OnPlaybackData = Readonly<{ - playbackRate: number; -}>; - -export type onVolumeChangeData = Readonly<{ - volume: number; -}>; - -export type OnExternalPlaybackChangeData = Readonly<{ - isExternalPlaybackActive: boolean; -}>; - -export type OnGetLicenseData = Readonly<{ - licenseUrl: string; - contentId: string; - spcBase64: string; -}>; - -export type OnPictureInPictureStatusChangedData = Readonly<{ - isActive: boolean; -}>; - -export type OnReceiveAdEventData = Readonly<{ - data?: Record; - event: AdEvent; -}>; - -export type OnVideoErrorData = Readonly<{ - error: OnVideoErrorDataDetails; - target?: number; // ios -}>; - -export type OnVideoErrorDataDetails = Readonly<{ - errorString?: string; // android - errorException?: string; // android - errorStackTrace?: string; // android - errorCode?: string; // android - error?: string; // ios - code?: number; // ios - localizedDescription?: string; // ios - localizedFailureReason?: string; // ios - localizedRecoverySuggestion?: string; // ios - domain?: string; // ios -}>; - -export type OnAudioFocusChangedData = Readonly<{ - hasAudioFocus: boolean; -}>; - -export interface VideoNativeProps extends ViewProps { - src?: VideoSrc; - drm?: Drm; - adTagUrl?: string; - allowsExternalPlayback?: boolean; // ios, true - maxBitRate?: number; - resizeMode?: EnumValues; - repeat?: boolean; - automaticallyWaitsToMinimizeStalling?: boolean; - textTracks?: TextTracks; - selectedTextTrack?: SelectedTextTrack; - selectedAudioTrack?: SelectedAudioTrack; - paused?: boolean; - muted?: boolean; - controls?: boolean; - filter?: EnumValues; - filterEnabled?: boolean; - volume?: number; // default 1.0 - playInBackground?: boolean; - preventsDisplaySleepDuringVideoPlayback?: boolean; - preferredForwardBufferDuration?: number; //ios, 0 - playWhenInactive?: boolean; // ios, false - pictureInPicture?: boolean; // ios, false - ignoreSilentSwitch?: 'inherit' | 'ignore' | 'obey'; // ios, 'inherit' - mixWithOthers?: 'inherit' | 'mix' | 'duck'; // ios, 'inherit' - rate?: number; - fullscreen?: boolean; // ios, false - fullscreenAutorotate?: boolean; - fullscreenOrientation?: 'all' | 'landscape' | 'portrait'; - progressUpdateInterval?: number; - restoreUserInterfaceForPIPStopCompletionHandler?: boolean; - localSourceEncryptionKeyScheme?: string; - debug?: DebugConfig; - - backBufferDurationMs?: number; // Android - bufferConfig?: BufferConfig; // Android - contentStartTime?: number; // Android - currentPlaybackTime?: number; // Android - disableDisconnectError?: boolean; // Android - focusable?: boolean; // Android - hideShutterView?: boolean; // Android - minLoadRetryCount?: number; // Android - reportBandwidth?: boolean; //Android - selectedVideoTrack?: SelectedVideoTrack; // android - subtitleStyle?: SubtitleStyle; // android - shutterColor?: string; // Android - trackId?: string; // Android - useTextureView?: boolean; // Android - useSecureView?: boolean; // Android - onVideoLoad?: (event: NativeSyntheticEvent) => void; - onVideoLoadStart?: (event: NativeSyntheticEvent) => void; - onVideoAspectRatio?: ( - event: NativeSyntheticEvent, - ) => void; - onVideoBuffer?: (event: NativeSyntheticEvent) => void; - onVideoError?: (event: NativeSyntheticEvent) => void; - onVideoProgress?: (event: NativeSyntheticEvent) => void; - onVideoBandwidthUpdate?: ( - event: NativeSyntheticEvent, - ) => void; - onVideoSeek?: (event: NativeSyntheticEvent) => void; - onVideoEnd?: (event: NativeSyntheticEvent>) => void; // all - onVideoAudioBecomingNoisy?: ( - event: NativeSyntheticEvent>, - ) => void; - onVideoFullscreenPlayerWillPresent?: ( - event: NativeSyntheticEvent>, - ) => void; // ios, android - onVideoFullscreenPlayerDidPresent?: ( - event: NativeSyntheticEvent>, - ) => void; // ios, android - onVideoFullscreenPlayerWillDismiss?: ( - event: NativeSyntheticEvent>, - ) => void; // ios, android - onVideoFullscreenPlayerDidDismiss?: ( - event: NativeSyntheticEvent>, - ) => void; // ios, android - onReadyForDisplay?: (event: NativeSyntheticEvent>) => void; - onPlaybackRateChange?: (event: NativeSyntheticEvent) => void; // all - onVolumeChange?: (event: NativeSyntheticEvent) => void; // android, ios - onVideoExternalPlaybackChange?: ( - event: NativeSyntheticEvent, - ) => void; - onGetLicense?: (event: NativeSyntheticEvent) => void; - onPictureInPictureStatusChanged?: ( - event: NativeSyntheticEvent, - ) => void; - onRestoreUserInterfaceForPictureInPictureStop?: ( - event: NativeSyntheticEvent>, - ) => void; - onReceiveAdEvent?: ( - event: NativeSyntheticEvent, - ) => void; - onVideoPlaybackStateChanged?: ( - event: NativeSyntheticEvent, - ) => void; // android only - onVideoIdle?: (event: NativeSyntheticEvent) => void; // android only (nowhere in document, so do not use as props. just type declaration) - onAudioFocusChanged?: ( - event: NativeSyntheticEvent, - ) => void; // android only (nowhere in document, so do not use as props. just type declaration) - onTimedMetadata?: (event: NativeSyntheticEvent) => void; // ios, android - onAudioTracks?: (event: NativeSyntheticEvent) => void; // android - onTextTracks?: (event: NativeSyntheticEvent) => void; // android - onTextTrackDataChanged?: ( - event: NativeSyntheticEvent, - ) => void; // iOS - onVideoTracks?: (event: NativeSyntheticEvent) => void; // android -} - -export type VideoComponentType = HostComponent; - -export type VideoSaveData = { - uri: string; -}; - -export interface VideoManagerType { - save: (option: object, reactTag: number) => Promise; - setPlayerPauseState: (paused: boolean, reactTag: number) => Promise; - setLicenseResult: ( - result: string, - licenseUrl: string, - reactTag: number, - ) => Promise; - setLicenseResultError: ( - error: string, - licenseUrl: string, - reactTag: number, - ) => Promise; -} - -export interface VideoDecoderPropertiesType { - getWidevineLevel: () => Promise; - isCodecSupported: ( - mimeType: string, - width: number, - height: number, - ) => Promise<'unsupported' | 'hardware' | 'software'>; - isHEVCSupported: () => Promise<'unsupported' | 'hardware' | 'software'>; -} - -export const VideoManager = NativeModules.VideoManager as VideoManagerType; -export const VideoDecoderProperties = - NativeModules.VideoDecoderProperties as VideoDecoderPropertiesType; - -export default requireNativeComponent( - 'RCTVideo', -) as VideoComponentType; diff --git a/src/index.ts b/src/index.ts index 331d8065..56fd87d2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ import Video from './Video'; -export {VideoDecoderProperties} from './VideoNativeComponent'; +export {VideoDecoderProperties} from './specs/VideoNativeComponent'; export * from './types'; export type {VideoRef} from './Video'; export default Video; diff --git a/src/specs/VideoNativeComponent.ts b/src/specs/VideoNativeComponent.ts new file mode 100644 index 00000000..dcebc63a --- /dev/null +++ b/src/specs/VideoNativeComponent.ts @@ -0,0 +1,567 @@ +/* eslint-disable @typescript-eslint/ban-types */ +import type {HostComponent, ViewProps} from 'react-native'; +import {NativeModules} from 'react-native'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +import type { + DirectEventHandler, + Double, + Float, + Int32, + WithDefault, +} from 'react-native/Libraries/Types/CodegenTypes'; + +// -------- There are types for native component (future codegen) -------- +// if you are looking for types for react component, see src/types/video.ts + +type Headers = ReadonlyArray< + Readonly<{ + key: string; + value: string; + }> +>; + +export type VideoSrc = Readonly<{ + uri?: string; + isNetwork?: boolean; + isAsset?: boolean; + shouldCache?: boolean; + type?: string; + mainVer?: Int32; + patchVer?: Int32; + requestHeaders?: Headers; + startPosition?: Float; + cropStart?: Float; + cropEnd?: Float; + title?: string; + subtitle?: string; + description?: string; + customImageUri?: string; +}>; + +type DRMType = WithDefault< + 'widevine' | 'playready' | 'clearkey' | 'fairplay', + 'widevine' +>; + +type DebugConfig = Readonly<{ + enable?: boolean; + thread?: boolean; +}>; + +type Drm = Readonly<{ + type?: DRMType; + licenseServer?: string; + headers?: Headers; + contentId?: string; // ios + certificateUrl?: string; // ios + base64Certificate?: boolean; // ios default: false + useExternalGetLicense?: boolean; // ios +}>; + +type TextTracks = ReadonlyArray< + Readonly<{ + title: string; + language: string; + type: string; + uri: string; + }> +>; + +type SelectedTextTrackType = WithDefault< + 'system' | 'disabled' | 'title' | 'language' | 'index', + 'system' +>; + +type SelectedAudioTrackType = WithDefault< + 'system' | 'disabled' | 'title' | 'language' | 'index', + 'system' +>; + +type SelectedTextTrack = Readonly<{ + type?: SelectedTextTrackType; + value?: string; +}>; + +type SelectedAudioTrack = Readonly<{ + type?: SelectedAudioTrackType; + value?: string; +}>; + +type SelectedVideoTrackType = WithDefault< + 'auto' | 'disabled' | 'resolution' | 'index', + 'auto' +>; + +type SelectedVideoTrack = Readonly<{ + type?: SelectedVideoTrackType; + value?: Int32; +}>; + +export type Seek = Readonly<{ + time: Float; + tolerance?: Float; +}>; + +type BufferConfig = Readonly<{ + minBufferMs?: Float; + maxBufferMs?: Float; + bufferForPlaybackMs?: Float; + bufferForPlaybackAfterRebufferMs?: Float; + maxHeapAllocationPercent?: Float; + minBackBufferMemoryReservePercent?: Float; + minBufferMemoryReservePercent?: Float; +}>; + +type SubtitleStyle = Readonly<{ + fontSize?: Float; + paddingTop?: WithDefault; + paddingBottom?: WithDefault; + paddingLeft?: WithDefault; + paddingRight?: WithDefault; +}>; + +export type OnLoadData = Readonly<{ + currentTime: Float; + duration: Float; + naturalSize: Readonly<{ + width: Float; + height: Float; + orientation: WithDefault<'landscape' | 'portrait', 'landscape'>; + }>; + audioTracks: { + index: Int32; + title?: string; + language?: string; + bitrate?: Float; + type?: string; + selected?: boolean; + }[]; + textTracks: { + index: Int32; + title?: string; + language?: string; + /** + * iOS only supports VTT, Android supports all 3 + */ + type?: WithDefault<'srt' | 'ttml' | 'vtt', 'srt'>; + selected?: boolean; + }[]; +}>; + +export type OnLoadStartData = Readonly<{ + isNetwork: boolean; + type: string; + uri: string; +}>; + +export type OnVideoAspectRatioData = Readonly<{ + width: Float; + height: Float; +}>; + +export type OnBufferData = Readonly<{isBuffering: boolean}>; + +export type OnProgressData = Readonly<{ + currentTime: Float; + playableDuration: Float; + seekableDuration: Float; +}>; + +export type OnBandwidthUpdateData = Readonly<{ + bitrate: Int32; + width?: Float; + height?: Float; + trackId?: Int32; +}>; + +export type OnSeekData = Readonly<{ + currentTime: Float; + seekTime: Float; +}>; + +export type OnPlaybackStateChangedData = Readonly<{ + isPlaying: boolean; +}>; + +export type OnTimedMetadataData = Readonly<{ + metadata: { + value?: string; + identifier: string; + }[]; +}>; + +export type OnAudioTracksData = Readonly<{ + audioTracks: { + index: Int32; + title?: string; + language?: string; + bitrate?: Float; + type?: string; + selected?: boolean; + }[]; +}>; + +export type OnTextTracksData = Readonly<{ + textTracks: { + index: Int32; + title?: string; + language?: string; + /** + * iOS only supports VTT, Android supports all 3 + */ + type?: WithDefault<'srt' | 'ttml' | 'vtt', 'srt'>; + selected?: boolean; + }[]; +}>; + +export type OnTextTrackDataChangedData = Readonly<{ + subtitleTracks: string; +}>; + +export type OnVideoTracksData = Readonly<{ + videoTracks: { + trackId: Int32; + codecs?: string; + width?: Float; + height?: Float; + bitrate?: Float; + selected?: boolean; + }[]; +}>; + +export type OnPlaybackData = Readonly<{ + playbackRate: Float; +}>; + +export type OnVolumeChangeData = Readonly<{ + volume: Float; +}>; + +export type OnExternalPlaybackChangeData = Readonly<{ + isExternalPlaybackActive: boolean; +}>; + +export type OnGetLicenseData = Readonly<{ + licenseUrl: string; + contentId: string; + spcBase64: string; +}>; + +export type OnPictureInPictureStatusChangedData = Readonly<{ + isActive: boolean; +}>; + +export type OnReceiveAdEventData = Readonly<{ + data?: {}; + event: WithDefault< + /** + * iOS only: Fired the first time each ad break ends. Applications must reenable seeking when this occurs (only used for dynamic ad insertion). + */ | 'AD_BREAK_ENDED' + /** + * Fires when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false. + */ + | 'AD_BREAK_READY' + /** + * iOS only: Fired first time each ad break begins playback. If an ad break is watched subsequent times this will not be fired. Applications must disable seeking when this occurs (only used for dynamic ad insertion). + */ + | 'AD_BREAK_STARTED' + /** + * Android only: Fires when the ad has stalled playback to buffer. + */ + | 'AD_BUFFERING' + /** + * Android only: Fires when the ad is ready to play without buffering, either at the beginning of the ad or after buffering completes. + */ + | 'AD_CAN_PLAY' + /** + * Android only: Fires when an ads list is loaded. + */ + | 'AD_METADATA' + /** + * iOS only: Fired every time the stream switches from advertising or slate to content. This will be fired even when an ad is played a second time or when seeking into an ad (only used for dynamic ad insertion). + */ + | 'AD_PERIOD_ENDED' + /** + * iOS only: Fired every time the stream switches from content to advertising or slate. This will be fired even when an ad is played a second time or when seeking into an ad (only used for dynamic ad insertion). + */ + | 'AD_PERIOD_STARTED' + /** + * Android only: Fires when the ad's current time value changes. The event `data` will be populated with an AdProgressData object. + */ + | 'AD_PROGRESS' + /** + * Fires when the ads manager is done playing all the valid ads in the ads response, or when the response doesn't return any valid ads. + */ + | 'ALL_ADS_COMPLETED' + /** + * Fires when the ad is clicked. + */ + | 'CLICK' + /** + * Fires when the ad completes playing. + */ + | 'COMPLETED' + /** + * Android only: Fires when content should be paused. This usually happens right before an ad is about to cover the content. + */ + | 'CONTENT_PAUSE_REQUESTED' + /** + * Android only: Fires when content should be resumed. This usually happens when an ad finishes or collapses. + */ + | 'CONTENT_RESUME_REQUESTED' + /** + * iOS only: Cuepoints changed for VOD stream (only used for dynamic ad insertion). + */ + | 'CUEPOINTS_CHANGED' + /** + * Android only: Fires when the ad's duration changes. + */ + | 'DURATION_CHANGE' + /** + * Fires when an error is encountered and the ad can't be played. + */ + | 'ERROR' + /** + * Fires when the ad playhead crosses first quartile. + */ + | 'FIRST_QUARTILE' + /** + * Android only: Fires when the impression URL has been pinged. + */ + | 'IMPRESSION' + /** + * Android only: Fires when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data. + */ + | 'INTERACTION' + /** + * Android only: Fires when the displayed ad changes from linear to nonlinear, or the reverse. + */ + | 'LINEAR_CHANGED' + /** + * Fires when ad data is available. + */ + | 'LOADED' + /** + * Fires when a non-fatal error is encountered. The user need not take any action since the SDK will continue with the same or next ad playback depending on the error situation. + */ + | 'LOG' + /** + * Fires when the ad playhead crosses midpoint. + */ + | 'MIDPOINT' + /** + * Fires when the ad is paused. + */ + | 'PAUSED' + /** + * Fires when the ad is resumed. + */ + | 'RESUMED' + /** + * Android only: Fires when the displayed ads skippable state is changed. + */ + | 'SKIPPABLE_STATE_CHANGED' + /** + * Fires when the ad is skipped by the user. + */ + | 'SKIPPED' + /** + * Fires when the ad starts playing. + */ + | 'STARTED' + /** + * iOS only: Stream request has loaded (only used for dynamic ad insertion). + */ + | 'STREAM_LOADED' + /** + * iOS only: Fires when the ad is tapped. + */ + | 'TAPPED' + /** + * Fires when the ad playhead crosses third quartile. + */ + | 'THIRD_QUARTILE' + /** + * iOS only: An unknown event has fired + */ + | 'UNKNOWN' + /** + * Android only: Fires when the ad is closed by the user. + */ + | 'USER_CLOSE' + /** + * Android only: Fires when the non-clickthrough portion of a video ad is clicked. + */ + | 'VIDEO_CLICKED' + /** + * Android only: Fires when a user clicks a video icon. + */ + | 'VIDEO_ICON_CLICKED' + /** + * Android only: Fires when the ad volume has changed. + */ + | 'VOLUME_CHANGED' + /** + * Android only: Fires when the ad volume has been muted. + */ + | 'VOLUME_MUTED', + 'AD_BREAK_ENDED' + >; +}>; + +export type OnVideoErrorData = Readonly<{ + error: Readonly<{ + errorString?: string; // android + errorException?: string; // android + errorStackTrace?: string; // android + errorCode?: string; // android + error?: string; // ios + code?: Int32; // ios + localizedDescription?: string; // ios + localizedFailureReason?: string; // ios + localizedRecoverySuggestion?: string; // ios + domain?: string; // ios + }>; + target?: Int32; // ios +}>; + +export type OnAudioFocusChangedData = Readonly<{ + hasAudioFocus: boolean; +}>; + +export interface VideoNativeProps extends ViewProps { + src?: VideoSrc; + drm?: Drm; + adTagUrl?: string; + allowsExternalPlayback?: boolean; // ios, true + maxBitRate?: Float; + resizeMode?: WithDefault<'none' | 'contain' | 'cover' | 'stretch', 'none'>; + repeat?: boolean; + automaticallyWaitsToMinimizeStalling?: boolean; + textTracks?: TextTracks; + selectedTextTrack?: SelectedTextTrack; + selectedAudioTrack?: SelectedAudioTrack; + selectedVideoTrack?: SelectedVideoTrack; // android + paused?: boolean; + muted?: boolean; + controls?: boolean; + filter?: WithDefault< + | '' + | 'CIColorInvert' + | 'CIColorMonochrome' + | 'CIColorPosterize' + | 'CIFalseColor' + | 'CIMaximumComponent' + | 'CIMinimumComponent' + | 'CIPhotoEffectChrome' + | 'CIPhotoEffectFade' + | 'CIPhotoEffectInstant' + | 'CIPhotoEffectMono' + | 'CIPhotoEffectNoir' + | 'CIPhotoEffectProcess' + | 'CIPhotoEffectTonal' + | 'CIPhotoEffectTransfer' + | 'CISepiaTone', + '' + >; + filterEnabled?: boolean; + volume?: Float; // default 1.0 + playInBackground?: boolean; + preventsDisplaySleepDuringVideoPlayback?: boolean; + preferredForwardBufferDuration?: Float; //ios, 0 + playWhenInactive?: boolean; // ios, false + pictureInPicture?: boolean; // ios, false + ignoreSilentSwitch?: WithDefault<'inherit' | 'ignore' | 'obey', 'inherit'>; // ios, 'inherit' + mixWithOthers?: WithDefault<'inherit' | 'mix' | 'duck', 'inherit'>; // ios, 'inherit' + rate?: Float; + fullscreen?: boolean; // ios, false + fullscreenAutorotate?: boolean; + fullscreenOrientation?: WithDefault<'all' | 'landscape' | 'portrait', 'all'>; + progressUpdateInterval?: Float; + restoreUserInterfaceForPIPStopCompletionHandler?: boolean; + localSourceEncryptionKeyScheme?: string; + debug?: DebugConfig; + + backBufferDurationMs?: Int32; // Android + bufferConfig?: BufferConfig; // Android + contentStartTime?: Int32; // Android + currentPlaybackTime?: Double; // Android + disableDisconnectError?: boolean; // Android + focusable?: boolean; // Android + hideShutterView?: boolean; // Android + minLoadRetryCount?: Int32; // Android + reportBandwidth?: boolean; //Android + subtitleStyle?: SubtitleStyle; // android + trackId?: string; // Android + useTextureView?: boolean; // Android + useSecureView?: boolean; // Android + onVideoLoad?: DirectEventHandler; + onVideoLoadStart?: DirectEventHandler; + onVideoAspectRatio?: DirectEventHandler; + onVideoBuffer?: DirectEventHandler; + onVideoError?: DirectEventHandler; + onVideoProgress?: DirectEventHandler; + onVideoBandwidthUpdate?: DirectEventHandler; + onVideoSeek?: DirectEventHandler; + onVideoEnd?: DirectEventHandler<{}>; // all + onVideoAudioBecomingNoisy?: DirectEventHandler<{}>; + onVideoFullscreenPlayerWillPresent?: DirectEventHandler<{}>; // ios, android + onVideoFullscreenPlayerDidPresent?: DirectEventHandler<{}>; // ios, android + onVideoFullscreenPlayerWillDismiss?: DirectEventHandler<{}>; // ios, android + onVideoFullscreenPlayerDidDismiss?: DirectEventHandler<{}>; // ios, android + onReadyForDisplay?: DirectEventHandler<{}>; + onPlaybackRateChange?: DirectEventHandler; // all + onVolumeChange?: DirectEventHandler; // android, ios + onVideoExternalPlaybackChange?: DirectEventHandler; + onGetLicense?: DirectEventHandler; + onPictureInPictureStatusChanged?: DirectEventHandler; + onRestoreUserInterfaceForPictureInPictureStop?: DirectEventHandler<{}>; + onReceiveAdEvent?: DirectEventHandler; + onVideoPlaybackStateChanged?: DirectEventHandler; // android only + onVideoIdle?: DirectEventHandler<{}>; // android only (nowhere in document, so do not use as props. just type declaration) + onAudioFocusChanged?: DirectEventHandler; // android only (nowhere in document, so do not use as props. just type declaration) + onTimedMetadata?: DirectEventHandler; // ios, android + onAudioTracks?: DirectEventHandler; // android + onTextTracks?: DirectEventHandler; // android + onTextTrackDataChanged?: DirectEventHandler; // iOS + onVideoTracks?: DirectEventHandler; // android +} + +export type VideoComponentType = HostComponent; + +export type VideoSaveData = { + uri: string; +}; + +export interface VideoManagerType { + save: (option: object, reactTag: number) => Promise; + setPlayerPauseState: (paused: boolean, reactTag: number) => Promise; + setLicenseResult: ( + result: string, + licenseUrl: string, + reactTag: number, + ) => Promise; + setLicenseResultError: ( + error: string, + licenseUrl: string, + reactTag: number, + ) => Promise; +} + +export interface VideoDecoderPropertiesType { + getWidevineLevel: () => Promise; + isCodecSupported: ( + mimeType: string, + width: number, + height: number, + ) => Promise<'unsupported' | 'hardware' | 'software'>; + isHEVCSupported: () => Promise<'unsupported' | 'hardware' | 'software'>; +} + +export const VideoManager = NativeModules.VideoManager as VideoManagerType; +export const VideoDecoderProperties = + NativeModules.VideoDecoderProperties as VideoDecoderPropertiesType; + +export default codegenNativeComponent( + 'RCTVideo', +) as VideoComponentType; diff --git a/src/types/events.ts b/src/types/events.ts index 9982eda5..291ee0bc 100644 --- a/src/types/events.ts +++ b/src/types/events.ts @@ -1,160 +1,28 @@ -import type Orientation from './Orientation'; -import type {AdEvent} from './Ads'; +import type { + OnAudioFocusChangedData, + OnAudioTracksData, + OnBandwidthUpdateData, + OnBufferData, + OnExternalPlaybackChangeData, + OnLoadData, + OnLoadStartData, + OnPictureInPictureStatusChangedData, + OnPlaybackData, + OnPlaybackStateChangedData, + OnProgressData, + OnReceiveAdEventData, + OnSeekData, + OnTextTrackDataChangedData, + OnTextTracksData, + OnTimedMetadataData, + OnVideoAspectRatioData, + OnVideoErrorData, + OnVideoTracksData, + OnVolumeChangeData, +} from '../specs/VideoNativeComponent'; -export type OnLoadData = Readonly<{ - currentTime: number; - duration: number; - naturalSize: Readonly<{ - width: number; - height: number; - orientation: Orientation; - }>; -}> & - OnAudioTracksData & - OnTextTracksData; - -export type OnVideoAspectRatioData = Readonly<{ - width: number; - height: number; -}>; - -export type OnLoadStartData = Readonly<{ - isNetwork: boolean; - type: string; - uri: string; -}>; - -export type OnProgressData = Readonly<{ - currentTime: number; - playableDuration: number; - seekableDuration: number; -}>; - -export type OnSeekData = Readonly<{ - currentTime: number; - seekTime: number; -}>; - -export type OnPlaybackStateChangedData = Readonly<{ - isPlaying: boolean; -}>; - -export type OnTimedMetadataData = Readonly<{ - metadata: ReadonlyArray< - Readonly<{ - value?: string; - identifier: string; - }> - >; -}>; - -export type AudioTrack = Readonly<{ - index: number; - title?: string; - language?: string; - bitrate?: number; - type?: string; - selected?: boolean; -}>; - -export type OnAudioTracksData = Readonly<{ - audioTracks: ReadonlyArray; -}>; - -export enum OnTextTracksTypeData { - SRT = 'srt', - TTML = 'ttml', - VTT = 'vtt', -} - -export type TextTrack = Readonly<{ - index: number; - title?: string; - language?: string; - type?: OnTextTracksTypeData; - selected?: boolean; -}>; - -export type OnTextTracksData = Readonly<{ - textTracks: ReadonlyArray; -}>; - -export type OnTextTrackDataChangedData = Readonly<{ - subtitleTracks: string; -}>; - -export type OnVideoTracksData = Readonly<{ - videoTracks: ReadonlyArray< - Readonly<{ - trackId: number; - codecs?: string; - width?: number; - height?: number; - bitrate?: number; - selected?: boolean; - }> - >; -}>; - -export type OnPlaybackData = Readonly<{ - playbackRate: number; -}>; - -export type OnVolumeChangeData = Readonly<{ - volume: number; -}>; - -export type OnExternalPlaybackChangeData = Readonly<{ - isExternalPlaybackActive: boolean; -}>; - -export type OnGetLicenseData = Readonly<{ - licenseUrl: string; - contentId: string; - spcBase64: string; -}>; - -export type OnPictureInPictureStatusChangedData = Readonly<{ - isActive: boolean; -}>; - -export type OnReceiveAdEventData = Readonly<{ - data?: Record; - event: AdEvent; -}>; - -export type OnVideoErrorData = Readonly<{ - error: OnVideoErrorDataDetails; - target?: number; // ios -}>; - -export type OnVideoErrorDataDetails = Readonly<{ - errorString?: string; // android - errorException?: string; // android - errorStackTrace?: string; // android - errorCode?: string; // android - error?: string; // ios - code?: number; // ios - localizedDescription?: string; // ios - localizedFailureReason?: string; // ios - localizedRecoverySuggestion?: string; // ios - domain?: string; // ios -}>; -export type OnAudioFocusChangedData = Readonly<{ - hasAudioFocus: boolean; -}>; - -export type OnBufferData = Readonly<{isBuffering: boolean}>; - -export type OnBandwidthUpdateData = Readonly< - | { - bitrate: number; - width: number; - height: number; - trackId: number; - } - | {bitrate: number} ->; +export type AudioTrack = OnAudioTracksData['audioTracks'][number]; +export type TextTrack = OnTextTracksData['textTracks'][number]; export interface ReactVideoEvents { onAudioBecomingNoisy?: () => void; //Android, iOS diff --git a/src/types/index.ts b/src/types/index.ts index e530a506..5742eac0 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -6,3 +6,4 @@ export {default as Orientation} from './Orientation'; export {default as ResizeMode} from './ResizeMode'; export {default as TextTrackType} from './TextTrackType'; export * from './video'; +export * from '../specs/VideoNativeComponent'; diff --git a/src/utils.ts b/src/utils.ts index 9af9c67b..fe64820e 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -5,6 +5,14 @@ import type {ReactVideoSource, ReactVideoSourceProperties} from './types/video'; type Source = ImageSourcePropType | ReactVideoSource; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export function generateHeaderForNative(obj?: Record) { + if (!obj) { + return []; + } + return Object.entries(obj).map(([key, value]) => ({key, value})); +} + export function resolveAssetSourceForVideo( source: Source, ): ReactVideoSourceProperties {