Files
a01d203bcb chore: Upgrade to Nitro 0.35.0 (#4849)
* chore: Upgrade to Nitro 0.35.0

* Replace `bigint` with `UInt64`

* chore: Regenerate specs now for Nitro 0.35.0

* fix: Use Int64 as it can be -1

* Remove unnecessary patches

* fix: change duration type to number

* fix: avoid mutating VideoInformation fields after init

* chore: regenerate specs with new duration type

* fix: use Double for duration in VideoInformation

* docs: react-native-nitro-modules version

* chore: update react-native-nitro-modules version (rnv & drm)

---------

Co-authored-by: fnwk <filip.wnek200@gmail.com>
2026-03-18 22:44:49 +01:00

55 lines
1.8 KiB
C++
Generated

///
/// ReactNativeVideoDrmOnLoad.cpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///
#ifndef BUILDING_REACTNATIVEVIDEODRM_WITH_GENERATED_CMAKE_PROJECT
#error ReactNativeVideoDrmOnLoad.cpp is not being built with the autogenerated CMakeLists.txt project. Is a different CMakeLists.txt building this?
#endif
#include "ReactNativeVideoDrmOnLoad.hpp"
#include <jni.h>
#include <fbjni/fbjni.h>
#include <NitroModules/HybridObjectRegistry.hpp>
#include "JHybridPluginManagerSpec.hpp"
#include <NitroModules/DefaultConstructableObject.hpp>
namespace margelo::nitro::videodrm {
int initialize(JavaVM* vm) {
return facebook::jni::initialize(vm, []() {
::margelo::nitro::videodrm::registerAllNatives();
});
}
struct JHybridPluginManagerSpecImpl: public jni::JavaClass<JHybridPluginManagerSpecImpl, JHybridPluginManagerSpec::JavaPart> {
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/videodrm/PluginManager;";
static std::shared_ptr<JHybridPluginManagerSpec> create() {
static auto constructorFn = javaClassStatic()->getConstructor<JHybridPluginManagerSpecImpl::javaobject()>();
jni::local_ref<JHybridPluginManagerSpec::JavaPart> javaPart = javaClassStatic()->newObject(constructorFn);
return javaPart->getJHybridPluginManagerSpec();
}
};
void registerAllNatives() {
using namespace margelo::nitro;
using namespace margelo::nitro::videodrm;
// Register native JNI methods
margelo::nitro::videodrm::JHybridPluginManagerSpec::CxxPart::registerNatives();
// Register Nitro Hybrid Objects
HybridObjectRegistry::registerHybridObjectConstructor(
"PluginManager",
[]() -> std::shared_ptr<HybridObject> {
return JHybridPluginManagerSpecImpl::create();
}
);
}
} // namespace margelo::nitro::videodrm