diff --git a/harmony/rn_video.har b/harmony/rn_video.har index 4863046e55..9a33a8fd27 100644 Binary files a/harmony/rn_video.har and b/harmony/rn_video.har differ diff --git a/harmony/rn_video/oh-package.json5 b/harmony/rn_video/oh-package.json5 index e658154d2e..ce14b0d285 100644 --- a/harmony/rn_video/oh-package.json5 +++ b/harmony/rn_video/oh-package.json5 @@ -3,9 +3,9 @@ "types": "", "devDependencies": {}, "name": "rnoh-video", - "description": "", + "description": "c-api-foundation", "main": "index.ets", - "version": "5.2.1-0.2.2", + "version": "5.2.1-0.2.0", "dependencies": { "rnoh": "file:../rnoh" } diff --git a/harmony/rn_video/src/main/cpp/RNCVideoPackage.h b/harmony/rn_video/src/main/cpp/RNCVideoPackage.h index ed0d3dde3a..f2c3312bd2 100644 --- a/harmony/rn_video/src/main/cpp/RNCVideoPackage.h +++ b/harmony/rn_video/src/main/cpp/RNCVideoPackage.h @@ -28,16 +28,33 @@ #include "RNCVideoViewJSIBinder.h" #include "RNCVideoViewNapiBinder.h" #include "RNCVideoEventEmitRequestHandler.h" +#include "RNOH/ArkTSComponentInstance.h" using namespace rnoh; using namespace facebook; +class RNCVideoComponentInstanceFactoryDelegate : public ComponentInstanceFactoryDelegate { +public: + using ComponentInstanceFactoryDelegate::ComponentInstanceFactoryDelegate; + + ComponentInstance::Shared create(ComponentInstance::Context ctx) override { + if (ctx.componentName == "RNCVideo") { + return std::make_shared(ctx); + } + return nullptr; + } +}; + namespace rnoh { class RNCVideoPackage : public Package { public: RNCVideoPackage(Package::Context ctx) : Package(ctx) {} + ComponentInstanceFactoryDelegate::Shared createComponentInstanceFactoryDelegate() override { + return std::make_shared(m_ctx); + } + std::vector createComponentDescriptorProviders() override { return { diff --git a/package.json b/package.json index c4010396ff..5aea17bdaf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-oh-tpl/react-native-video", - "version": "5.2.1-0.2.2", + "version": "5.2.1-0.2.0", "description": "A