From 4de93f43f16b7226203be5f8b77f12c8779c96c3 Mon Sep 17 00:00:00 2001 From: Krzysztof Moch Date: Mon, 4 Aug 2025 13:43:12 +0200 Subject: [PATCH] feat: bump nitro modules version (#4641) --- README.md | 33 +--- bun.lock | 14 +- docs/docs/installation.md | 53 +++++- example/ios/Podfile.lock | 4 +- example/package.json | 2 +- ...act-native-nitro-modules+0.26.2.patch.old} | 0 .../react-native-nitro-modules+0.27.2.patch | 31 ++++ .../hybrids/videoplayer/HybridVideoPlayer.kt | 8 +- .../VideoPlayer/HybridVideoPlayer.swift | 8 +- .../android/c++/JFunc_void_BandwidthData.hpp | 2 +- .../android/c++/JFunc_void_TimedMetadata.hpp | 4 +- .../c++/JFunc_void_VideoPlayerStatus.hpp | 2 +- .../android/c++/JFunc_void_onLoadData.hpp | 2 +- .../c++/JFunc_void_onLoadStartData.hpp | 2 +- .../JFunc_void_onPlaybackStateChangeData.hpp | 2 +- .../android/c++/JFunc_void_onProgressData.hpp | 2 +- .../c++/JFunc_void_onVolumeChangeData.hpp | 2 +- .../JFunc_void_std__optional_TextTrack_.hpp | 4 +- .../JFunc_void_std__vector_std__string_.hpp | 4 +- .../JHybridVideoPlayerEventEmitterSpec.cpp | 7 +- .../JHybridVideoPlayerEventEmitterSpec.hpp | 1 + .../c++/JHybridVideoPlayerFactorySpec.cpp | 5 + .../c++/JHybridVideoPlayerFactorySpec.hpp | 1 + .../JHybridVideoPlayerSourceFactorySpec.cpp | 9 +- .../JHybridVideoPlayerSourceFactorySpec.hpp | 1 + .../c++/JHybridVideoPlayerSourceSpec.cpp | 11 +- .../c++/JHybridVideoPlayerSourceSpec.hpp | 1 + .../android/c++/JHybridVideoPlayerSpec.cpp | 11 +- .../android/c++/JHybridVideoPlayerSpec.hpp | 2 +- ...JHybridVideoViewViewManagerFactorySpec.cpp | 5 + ...JHybridVideoViewViewManagerFactorySpec.hpp | 1 + .../c++/JHybridVideoViewViewManagerSpec.cpp | 7 +- .../c++/JHybridVideoViewViewManagerSpec.hpp | 1 + .../com/margelo/nitro/video/BandwidthData.kt | 1 + .../com/margelo/nitro/video/Func_void.kt | 1 + .../nitro/video/Func_void_BandwidthData.kt | 1 + .../nitro/video/Func_void_TimedMetadata.kt | 1 + .../video/Func_void_VideoPlayerStatus.kt | 1 + .../com/margelo/nitro/video/Func_void_bool.kt | 1 + .../margelo/nitro/video/Func_void_double.kt | 1 + .../nitro/video/Func_void_onLoadData.kt | 1 + .../nitro/video/Func_void_onLoadStartData.kt | 1 + .../Func_void_onPlaybackStateChangeData.kt | 1 + .../nitro/video/Func_void_onProgressData.kt | 1 + .../video/Func_void_onVolumeChangeData.kt | 1 + .../Func_void_std__optional_TextTrack_.kt | 1 + .../Func_void_std__vector_std__string_.kt | 1 + .../nitro/video/HybridVideoPlayerSpec.kt | 4 - .../nitro/video/NativeExternalSubtitle.kt | 1 + .../margelo/nitro/video/NativeVideoConfig.kt | 1 + .../com/margelo/nitro/video/TextTrack.kt | 1 + .../com/margelo/nitro/video/TimedMetadata.kt | 1 + .../nitro/video/TimedMetadataObject.kt | 1 + .../margelo/nitro/video/VideoInformation.kt | 1 + .../com/margelo/nitro/video/onLoadData.kt | 1 + .../margelo/nitro/video/onLoadStartData.kt | 1 + .../nitro/video/onPlaybackStateChangeData.kt | 1 + .../com/margelo/nitro/video/onProgressData.kt | 1 + .../margelo/nitro/video/onVolumeChangeData.kt | 1 + .../ios/ReactNativeVideo-Swift-Cxx-Bridge.cpp | 28 +-- .../ios/ReactNativeVideo-Swift-Cxx-Bridge.hpp | 90 ++++----- .../ReactNativeVideo-Swift-Cxx-Umbrella.hpp | 173 +++++------------- .../ios/ReactNativeVideoAutolinking.mm | 1 - ...HybridVideoPlayerEventEmitterSpecSwift.hpp | 6 +- .../c++/HybridVideoPlayerFactorySpecSwift.hpp | 4 +- ...ybridVideoPlayerSourceFactorySpecSwift.hpp | 8 +- .../c++/HybridVideoPlayerSourceSpecSwift.hpp | 10 +- .../ios/c++/HybridVideoPlayerSpecSwift.hpp | 12 +- ...idVideoViewViewManagerFactorySpecSwift.hpp | 4 +- .../HybridVideoViewViewManagerSpecSwift.hpp | 6 +- .../generated/ios/swift/Func_void.swift | 1 + .../ios/swift/Func_void_BandwidthData.swift | 1 + .../ios/swift/Func_void_TimedMetadata.swift | 1 + .../swift/Func_void_VideoInformation.swift | 1 + .../swift/Func_void_VideoPlayerStatus.swift | 1 + .../generated/ios/swift/Func_void_bool.swift | 1 + .../ios/swift/Func_void_double.swift | 1 + .../ios/swift/Func_void_onLoadData.swift | 1 + .../ios/swift/Func_void_onLoadStartData.swift | 1 + .../Func_void_onPlaybackStateChangeData.swift | 1 + .../ios/swift/Func_void_onProgressData.swift | 1 + .../swift/Func_void_onVolumeChangeData.swift | 1 + .../swift/Func_void_std__exception_ptr.swift | 1 + .../Func_void_std__optional_TextTrack_.swift | 1 + .../Func_void_std__vector_std__string_.swift | 1 + .../HybridVideoPlayerEventEmitterSpec.swift | 3 +- ...ybridVideoPlayerEventEmitterSpec_cxx.swift | 11 +- .../swift/HybridVideoPlayerFactorySpec.swift | 3 +- .../HybridVideoPlayerFactorySpec_cxx.swift | 11 +- .../HybridVideoPlayerSourceFactorySpec.swift | 3 +- ...bridVideoPlayerSourceFactorySpec_cxx.swift | 11 +- .../swift/HybridVideoPlayerSourceSpec.swift | 3 +- .../HybridVideoPlayerSourceSpec_cxx.swift | 11 +- .../ios/swift/HybridVideoPlayerSpec.swift | 4 +- .../ios/swift/HybridVideoPlayerSpec_cxx.swift | 22 +-- ...ybridVideoViewViewManagerFactorySpec.swift | 3 +- ...dVideoViewViewManagerFactorySpec_cxx.swift | 11 +- .../HybridVideoViewViewManagerSpec.swift | 3 +- .../HybridVideoViewViewManagerSpec_cxx.swift | 11 +- .../c++/HybridVideoPlayerEventEmitterSpec.hpp | 4 +- .../c++/HybridVideoPlayerSourceSpec.hpp | 2 +- .../shared/c++/HybridVideoPlayerSpec.cpp | 5 - .../shared/c++/HybridVideoPlayerSpec.hpp | 4 +- .../c++/HybridVideoViewViewManagerSpec.hpp | 2 +- .../shared/c++/NativeVideoConfig.hpp | 4 +- .../generated/shared/c++/TimedMetadata.hpp | 2 +- packages/react-native-video/package.json | 6 +- .../src/core/VideoPlayer.ts | 7 +- .../src/spec/nitro/VideoPlayer.nitro.ts | 6 - 109 files changed, 440 insertions(+), 340 deletions(-) rename example/patches/{react-native-nitro-modules+0.26.2.patch => react-native-nitro-modules+0.26.2.patch.old} (100%) create mode 100644 example/patches/react-native-nitro-modules+0.27.2.patch diff --git a/README.md b/README.md index d3841616..33487dbc 100644 --- a/README.md +++ b/README.md @@ -51,11 +51,11 @@ The most battle-tested open-source video player component for React Native with ### Requirements - React Native 0.75 or higher -- `react-native-nitro-modules` (>=0.24.0) - Please see [nitro requirements](https://nitro.margelo.com/docs/minimum-requirements) +- `react-native-nitro-modules` (>=0.27.2) - Please see [nitro requirements](https://nitro.margelo.com/docs/minimum-requirements) ### Install -`react-native-video` requires `react-native-nitro-modules` (>=0.24.0) in your project. +`react-native-video` requires `react-native-nitro-modules` (>=0.27.2) in your project. ```bash npm install react-native-nitro-modules ``` @@ -78,34 +78,7 @@ You can apply it using `patch-package`. Without this patch you won't be able "recognize" errors, all will be thrown as unknown errors. -```diff -diff --git a/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp b/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp -index aefd987..c2e06fb 100644 ---- a/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp -+++ b/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp -@@ -23,6 +23,10 @@ struct JSIConverter; - #include - #include - -+#ifdef ANDROID -+#include -+#endif -+ - namespace margelo::nitro { - - using namespace facebook; -@@ -118,6 +122,10 @@ public: - std::string funcName = getHybridFuncFullName(kind, name, hybridInstance.get()); - std::string message = exception.what(); - throw jsi::JSError(runtime, funcName + ": " + message); -+ } catch (const jni::JniException& exception) { -+ std::string funcName = getHybridFuncFullName(kind, name, hybridInstance.get()); -+ std::string message = exception.what(); -+ throw jsi::JSError(runtime, funcName + ": " + message); - #pragma clang diagnostic pop - #endif - } catch (...) { -``` +see [installation guide](https://docs.thewidlarzgroup.com/react-native-video/docs/v7/installation#patch-for-react-native--080) ### Usage diff --git a/bun.lock b/bun.lock index dced44bc..53e337bd 100644 --- a/bun.lock +++ b/bun.lock @@ -56,7 +56,7 @@ "@react-native-community/slider": "^4.5.6", "react": "18.3.1", "react-native": "^0.77.0", - "react-native-nitro-modules": "^0.26.0", + "react-native-nitro-modules": "^0.27.0", "react-native-video": "*", }, "devDependencies": { @@ -89,18 +89,18 @@ "eslint": "^8.51.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.1", - "nitro-codegen": ">=0.26.0", + "nitro-codegen": "^0.27.0", "prettier": "^3.0.3", "react": "18.3.1", "react-native": "^0.77.0", "react-native-builder-bob": "^0.40.0", - "react-native-nitro-modules": ">=0.26.0", + "react-native-nitro-modules": "^0.27.0", "typescript": "^5.2.2", }, "peerDependencies": { "react": "*", "react-native": "*", - "react-native-nitro-modules": ">=0.25.0", + "react-native-nitro-modules": ">=0.27.2", }, }, }, @@ -2597,7 +2597,7 @@ "new-github-release-url": ["new-github-release-url@2.0.0", "", { "dependencies": { "type-fest": "^2.5.1" } }, "sha512-NHDDGYudnvRutt/VhKFlX26IotXe1w0cmkDm6JGquh5bz/bDTw0LufSmH/GxTjEdpHEO+bVKFTwdrcGa/9XlKQ=="], - "nitro-codegen": ["nitro-codegen@0.26.2", "", { "dependencies": { "chalk": "^5.3.0", "react-native-nitro-modules": "^0.26.2", "ts-morph": "^25.0.0", "yargs": "^17.7.2", "zod": "^3.23.8" }, "bin": { "nitro-codegen": "lib/index.js" } }, "sha512-Z66PE0kzwrTdvyUMsq0eCv6IcEsv+tpkZovGcIat/UVJrcbbBNaScKuFRL07Qoh7idm4mErJiei6IRewJUDghA=="], + "nitro-codegen": ["nitro-codegen@0.27.2", "", { "dependencies": { "chalk": "^5.3.0", "react-native-nitro-modules": "^0.27.2", "ts-morph": "^25.0.0", "yargs": "^17.7.2", "zod": "^4.0.5" }, "bin": { "nitro-codegen": "lib/index.js" } }, "sha512-8s47CFGu2QYvqbKacmtpowgcj577fX60pxFiIDHyM0scT8u28thwAmy6ByskCySHiLFDO7OX6yVT+TrJHc6rQQ=="], "no-case": ["no-case@3.0.4", "", { "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" } }, "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg=="], @@ -2977,7 +2977,7 @@ "react-native-monorepo-config": ["react-native-monorepo-config@0.1.9", "", { "dependencies": { "escape-string-regexp": "^5.0.0", "fast-glob": "^3.3.3" } }, "sha512-GLFYMEEcbltxZw7oUbbh/p0oXqA52lSirXt7o/N1qD6CFTvku84OVL6teeQ1Ef92pq+bepq4x0Qz+d6lapVbuQ=="], - "react-native-nitro-modules": ["react-native-nitro-modules@0.26.2", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-PvTUOryU/J1RDsPh1IvmAEDkYVVL32wCIYxkg6HsKgq+Dl+C8lth/MtW7cRZ+fJ0qW21NILbhBdhSXFzBx51fA=="], + "react-native-nitro-modules": ["react-native-nitro-modules@0.27.2", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-wHUs6m4e1MkhV7oPMNSZwCZcoaepLNfPScc+Pm9pwgtv26sTADXnu66MzyodSl6kO6TcTC1Pf+5VyQMgesx08w=="], "react-native-video": ["react-native-video@workspace:packages/react-native-video"], @@ -3579,7 +3579,7 @@ "yoctocolors-cjs": ["yoctocolors-cjs@2.1.2", "", {}, "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA=="], - "zod": ["zod@3.24.2", "", {}, "sha512-lY7CDW43ECgW9u1TcT3IoXHflywfVqDYze4waEz812jR/bZ8FHDsl7pFQoSZTz5N+2NqRXs8GBwnAwo3ZNxqhQ=="], + "zod": ["zod@4.0.14", "", {}, "sha512-nGFJTnJN6cM2v9kXL+SOBq3AtjQby3Mv5ySGFof5UGRHrRioSJ5iG680cYNjE/yWk671nROcpPj4hAS8nyLhSw=="], "zwitch": ["zwitch@1.0.5", "", {}, "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw=="], diff --git a/docs/docs/installation.md b/docs/docs/installation.md index f89a8729..3a15aaef 100644 --- a/docs/docs/installation.md +++ b/docs/docs/installation.md @@ -14,7 +14,7 @@ React Native Video is a library that allows you to play various kind of videos i ### Minimal Package Requirements - `react-native` `0.75.0` or higher -- `react-native-nitro-modules` `0.26.0` or higher +- `react-native-nitro-modules` `0.27.2` or higher ## Installation @@ -51,6 +51,57 @@ npx react-native run-ios # run on iOS npx react-native run-android # run on Android ``` +## Patch for react-native < 0.80 + +`react-native` < 0.80 have bug that prevents to properly handle errors by nitro modules on Android. +We highly recommend to apply bellow patch for `react-native-nitro-modules` to fix this issue. +You can apply it using `patch-package`. + +:::warning +Without this patch you won't be able "recognize" errors, all will be thrown as unknown errors. +::: + +
+ For `react-native-nitro-modules` 0.27.X or higher + + ```diff + diff --git a/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp b/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp + index efcea05..ffad3f2 100644 + --- a/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp + +++ b/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp + @@ -23,6 +23,10 @@ struct JSIConverter; + #include + #include + + +#ifdef ANDROID + +#include + +#endif + + + namespace margelo::nitro { + + using namespace facebook; + @@ -109,6 +113,15 @@ public: + std::string funcName = getHybridFuncFullName(kind, name, hybridInstance.get()); + std::string message = exception.what(); + throw jsi::JSError(runtime, funcName + ": " + message); + +#ifdef ANDROID + +#pragma clang diagnostic push + +#pragma clang diagnostic ignored "-Wexceptions" + + } catch (const jni::JniException& exception) { + + std::string funcName = getHybridFuncFullName(kind, name, hybridInstance.get()); + + std::string message = exception.what(); + + throw jsi::JSError(runtime, funcName + ": " + message); + +#pragma clang diagnostic pop + +#endif + } catch (...) { + // Some unknown exception was thrown - add method name information and re-throw as `JSError`. + std::string funcName = getHybridFuncFullName(kind, name, hybridInstance.get()); + ``` + + see [raw](https://github.com/TheWidlarzGroup/react-native-video/blob/v7/example/patches/react-native-nitro-modules%2B0.27.2.patch) +
+ + ## Usage ```tsx title="App.tsx" diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 8c963b2f..7624c144 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -8,7 +8,7 @@ PODS: - hermes-engine (0.77.2): - hermes-engine/Pre-built (= 0.77.2) - hermes-engine/Pre-built (0.77.2) - - NitroModules (0.26.2): + - NitroModules (0.27.2): - DoubleConversion - glog - hermes-engine @@ -1816,7 +1816,7 @@ SPEC CHECKSUMS: fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8 hermes-engine: 8eb265241fa1d7095d3a40d51fd90f7dce68217c - NitroModules: 39248e88212416d858a4f4561cf719c6cc8ef900 + NitroModules: 7ed5fd8f6f1e814810b9df26830b78f3355690bf RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82 RCTDeprecation: 85b72250b63cfb54f29ca96ceb108cb9ef3c2079 RCTRequired: 567cb8f5d42b990331bfd93faad1d8999b1c1736 diff --git a/example/package.json b/example/package.json index b43ab172..082fe10e 100644 --- a/example/package.json +++ b/example/package.json @@ -13,7 +13,7 @@ "@react-native-community/slider": "^4.5.6", "react": "18.3.1", "react-native": "^0.77.0", - "react-native-nitro-modules": "^0.26.0", + "react-native-nitro-modules": "^0.27.0", "react-native-video": "*" }, "devDependencies": { diff --git a/example/patches/react-native-nitro-modules+0.26.2.patch b/example/patches/react-native-nitro-modules+0.26.2.patch.old similarity index 100% rename from example/patches/react-native-nitro-modules+0.26.2.patch rename to example/patches/react-native-nitro-modules+0.26.2.patch.old diff --git a/example/patches/react-native-nitro-modules+0.27.2.patch b/example/patches/react-native-nitro-modules+0.27.2.patch new file mode 100644 index 00000000..0a0d72cf --- /dev/null +++ b/example/patches/react-native-nitro-modules+0.27.2.patch @@ -0,0 +1,31 @@ +diff --git a/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp b/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp +index efcea05..ffad3f2 100644 +--- a/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp ++++ b/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp +@@ -23,6 +23,10 @@ struct JSIConverter; + #include + #include + ++#ifdef ANDROID ++#include ++#endif ++ + namespace margelo::nitro { + + using namespace facebook; +@@ -109,6 +113,15 @@ public: + std::string funcName = getHybridFuncFullName(kind, name, hybridInstance.get()); + std::string message = exception.what(); + throw jsi::JSError(runtime, funcName + ": " + message); ++#ifdef ANDROID ++#pragma clang diagnostic push ++#pragma clang diagnostic ignored "-Wexceptions" ++ } catch (const jni::JniException& exception) { ++ std::string funcName = getHybridFuncFullName(kind, name, hybridInstance.get()); ++ std::string message = exception.what(); ++ throw jsi::JSError(runtime, funcName + ": " + message); ++#pragma clang diagnostic pop ++#endif + } catch (...) { + // Some unknown exception was thrown - add method name information and re-throw as `JSError`. + std::string funcName = getHybridFuncFullName(kind, name, hybridInstance.get()); diff --git a/packages/react-native-video/android/src/main/java/com/video/hybrids/videoplayer/HybridVideoPlayer.kt b/packages/react-native-video/android/src/main/java/com/video/hybrids/videoplayer/HybridVideoPlayer.kt index 79284d23..9b89507e 100644 --- a/packages/react-native-video/android/src/main/java/com/video/hybrids/videoplayer/HybridVideoPlayer.kt +++ b/packages/react-native-video/android/src/main/java/com/video/hybrids/videoplayer/HybridVideoPlayer.kt @@ -338,10 +338,6 @@ class HybridVideoPlayer() : HybridVideoPlayerSpec() { } } - override fun clean() { - release() - } - fun movePlayerToVideoView(videoView: VideoView) { VideoManager.addViewToPlayer(videoView, this) @@ -351,6 +347,10 @@ class HybridVideoPlayer() : HybridVideoPlayerSpec() { } } + override fun dispose() { + release() + } + override val memorySize: Long get() = allocator?.totalBytesAllocated?.toLong() ?: 0L diff --git a/packages/react-native-video/ios/hybrids/VideoPlayer/HybridVideoPlayer.swift b/packages/react-native-video/ios/hybrids/VideoPlayer/HybridVideoPlayer.swift index 6e02b88f..a6c7da65 100644 --- a/packages/react-native-video/ios/hybrids/VideoPlayer/HybridVideoPlayer.swift +++ b/packages/react-native-video/ios/hybrids/VideoPlayer/HybridVideoPlayer.swift @@ -183,10 +183,6 @@ class HybridVideoPlayer: HybridVideoPlayerSpec, NativeVideoPlayerSpec { return player?.rate != 0 } - func clean() throws { - release() - } - func release() { playerQueue.async { [weak self] in guard let self = self else { return } @@ -494,6 +490,10 @@ class HybridVideoPlayer: HybridVideoPlayerSpec, NativeVideoPlayerSpec { } // MARK: - Memory Management + + func dispose() { + release() + } var memorySize: Int { var size = 0 diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_BandwidthData.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_BandwidthData.hpp index 7eb56f79..ef113048 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_BandwidthData.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_BandwidthData.hpp @@ -10,8 +10,8 @@ #include #include -#include #include "BandwidthData.hpp" +#include #include "JBandwidthData.hpp" #include diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_TimedMetadata.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_TimedMetadata.hpp index a80e93e8..f52d8940 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_TimedMetadata.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_TimedMetadata.hpp @@ -10,11 +10,11 @@ #include #include -#include #include "TimedMetadata.hpp" +#include #include "JTimedMetadata.hpp" -#include #include "TimedMetadataObject.hpp" +#include #include "JTimedMetadataObject.hpp" #include diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_VideoPlayerStatus.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_VideoPlayerStatus.hpp index e1cc6371..ec3842a6 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_VideoPlayerStatus.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_VideoPlayerStatus.hpp @@ -10,8 +10,8 @@ #include #include -#include #include "VideoPlayerStatus.hpp" +#include #include "JVideoPlayerStatus.hpp" namespace margelo::nitro::video { diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onLoadData.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onLoadData.hpp index cd5282ff..6d865d6c 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onLoadData.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onLoadData.hpp @@ -10,8 +10,8 @@ #include #include -#include #include "onLoadData.hpp" +#include #include "JonLoadData.hpp" #include "VideoOrientation.hpp" #include "JVideoOrientation.hpp" diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onLoadStartData.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onLoadStartData.hpp index 2ccdfa9d..8b359924 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onLoadStartData.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onLoadStartData.hpp @@ -10,8 +10,8 @@ #include #include -#include #include "onLoadStartData.hpp" +#include #include "JonLoadStartData.hpp" #include "SourceType.hpp" #include "JSourceType.hpp" diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onPlaybackStateChangeData.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onPlaybackStateChangeData.hpp index 967b2dab..9db750ad 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onPlaybackStateChangeData.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onPlaybackStateChangeData.hpp @@ -10,8 +10,8 @@ #include #include -#include #include "onPlaybackStateChangeData.hpp" +#include #include "JonPlaybackStateChangeData.hpp" namespace margelo::nitro::video { diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onProgressData.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onProgressData.hpp index 335cc2ce..13dcfff0 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onProgressData.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onProgressData.hpp @@ -10,8 +10,8 @@ #include #include -#include #include "onProgressData.hpp" +#include #include "JonProgressData.hpp" namespace margelo::nitro::video { diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onVolumeChangeData.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onVolumeChangeData.hpp index 4fb79ae2..f4313d98 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onVolumeChangeData.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_onVolumeChangeData.hpp @@ -10,8 +10,8 @@ #include #include -#include #include "onVolumeChangeData.hpp" +#include #include "JonVolumeChangeData.hpp" namespace margelo::nitro::video { diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_std__optional_TextTrack_.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_std__optional_TextTrack_.hpp index 07d0e4fc..4cfc2e87 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_std__optional_TextTrack_.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_std__optional_TextTrack_.hpp @@ -10,9 +10,9 @@ #include #include -#include -#include #include "TextTrack.hpp" +#include +#include #include "JTextTrack.hpp" #include diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_std__vector_std__string_.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_std__vector_std__string_.hpp index 6c6853c3..50983a48 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_std__vector_std__string_.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JFunc_void_std__vector_std__string_.hpp @@ -10,9 +10,9 @@ #include #include -#include -#include #include +#include +#include namespace margelo::nitro::video { diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.cpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.cpp index c607479b..f05f299f 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.cpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.cpp @@ -65,8 +65,8 @@ namespace margelo::nitro::video { enum class VideoPlayerStatus; } #include "TimedMetadata.hpp" #include "JFunc_void_TimedMetadata.hpp" #include "JTimedMetadata.hpp" -#include #include "TimedMetadataObject.hpp" +#include #include "JTimedMetadataObject.hpp" #include #include "JFunc_void_std__vector_std__string_.hpp" @@ -97,6 +97,11 @@ namespace margelo::nitro::video { return method(_javaPart); } + void JHybridVideoPlayerEventEmitterSpec::dispose() noexcept { + static const auto method = javaClassStatic()->getMethod("dispose"); + method(_javaPart); + } + // Properties std::function JHybridVideoPlayerEventEmitterSpec::getOnAudioBecomingNoisy() { static const auto method = javaClassStatic()->getMethod()>("getOnAudioBecomingNoisy_cxx"); diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.hpp index 53852de3..6c207737 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerEventEmitterSpec.hpp @@ -39,6 +39,7 @@ namespace margelo::nitro::video { public: size_t getExternalMemorySize() noexcept override; + void dispose() noexcept override; public: inline const jni::global_ref& getJavaPart() const noexcept { diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.cpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.cpp index 32679c2f..9446369c 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.cpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.cpp @@ -36,6 +36,11 @@ namespace margelo::nitro::video { return method(_javaPart); } + void JHybridVideoPlayerFactorySpec::dispose() noexcept { + static const auto method = javaClassStatic()->getMethod("dispose"); + method(_javaPart); + } + // Properties diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.hpp index 33bbf28a..2bf9a028 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerFactorySpec.hpp @@ -39,6 +39,7 @@ namespace margelo::nitro::video { public: size_t getExternalMemorySize() noexcept override; + void dispose() noexcept override; public: inline const jni::global_ref& getJavaPart() const noexcept { diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.cpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.cpp index 78a2c14c..8bec92f0 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.cpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.cpp @@ -23,9 +23,9 @@ namespace margelo::nitro::video { enum class SubtitleType; } #include #include "NativeVideoConfig.hpp" #include "JNativeVideoConfig.hpp" -#include -#include #include "NativeExternalSubtitle.hpp" +#include +#include #include "JNativeExternalSubtitle.hpp" #include "SubtitleType.hpp" #include "JSubtitleType.hpp" @@ -48,6 +48,11 @@ namespace margelo::nitro::video { return method(_javaPart); } + void JHybridVideoPlayerSourceFactorySpec::dispose() noexcept { + static const auto method = javaClassStatic()->getMethod("dispose"); + method(_javaPart); + } + // Properties diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.hpp index 11177b85..f320640e 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceFactorySpec.hpp @@ -39,6 +39,7 @@ namespace margelo::nitro::video { public: size_t getExternalMemorySize() noexcept override; + void dispose() noexcept override; public: inline const jni::global_ref& getJavaPart() const noexcept { diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.cpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.cpp index e0b88197..4a90b8fe 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.cpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.cpp @@ -21,15 +21,15 @@ namespace margelo::nitro::video { enum class VideoOrientation; } #include #include "NativeVideoConfig.hpp" #include "JNativeVideoConfig.hpp" -#include -#include #include "NativeExternalSubtitle.hpp" +#include +#include #include "JNativeExternalSubtitle.hpp" #include "SubtitleType.hpp" #include "JSubtitleType.hpp" #include -#include #include "VideoInformation.hpp" +#include #include #include "JVideoInformation.hpp" #include "VideoOrientation.hpp" @@ -52,6 +52,11 @@ namespace margelo::nitro::video { return method(_javaPart); } + void JHybridVideoPlayerSourceSpec::dispose() noexcept { + static const auto method = javaClassStatic()->getMethod("dispose"); + method(_javaPart); + } + // Properties std::string JHybridVideoPlayerSourceSpec::getUri() { static const auto method = javaClassStatic()->getMethod()>("getUri"); diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.hpp index f4291631..7c826b74 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSourceSpec.hpp @@ -39,6 +39,7 @@ namespace margelo::nitro::video { public: size_t getExternalMemorySize() noexcept override; + void dispose() noexcept override; public: inline const jni::global_ref& getJavaPart() const noexcept { diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.cpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.cpp index 2ba0b40f..584478ab 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.cpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.cpp @@ -32,8 +32,8 @@ namespace margelo::nitro::video { struct TextTrack; } #include "JMixAudioMode.hpp" #include "IgnoreSilentSwitchMode.hpp" #include "JIgnoreSilentSwitchMode.hpp" -#include #include "TextTrack.hpp" +#include #include "JTextTrack.hpp" #include #include @@ -57,6 +57,11 @@ namespace margelo::nitro::video { return method(_javaPart); } + void JHybridVideoPlayerSpec::dispose() noexcept { + static const auto method = javaClassStatic()->getMethod("dispose"); + method(_javaPart); + } + // Properties std::shared_ptr JHybridVideoPlayerSpec::getSource() { static const auto method = javaClassStatic()->getMethod()>("getSource"); @@ -204,10 +209,6 @@ namespace margelo::nitro::video { static const auto method = javaClassStatic()->getMethod /* textTrack */)>("selectTextTrack"); method(_javaPart, textTrack.has_value() ? JTextTrack::fromCpp(textTrack.value()) : nullptr); } - void JHybridVideoPlayerSpec::clean() { - static const auto method = javaClassStatic()->getMethod("clean"); - method(_javaPart); - } std::shared_ptr> JHybridVideoPlayerSpec::preload() { static const auto method = javaClassStatic()->getMethod()>("preload"); auto __result = method(_javaPart); diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.hpp index 0c283e78..bfa09026 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoPlayerSpec.hpp @@ -39,6 +39,7 @@ namespace margelo::nitro::video { public: size_t getExternalMemorySize() noexcept override; + void dispose() noexcept override; public: inline const jni::global_ref& getJavaPart() const noexcept { @@ -77,7 +78,6 @@ namespace margelo::nitro::video { std::shared_ptr> replaceSourceAsync(const std::optional>& source) override; std::vector getAvailableTextTracks() override; void selectTextTrack(const std::optional& textTrack) override; - void clean() override; std::shared_ptr> preload() override; void play() override; void pause() override; diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.cpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.cpp index f7e2c714..4c6d088e 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.cpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.cpp @@ -32,6 +32,11 @@ namespace margelo::nitro::video { return method(_javaPart); } + void JHybridVideoViewViewManagerFactorySpec::dispose() noexcept { + static const auto method = javaClassStatic()->getMethod("dispose"); + method(_javaPart); + } + // Properties diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.hpp index 1ee5e09f..508d256e 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerFactorySpec.hpp @@ -39,6 +39,7 @@ namespace margelo::nitro::video { public: size_t getExternalMemorySize() noexcept override; + void dispose() noexcept override; public: inline const jni::global_ref& getJavaPart() const noexcept { diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.cpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.cpp index 08c9bceb..67767480 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.cpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.cpp @@ -12,9 +12,9 @@ namespace margelo::nitro::video { class HybridVideoPlayerSpec; } // Forward declaration of `ResizeMode` to properly resolve imports. namespace margelo::nitro::video { enum class ResizeMode; } -#include #include #include "HybridVideoPlayerSpec.hpp" +#include #include "JHybridVideoPlayerSpec.hpp" #include #include "ResizeMode.hpp" @@ -40,6 +40,11 @@ namespace margelo::nitro::video { return method(_javaPart); } + void JHybridVideoViewViewManagerSpec::dispose() noexcept { + static const auto method = javaClassStatic()->getMethod("dispose"); + method(_javaPart); + } + // Properties std::optional> JHybridVideoViewViewManagerSpec::getPlayer() { static const auto method = javaClassStatic()->getMethod()>("getPlayer"); diff --git a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.hpp b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.hpp index 358052b5..646e7a71 100644 --- a/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.hpp +++ b/packages/react-native-video/nitrogen/generated/android/c++/JHybridVideoViewViewManagerSpec.hpp @@ -39,6 +39,7 @@ namespace margelo::nitro::video { public: size_t getExternalMemorySize() noexcept override; + void dispose() noexcept override; public: inline const jni::global_ref& getJavaPart() const noexcept { diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/BandwidthData.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/BandwidthData.kt index 15097568..17f38fb9 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/BandwidthData.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/BandwidthData.kt @@ -11,6 +11,7 @@ import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* + /** * Represents the JavaScript object/struct "BandwidthData". */ diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void.kt index ffc3df62..24177f63 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void.kt @@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* import dalvik.annotation.optimization.FastNative + /** * Represents the JavaScript callback `() => void`. * This can be either implemented in C++ (in which case it might be a callback coming from JS), diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_BandwidthData.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_BandwidthData.kt index 6a995fff..546d3218 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_BandwidthData.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_BandwidthData.kt @@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* import dalvik.annotation.optimization.FastNative + /** * Represents the JavaScript callback `(data: struct) => void`. * This can be either implemented in C++ (in which case it might be a callback coming from JS), diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_TimedMetadata.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_TimedMetadata.kt index 0070ef84..ba18b023 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_TimedMetadata.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_TimedMetadata.kt @@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* import dalvik.annotation.optimization.FastNative + /** * Represents the JavaScript callback `(metadata: struct) => void`. * This can be either implemented in C++ (in which case it might be a callback coming from JS), diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_VideoPlayerStatus.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_VideoPlayerStatus.kt index d1c6a852..b6a3640e 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_VideoPlayerStatus.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_VideoPlayerStatus.kt @@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* import dalvik.annotation.optimization.FastNative + /** * Represents the JavaScript callback `(status: enum) => void`. * This can be either implemented in C++ (in which case it might be a callback coming from JS), diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_bool.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_bool.kt index 01f78710..eef7cc2c 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_bool.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_bool.kt @@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* import dalvik.annotation.optimization.FastNative + /** * Represents the JavaScript callback `(fullscreen: boolean) => void`. * This can be either implemented in C++ (in which case it might be a callback coming from JS), diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_double.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_double.kt index cfbd7f7d..6cefd1e7 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_double.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_double.kt @@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* import dalvik.annotation.optimization.FastNative + /** * Represents the JavaScript callback `(seekTime: number) => void`. * This can be either implemented in C++ (in which case it might be a callback coming from JS), diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onLoadData.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onLoadData.kt index 53d588c2..d3e74dc3 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onLoadData.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onLoadData.kt @@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* import dalvik.annotation.optimization.FastNative + /** * Represents the JavaScript callback `(data: struct) => void`. * This can be either implemented in C++ (in which case it might be a callback coming from JS), diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onLoadStartData.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onLoadStartData.kt index 4b7ba28a..81b37930 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onLoadStartData.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onLoadStartData.kt @@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* import dalvik.annotation.optimization.FastNative + /** * Represents the JavaScript callback `(data: struct) => void`. * This can be either implemented in C++ (in which case it might be a callback coming from JS), diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onPlaybackStateChangeData.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onPlaybackStateChangeData.kt index dc35d7c6..50a948d2 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onPlaybackStateChangeData.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onPlaybackStateChangeData.kt @@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* import dalvik.annotation.optimization.FastNative + /** * Represents the JavaScript callback `(data: struct) => void`. * This can be either implemented in C++ (in which case it might be a callback coming from JS), diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onProgressData.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onProgressData.kt index def12eb2..8248c5ad 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onProgressData.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onProgressData.kt @@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* import dalvik.annotation.optimization.FastNative + /** * Represents the JavaScript callback `(data: struct) => void`. * This can be either implemented in C++ (in which case it might be a callback coming from JS), diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onVolumeChangeData.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onVolumeChangeData.kt index 48e9e112..62342d99 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onVolumeChangeData.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_onVolumeChangeData.kt @@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* import dalvik.annotation.optimization.FastNative + /** * Represents the JavaScript callback `(data: struct) => void`. * This can be either implemented in C++ (in which case it might be a callback coming from JS), diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_std__optional_TextTrack_.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_std__optional_TextTrack_.kt index 58886739..02c0851e 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_std__optional_TextTrack_.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_std__optional_TextTrack_.kt @@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* import dalvik.annotation.optimization.FastNative + /** * Represents the JavaScript callback `(track: optional) => void`. * This can be either implemented in C++ (in which case it might be a callback coming from JS), diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_std__vector_std__string_.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_std__vector_std__string_.kt index 681115d5..560c4ddc 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_std__vector_std__string_.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/Func_void_std__vector_std__string_.kt @@ -13,6 +13,7 @@ import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* import dalvik.annotation.optimization.FastNative + /** * Represents the JavaScript callback `(texts: array) => void`. * This can be either implemented in C++ (in which case it might be a callback coming from JS), diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/HybridVideoPlayerSpec.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/HybridVideoPlayerSpec.kt index fe342ee2..7e7728aa 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/HybridVideoPlayerSpec.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/HybridVideoPlayerSpec.kt @@ -128,10 +128,6 @@ abstract class HybridVideoPlayerSpec: HybridObject() { @Keep abstract fun selectTextTrack(textTrack: TextTrack?): Unit - @DoNotStrip - @Keep - abstract fun clean(): Unit - @DoNotStrip @Keep abstract fun preload(): Promise diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/NativeExternalSubtitle.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/NativeExternalSubtitle.kt index b40653c0..c8cef163 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/NativeExternalSubtitle.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/NativeExternalSubtitle.kt @@ -11,6 +11,7 @@ import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* + /** * Represents the JavaScript object/struct "NativeExternalSubtitle". */ diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/NativeVideoConfig.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/NativeVideoConfig.kt index 22ac431c..2f956fc3 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/NativeVideoConfig.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/NativeVideoConfig.kt @@ -11,6 +11,7 @@ import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* + /** * Represents the JavaScript object/struct "NativeVideoConfig". */ diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TextTrack.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TextTrack.kt index 12cb3902..5933b6ab 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TextTrack.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TextTrack.kt @@ -11,6 +11,7 @@ import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* + /** * Represents the JavaScript object/struct "TextTrack". */ diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TimedMetadata.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TimedMetadata.kt index 89fc7230..269c9ca8 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TimedMetadata.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TimedMetadata.kt @@ -11,6 +11,7 @@ import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* + /** * Represents the JavaScript object/struct "TimedMetadata". */ diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TimedMetadataObject.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TimedMetadataObject.kt index 2984a229..386eb5dc 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TimedMetadataObject.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/TimedMetadataObject.kt @@ -11,6 +11,7 @@ import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* + /** * Represents the JavaScript object/struct "TimedMetadataObject". */ diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/VideoInformation.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/VideoInformation.kt index 3a6d9763..496a2aff 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/VideoInformation.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/VideoInformation.kt @@ -11,6 +11,7 @@ import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* + /** * Represents the JavaScript object/struct "VideoInformation". */ diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onLoadData.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onLoadData.kt index 90d552b6..a9dccf9b 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onLoadData.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onLoadData.kt @@ -11,6 +11,7 @@ import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* + /** * Represents the JavaScript object/struct "onLoadData". */ diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onLoadStartData.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onLoadStartData.kt index e39c48da..105be716 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onLoadStartData.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onLoadStartData.kt @@ -11,6 +11,7 @@ import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* + /** * Represents the JavaScript object/struct "onLoadStartData". */ diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onPlaybackStateChangeData.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onPlaybackStateChangeData.kt index e9dd5599..be03a4b7 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onPlaybackStateChangeData.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onPlaybackStateChangeData.kt @@ -11,6 +11,7 @@ import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* + /** * Represents the JavaScript object/struct "onPlaybackStateChangeData". */ diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onProgressData.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onProgressData.kt index fd580a39..2c16a882 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onProgressData.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onProgressData.kt @@ -11,6 +11,7 @@ import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* + /** * Represents the JavaScript object/struct "onProgressData". */ diff --git a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onVolumeChangeData.kt b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onVolumeChangeData.kt index cdb5d380..92f67e33 100644 --- a/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onVolumeChangeData.kt +++ b/packages/react-native-video/nitrogen/generated/android/kotlin/com/margelo/nitro/video/onVolumeChangeData.kt @@ -11,6 +11,7 @@ import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import com.margelo.nitro.core.* + /** * Represents the JavaScript object/struct "onVolumeChangeData". */ diff --git a/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Bridge.cpp b/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Bridge.cpp index fba8982c..5fe3c34c 100644 --- a/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Bridge.cpp +++ b/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Bridge.cpp @@ -26,11 +26,11 @@ namespace margelo::nitro::video::bridge::swift { } void* _Nonnull get_std__shared_ptr_margelo__nitro__video__HybridVideoPlayerSourceSpec_(std__shared_ptr_margelo__nitro__video__HybridVideoPlayerSourceSpec_ cppType) { std::shared_ptr swiftWrapper = std::dynamic_pointer_cast(cppType); - #ifdef NITRO_DEBUG + #ifdef NITRO_DEBUG if (swiftWrapper == nullptr) [[unlikely]] { throw std::runtime_error("Class \"HybridVideoPlayerSourceSpec\" is not implemented in Swift!"); } - #endif + #endif ReactNativeVideo::HybridVideoPlayerSourceSpec_cxx& swiftPart = swiftWrapper->getSwiftPart(); return swiftPart.toUnsafe(); } @@ -42,11 +42,11 @@ namespace margelo::nitro::video::bridge::swift { } void* _Nonnull get_std__shared_ptr_margelo__nitro__video__HybridVideoPlayerEventEmitterSpec_(std__shared_ptr_margelo__nitro__video__HybridVideoPlayerEventEmitterSpec_ cppType) { std::shared_ptr swiftWrapper = std::dynamic_pointer_cast(cppType); - #ifdef NITRO_DEBUG + #ifdef NITRO_DEBUG if (swiftWrapper == nullptr) [[unlikely]] { throw std::runtime_error("Class \"HybridVideoPlayerEventEmitterSpec\" is not implemented in Swift!"); } - #endif + #endif ReactNativeVideo::HybridVideoPlayerEventEmitterSpec_cxx& swiftPart = swiftWrapper->getSwiftPart(); return swiftPart.toUnsafe(); } @@ -74,11 +74,11 @@ namespace margelo::nitro::video::bridge::swift { } void* _Nonnull get_std__shared_ptr_margelo__nitro__video__HybridVideoPlayerSpec_(std__shared_ptr_margelo__nitro__video__HybridVideoPlayerSpec_ cppType) { std::shared_ptr swiftWrapper = std::dynamic_pointer_cast(cppType); - #ifdef NITRO_DEBUG + #ifdef NITRO_DEBUG if (swiftWrapper == nullptr) [[unlikely]] { throw std::runtime_error("Class \"HybridVideoPlayerSpec\" is not implemented in Swift!"); } - #endif + #endif ReactNativeVideo::HybridVideoPlayerSpec_cxx& swiftPart = swiftWrapper->getSwiftPart(); return swiftPart.toUnsafe(); } @@ -90,11 +90,11 @@ namespace margelo::nitro::video::bridge::swift { } void* _Nonnull get_std__shared_ptr_margelo__nitro__video__HybridVideoPlayerFactorySpec_(std__shared_ptr_margelo__nitro__video__HybridVideoPlayerFactorySpec_ cppType) { std::shared_ptr swiftWrapper = std::dynamic_pointer_cast(cppType); - #ifdef NITRO_DEBUG + #ifdef NITRO_DEBUG if (swiftWrapper == nullptr) [[unlikely]] { throw std::runtime_error("Class \"HybridVideoPlayerFactorySpec\" is not implemented in Swift!"); } - #endif + #endif ReactNativeVideo::HybridVideoPlayerFactorySpec_cxx& swiftPart = swiftWrapper->getSwiftPart(); return swiftPart.toUnsafe(); } @@ -210,11 +210,11 @@ namespace margelo::nitro::video::bridge::swift { } void* _Nonnull get_std__shared_ptr_margelo__nitro__video__HybridVideoPlayerSourceFactorySpec_(std__shared_ptr_margelo__nitro__video__HybridVideoPlayerSourceFactorySpec_ cppType) { std::shared_ptr swiftWrapper = std::dynamic_pointer_cast(cppType); - #ifdef NITRO_DEBUG + #ifdef NITRO_DEBUG if (swiftWrapper == nullptr) [[unlikely]] { throw std::runtime_error("Class \"HybridVideoPlayerSourceFactorySpec\" is not implemented in Swift!"); } - #endif + #endif ReactNativeVideo::HybridVideoPlayerSourceFactorySpec_cxx& swiftPart = swiftWrapper->getSwiftPart(); return swiftPart.toUnsafe(); } @@ -226,11 +226,11 @@ namespace margelo::nitro::video::bridge::swift { } void* _Nonnull get_std__shared_ptr_margelo__nitro__video__HybridVideoViewViewManagerSpec_(std__shared_ptr_margelo__nitro__video__HybridVideoViewViewManagerSpec_ cppType) { std::shared_ptr swiftWrapper = std::dynamic_pointer_cast(cppType); - #ifdef NITRO_DEBUG + #ifdef NITRO_DEBUG if (swiftWrapper == nullptr) [[unlikely]] { throw std::runtime_error("Class \"HybridVideoViewViewManagerSpec\" is not implemented in Swift!"); } - #endif + #endif ReactNativeVideo::HybridVideoViewViewManagerSpec_cxx& swiftPart = swiftWrapper->getSwiftPart(); return swiftPart.toUnsafe(); } @@ -242,11 +242,11 @@ namespace margelo::nitro::video::bridge::swift { } void* _Nonnull get_std__shared_ptr_margelo__nitro__video__HybridVideoViewViewManagerFactorySpec_(std__shared_ptr_margelo__nitro__video__HybridVideoViewViewManagerFactorySpec_ cppType) { std::shared_ptr swiftWrapper = std::dynamic_pointer_cast(cppType); - #ifdef NITRO_DEBUG + #ifdef NITRO_DEBUG if (swiftWrapper == nullptr) [[unlikely]] { throw std::runtime_error("Class \"HybridVideoViewViewManagerFactorySpec\" is not implemented in Swift!"); } - #endif + #endif ReactNativeVideo::HybridVideoViewViewManagerFactorySpec_cxx& swiftPart = swiftWrapper->getSwiftPart(); return swiftPart.toUnsafe(); } diff --git a/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Bridge.hpp b/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Bridge.hpp index 501d9e45..6eeb1365 100644 --- a/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Bridge.hpp +++ b/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Bridge.hpp @@ -155,13 +155,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_Wrapper final { public: - explicit Func_void_Wrapper(std::function&& func): _function(std::make_shared>(std::move(func))) {} + explicit Func_void_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {} inline void call() const { _function->operator()(); } private: - std::shared_ptr> _function; - }; + std::unique_ptr> _function; + } SWIFT_NONCOPYABLE; Func_void create_Func_void(void* _Nonnull swiftClosureWrapper); inline Func_void_Wrapper wrap_Func_void(Func_void value) { return Func_void_Wrapper(std::move(value)); @@ -177,13 +177,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_std__exception_ptr_Wrapper final { public: - explicit Func_void_std__exception_ptr_Wrapper(std::function&& func): _function(std::make_shared>(std::move(func))) {} + explicit Func_void_std__exception_ptr_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {} inline void call(std::exception_ptr error) const { _function->operator()(error); } private: - std::shared_ptr> _function; - }; + std::unique_ptr> _function; + } SWIFT_NONCOPYABLE; Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* _Nonnull swiftClosureWrapper); inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) { return Func_void_std__exception_ptr_Wrapper(std::move(value)); @@ -297,13 +297,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_bool_Wrapper final { public: - explicit Func_void_bool_Wrapper(std::function&& func): _function(std::make_shared>(std::move(func))) {} + explicit Func_void_bool_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {} inline void call(bool hasAudioFocus) const { _function->operator()(hasAudioFocus); } private: - std::shared_ptr> _function; - }; + std::unique_ptr> _function; + } SWIFT_NONCOPYABLE; Func_void_bool create_Func_void_bool(void* _Nonnull swiftClosureWrapper); inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) { return Func_void_bool_Wrapper(std::move(value)); @@ -328,13 +328,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_BandwidthData_Wrapper final { public: - explicit Func_void_BandwidthData_Wrapper(std::function&& func): _function(std::make_shared>(std::move(func))) {} + explicit Func_void_BandwidthData_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {} inline void call(BandwidthData data) const { _function->operator()(data); } private: - std::shared_ptr> _function; - }; + std::unique_ptr> _function; + } SWIFT_NONCOPYABLE; Func_void_BandwidthData create_Func_void_BandwidthData(void* _Nonnull swiftClosureWrapper); inline Func_void_BandwidthData_Wrapper wrap_Func_void_BandwidthData(Func_void_BandwidthData value) { return Func_void_BandwidthData_Wrapper(std::move(value)); @@ -350,13 +350,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_onLoadData_Wrapper final { public: - explicit Func_void_onLoadData_Wrapper(std::function&& func): _function(std::make_shared>(std::move(func))) {} + explicit Func_void_onLoadData_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {} inline void call(onLoadData data) const { _function->operator()(data); } private: - std::shared_ptr> _function; - }; + std::unique_ptr> _function; + } SWIFT_NONCOPYABLE; Func_void_onLoadData create_Func_void_onLoadData(void* _Nonnull swiftClosureWrapper); inline Func_void_onLoadData_Wrapper wrap_Func_void_onLoadData(Func_void_onLoadData value) { return Func_void_onLoadData_Wrapper(std::move(value)); @@ -372,13 +372,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_onLoadStartData_Wrapper final { public: - explicit Func_void_onLoadStartData_Wrapper(std::function&& func): _function(std::make_shared>(std::move(func))) {} + explicit Func_void_onLoadStartData_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {} inline void call(onLoadStartData data) const { _function->operator()(data); } private: - std::shared_ptr> _function; - }; + std::unique_ptr> _function; + } SWIFT_NONCOPYABLE; Func_void_onLoadStartData create_Func_void_onLoadStartData(void* _Nonnull swiftClosureWrapper); inline Func_void_onLoadStartData_Wrapper wrap_Func_void_onLoadStartData(Func_void_onLoadStartData value) { return Func_void_onLoadStartData_Wrapper(std::move(value)); @@ -394,13 +394,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_onPlaybackStateChangeData_Wrapper final { public: - explicit Func_void_onPlaybackStateChangeData_Wrapper(std::function&& func): _function(std::make_shared>(std::move(func))) {} + explicit Func_void_onPlaybackStateChangeData_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {} inline void call(onPlaybackStateChangeData data) const { _function->operator()(data); } private: - std::shared_ptr> _function; - }; + std::unique_ptr> _function; + } SWIFT_NONCOPYABLE; Func_void_onPlaybackStateChangeData create_Func_void_onPlaybackStateChangeData(void* _Nonnull swiftClosureWrapper); inline Func_void_onPlaybackStateChangeData_Wrapper wrap_Func_void_onPlaybackStateChangeData(Func_void_onPlaybackStateChangeData value) { return Func_void_onPlaybackStateChangeData_Wrapper(std::move(value)); @@ -416,13 +416,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_double_Wrapper final { public: - explicit Func_void_double_Wrapper(std::function&& func): _function(std::make_shared>(std::move(func))) {} + explicit Func_void_double_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {} inline void call(double rate) const { _function->operator()(rate); } private: - std::shared_ptr> _function; - }; + std::unique_ptr> _function; + } SWIFT_NONCOPYABLE; Func_void_double create_Func_void_double(void* _Nonnull swiftClosureWrapper); inline Func_void_double_Wrapper wrap_Func_void_double(Func_void_double value) { return Func_void_double_Wrapper(std::move(value)); @@ -438,13 +438,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_onProgressData_Wrapper final { public: - explicit Func_void_onProgressData_Wrapper(std::function&& func): _function(std::make_shared>(std::move(func))) {} + explicit Func_void_onProgressData_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {} inline void call(onProgressData data) const { _function->operator()(data); } private: - std::shared_ptr> _function; - }; + std::unique_ptr> _function; + } SWIFT_NONCOPYABLE; Func_void_onProgressData create_Func_void_onProgressData(void* _Nonnull swiftClosureWrapper); inline Func_void_onProgressData_Wrapper wrap_Func_void_onProgressData(Func_void_onProgressData value) { return Func_void_onProgressData_Wrapper(std::move(value)); @@ -471,13 +471,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_TimedMetadata_Wrapper final { public: - explicit Func_void_TimedMetadata_Wrapper(std::function&& func): _function(std::make_shared>(std::move(func))) {} + explicit Func_void_TimedMetadata_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {} inline void call(TimedMetadata metadata) const { _function->operator()(metadata); } private: - std::shared_ptr> _function; - }; + std::unique_ptr> _function; + } SWIFT_NONCOPYABLE; Func_void_TimedMetadata create_Func_void_TimedMetadata(void* _Nonnull swiftClosureWrapper); inline Func_void_TimedMetadata_Wrapper wrap_Func_void_TimedMetadata(Func_void_TimedMetadata value) { return Func_void_TimedMetadata_Wrapper(std::move(value)); @@ -504,13 +504,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_std__vector_std__string__Wrapper final { public: - explicit Func_void_std__vector_std__string__Wrapper(std::function& /* texts */)>&& func): _function(std::make_shared& /* texts */)>>(std::move(func))) {} + explicit Func_void_std__vector_std__string__Wrapper(std::function& /* texts */)>&& func): _function(std::make_unique& /* texts */)>>(std::move(func))) {} inline void call(std::vector texts) const { _function->operator()(texts); } private: - std::shared_ptr& /* texts */)>> _function; - }; + std::unique_ptr& /* texts */)>> _function; + } SWIFT_NONCOPYABLE; Func_void_std__vector_std__string_ create_Func_void_std__vector_std__string_(void* _Nonnull swiftClosureWrapper); inline Func_void_std__vector_std__string__Wrapper wrap_Func_void_std__vector_std__string_(Func_void_std__vector_std__string_ value) { return Func_void_std__vector_std__string__Wrapper(std::move(value)); @@ -526,13 +526,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_std__optional_TextTrack__Wrapper final { public: - explicit Func_void_std__optional_TextTrack__Wrapper(std::function& /* track */)>&& func): _function(std::make_shared& /* track */)>>(std::move(func))) {} + explicit Func_void_std__optional_TextTrack__Wrapper(std::function& /* track */)>&& func): _function(std::make_unique& /* track */)>>(std::move(func))) {} inline void call(std::optional track) const { _function->operator()(track); } private: - std::shared_ptr& /* track */)>> _function; - }; + std::unique_ptr& /* track */)>> _function; + } SWIFT_NONCOPYABLE; Func_void_std__optional_TextTrack_ create_Func_void_std__optional_TextTrack_(void* _Nonnull swiftClosureWrapper); inline Func_void_std__optional_TextTrack__Wrapper wrap_Func_void_std__optional_TextTrack_(Func_void_std__optional_TextTrack_ value) { return Func_void_std__optional_TextTrack__Wrapper(std::move(value)); @@ -548,13 +548,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_onVolumeChangeData_Wrapper final { public: - explicit Func_void_onVolumeChangeData_Wrapper(std::function&& func): _function(std::make_shared>(std::move(func))) {} + explicit Func_void_onVolumeChangeData_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {} inline void call(onVolumeChangeData data) const { _function->operator()(data); } private: - std::shared_ptr> _function; - }; + std::unique_ptr> _function; + } SWIFT_NONCOPYABLE; Func_void_onVolumeChangeData create_Func_void_onVolumeChangeData(void* _Nonnull swiftClosureWrapper); inline Func_void_onVolumeChangeData_Wrapper wrap_Func_void_onVolumeChangeData(Func_void_onVolumeChangeData value) { return Func_void_onVolumeChangeData_Wrapper(std::move(value)); @@ -570,13 +570,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_VideoPlayerStatus_Wrapper final { public: - explicit Func_void_VideoPlayerStatus_Wrapper(std::function&& func): _function(std::make_shared>(std::move(func))) {} + explicit Func_void_VideoPlayerStatus_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {} inline void call(int status) const { _function->operator()(static_cast(status)); } private: - std::shared_ptr> _function; - }; + std::unique_ptr> _function; + } SWIFT_NONCOPYABLE; Func_void_VideoPlayerStatus create_Func_void_VideoPlayerStatus(void* _Nonnull swiftClosureWrapper); inline Func_void_VideoPlayerStatus_Wrapper wrap_Func_void_VideoPlayerStatus(Func_void_VideoPlayerStatus value) { return Func_void_VideoPlayerStatus_Wrapper(std::move(value)); @@ -655,13 +655,13 @@ namespace margelo::nitro::video::bridge::swift { */ class Func_void_VideoInformation_Wrapper final { public: - explicit Func_void_VideoInformation_Wrapper(std::function&& func): _function(std::make_shared>(std::move(func))) {} + explicit Func_void_VideoInformation_Wrapper(std::function&& func): _function(std::make_unique>(std::move(func))) {} inline void call(VideoInformation result) const { _function->operator()(result); } private: - std::shared_ptr> _function; - }; + std::unique_ptr> _function; + } SWIFT_NONCOPYABLE; Func_void_VideoInformation create_Func_void_VideoInformation(void* _Nonnull swiftClosureWrapper); inline Func_void_VideoInformation_Wrapper wrap_Func_void_VideoInformation(Func_void_VideoInformation value) { return Func_void_VideoInformation_Wrapper(std::move(value)); diff --git a/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Umbrella.hpp b/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Umbrella.hpp index 461997e1..a447143d 100644 --- a/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Umbrella.hpp +++ b/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideo-Swift-Cxx-Umbrella.hpp @@ -9,108 +9,53 @@ // Forward declarations of C++ defined types // Forward declaration of `BandwidthData` to properly resolve imports. -namespace margelo::nitro::video { -struct BandwidthData; -} -// Forward declaration of `HybridVideoPlayerEventEmitterSpec` to properly -// resolve imports. -namespace margelo::nitro::video { -class HybridVideoPlayerEventEmitterSpec; -} -// Forward declaration of `HybridVideoPlayerFactorySpec` to properly resolve -// imports. -namespace margelo::nitro::video { -class HybridVideoPlayerFactorySpec; -} -// Forward declaration of `HybridVideoPlayerSourceFactorySpec` to properly -// resolve imports. -namespace margelo::nitro::video { -class HybridVideoPlayerSourceFactorySpec; -} -// Forward declaration of `HybridVideoPlayerSourceSpec` to properly resolve -// imports. -namespace margelo::nitro::video { -class HybridVideoPlayerSourceSpec; -} +namespace margelo::nitro::video { struct BandwidthData; } +// Forward declaration of `HybridVideoPlayerEventEmitterSpec` to properly resolve imports. +namespace margelo::nitro::video { class HybridVideoPlayerEventEmitterSpec; } +// Forward declaration of `HybridVideoPlayerFactorySpec` to properly resolve imports. +namespace margelo::nitro::video { class HybridVideoPlayerFactorySpec; } +// Forward declaration of `HybridVideoPlayerSourceFactorySpec` to properly resolve imports. +namespace margelo::nitro::video { class HybridVideoPlayerSourceFactorySpec; } +// Forward declaration of `HybridVideoPlayerSourceSpec` to properly resolve imports. +namespace margelo::nitro::video { class HybridVideoPlayerSourceSpec; } // Forward declaration of `HybridVideoPlayerSpec` to properly resolve imports. -namespace margelo::nitro::video { -class HybridVideoPlayerSpec; -} -// Forward declaration of `HybridVideoViewViewManagerFactorySpec` to properly -// resolve imports. -namespace margelo::nitro::video { -class HybridVideoViewViewManagerFactorySpec; -} -// Forward declaration of `HybridVideoViewViewManagerSpec` to properly resolve -// imports. -namespace margelo::nitro::video { -class HybridVideoViewViewManagerSpec; -} +namespace margelo::nitro::video { class HybridVideoPlayerSpec; } +// Forward declaration of `HybridVideoViewViewManagerFactorySpec` to properly resolve imports. +namespace margelo::nitro::video { class HybridVideoViewViewManagerFactorySpec; } +// Forward declaration of `HybridVideoViewViewManagerSpec` to properly resolve imports. +namespace margelo::nitro::video { class HybridVideoViewViewManagerSpec; } // Forward declaration of `IgnoreSilentSwitchMode` to properly resolve imports. -namespace margelo::nitro::video { -enum class IgnoreSilentSwitchMode; -} +namespace margelo::nitro::video { enum class IgnoreSilentSwitchMode; } // Forward declaration of `MixAudioMode` to properly resolve imports. -namespace margelo::nitro::video { -enum class MixAudioMode; -} +namespace margelo::nitro::video { enum class MixAudioMode; } // Forward declaration of `NativeExternalSubtitle` to properly resolve imports. -namespace margelo::nitro::video { -struct NativeExternalSubtitle; -} +namespace margelo::nitro::video { struct NativeExternalSubtitle; } // Forward declaration of `NativeVideoConfig` to properly resolve imports. -namespace margelo::nitro::video { -struct NativeVideoConfig; -} +namespace margelo::nitro::video { struct NativeVideoConfig; } // Forward declaration of `ResizeMode` to properly resolve imports. -namespace margelo::nitro::video { -enum class ResizeMode; -} +namespace margelo::nitro::video { enum class ResizeMode; } // Forward declaration of `SourceType` to properly resolve imports. -namespace margelo::nitro::video { -enum class SourceType; -} +namespace margelo::nitro::video { enum class SourceType; } // Forward declaration of `SubtitleType` to properly resolve imports. -namespace margelo::nitro::video { -enum class SubtitleType; -} +namespace margelo::nitro::video { enum class SubtitleType; } // Forward declaration of `TextTrack` to properly resolve imports. -namespace margelo::nitro::video { -struct TextTrack; -} +namespace margelo::nitro::video { struct TextTrack; } // Forward declaration of `TimedMetadataObject` to properly resolve imports. -namespace margelo::nitro::video { -struct TimedMetadataObject; -} +namespace margelo::nitro::video { struct TimedMetadataObject; } // Forward declaration of `TimedMetadata` to properly resolve imports. -namespace margelo::nitro::video { -struct TimedMetadata; -} +namespace margelo::nitro::video { struct TimedMetadata; } // Forward declaration of `VideoInformation` to properly resolve imports. -namespace margelo::nitro::video { -struct VideoInformation; -} +namespace margelo::nitro::video { struct VideoInformation; } // Forward declaration of `VideoOrientation` to properly resolve imports. -namespace margelo::nitro::video { -enum class VideoOrientation; -} +namespace margelo::nitro::video { enum class VideoOrientation; } // Forward declaration of `VideoPlayerStatus` to properly resolve imports. -namespace margelo::nitro::video { -enum class VideoPlayerStatus; -} +namespace margelo::nitro::video { enum class VideoPlayerStatus; } // Forward declaration of `onLoadData` to properly resolve imports. -namespace margelo::nitro::video { -struct onLoadData; -} +namespace margelo::nitro::video { struct onLoadData; } // Forward declaration of `onLoadStartData` to properly resolve imports. -namespace margelo::nitro::video { -struct onLoadStartData; -} -// Forward declaration of `onPlaybackStateChangeData` to properly resolve -// imports. -namespace margelo::nitro::video { -struct onPlaybackStateChangeData; -} +namespace margelo::nitro::video { struct onLoadStartData; } +// Forward declaration of `onPlaybackStateChangeData` to properly resolve imports. +namespace margelo::nitro::video { struct onPlaybackStateChangeData; } // Forward declaration of `onProgressData` to properly resolve imports. namespace margelo::nitro::video { struct onProgressData; } // Forward declaration of `onVolumeChangeData` to properly resolve imports. @@ -157,53 +102,31 @@ namespace margelo::nitro::video { struct onVolumeChangeData; } #include "ReactNativeVideo-Swift-Cxx-Bridge.hpp" // Common C++ types used in Swift -#include #include -#include +#include #include +#include // Forward declarations of Swift defined types -// Forward declaration of `HybridVideoPlayerEventEmitterSpec_cxx` to properly -// resolve imports. -namespace ReactNativeVideo { -class HybridVideoPlayerEventEmitterSpec_cxx; -} -// Forward declaration of `HybridVideoPlayerFactorySpec_cxx` to properly resolve -// imports. -namespace ReactNativeVideo { -class HybridVideoPlayerFactorySpec_cxx; -} -// Forward declaration of `HybridVideoPlayerSourceFactorySpec_cxx` to properly -// resolve imports. -namespace ReactNativeVideo { -class HybridVideoPlayerSourceFactorySpec_cxx; -} -// Forward declaration of `HybridVideoPlayerSourceSpec_cxx` to properly resolve -// imports. -namespace ReactNativeVideo { -class HybridVideoPlayerSourceSpec_cxx; -} -// Forward declaration of `HybridVideoPlayerSpec_cxx` to properly resolve -// imports. -namespace ReactNativeVideo { -class HybridVideoPlayerSpec_cxx; -} -// Forward declaration of `HybridVideoViewViewManagerFactorySpec_cxx` to -// properly resolve imports. -namespace ReactNativeVideo { -class HybridVideoViewViewManagerFactorySpec_cxx; -} -// Forward declaration of `HybridVideoViewViewManagerSpec_cxx` to properly -// resolve imports. -namespace ReactNativeVideo { -class HybridVideoViewViewManagerSpec_cxx; -} +// Forward declaration of `HybridVideoPlayerEventEmitterSpec_cxx` to properly resolve imports. +namespace ReactNativeVideo { class HybridVideoPlayerEventEmitterSpec_cxx; } +// Forward declaration of `HybridVideoPlayerFactorySpec_cxx` to properly resolve imports. +namespace ReactNativeVideo { class HybridVideoPlayerFactorySpec_cxx; } +// Forward declaration of `HybridVideoPlayerSourceFactorySpec_cxx` to properly resolve imports. +namespace ReactNativeVideo { class HybridVideoPlayerSourceFactorySpec_cxx; } +// Forward declaration of `HybridVideoPlayerSourceSpec_cxx` to properly resolve imports. +namespace ReactNativeVideo { class HybridVideoPlayerSourceSpec_cxx; } +// Forward declaration of `HybridVideoPlayerSpec_cxx` to properly resolve imports. +namespace ReactNativeVideo { class HybridVideoPlayerSpec_cxx; } +// Forward declaration of `HybridVideoViewViewManagerFactorySpec_cxx` to properly resolve imports. +namespace ReactNativeVideo { class HybridVideoViewViewManagerFactorySpec_cxx; } +// Forward declaration of `HybridVideoViewViewManagerSpec_cxx` to properly resolve imports. +namespace ReactNativeVideo { class HybridVideoViewViewManagerSpec_cxx; } // Include Swift defined types #if __has_include("ReactNativeVideo-Swift.h") // This header is generated by Xcode/Swift on every app build. -// If it cannot be found, make sure the Swift module's name (= podspec name) is -// actually "ReactNativeVideo". +// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "ReactNativeVideo". #include "ReactNativeVideo-Swift.h" // Same as above, but used when building with frameworks (`use_frameworks`) #elif __has_include() diff --git a/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideoAutolinking.mm b/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideoAutolinking.mm index 43a8a36e..dde6b89e 100644 --- a/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideoAutolinking.mm +++ b/packages/react-native-video/nitrogen/generated/ios/ReactNativeVideoAutolinking.mm @@ -6,7 +6,6 @@ /// #import -#import #import #import "ReactNativeVideo-Swift-Cxx-Umbrella.hpp" #import diff --git a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerEventEmitterSpecSwift.hpp b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerEventEmitterSpecSwift.hpp index 5d30240b..e37e162b 100644 --- a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerEventEmitterSpecSwift.hpp +++ b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerEventEmitterSpecSwift.hpp @@ -51,8 +51,8 @@ namespace margelo::nitro::video { enum class VideoPlayerStatus; } #include "onPlaybackStateChangeData.hpp" #include "onProgressData.hpp" #include "TimedMetadata.hpp" -#include #include "TimedMetadataObject.hpp" +#include #include #include "TextTrack.hpp" #include "onVolumeChangeData.hpp" @@ -86,10 +86,12 @@ namespace margelo::nitro::video { } public: - // Get memory pressure inline size_t getExternalMemorySize() noexcept override { return _swiftPart.getMemorySize(); } + void dispose() noexcept override { + _swiftPart.dispose(); + } public: // Properties diff --git a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerFactorySpecSwift.hpp b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerFactorySpecSwift.hpp index cbd7d4d5..b0221a71 100644 --- a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerFactorySpecSwift.hpp +++ b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerFactorySpecSwift.hpp @@ -49,10 +49,12 @@ namespace margelo::nitro::video { } public: - // Get memory pressure inline size_t getExternalMemorySize() noexcept override { return _swiftPart.getMemorySize(); } + void dispose() noexcept override { + _swiftPart.dispose(); + } public: // Properties diff --git a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerSourceFactorySpecSwift.hpp b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerSourceFactorySpecSwift.hpp index 09a468d9..393c3c41 100644 --- a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerSourceFactorySpecSwift.hpp +++ b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerSourceFactorySpecSwift.hpp @@ -25,9 +25,9 @@ namespace margelo::nitro::video { enum class SubtitleType; } #include "HybridVideoPlayerSourceSpec.hpp" #include #include "NativeVideoConfig.hpp" -#include -#include #include "NativeExternalSubtitle.hpp" +#include +#include #include "SubtitleType.hpp" #include @@ -59,10 +59,12 @@ namespace margelo::nitro::video { } public: - // Get memory pressure inline size_t getExternalMemorySize() noexcept override { return _swiftPart.getMemorySize(); } + void dispose() noexcept override { + _swiftPart.dispose(); + } public: // Properties diff --git a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerSourceSpecSwift.hpp b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerSourceSpecSwift.hpp index 85720b3b..b9d8fb55 100644 --- a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerSourceSpecSwift.hpp +++ b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerSourceSpecSwift.hpp @@ -25,13 +25,13 @@ namespace margelo::nitro::video { enum class VideoOrientation; } #include #include "NativeVideoConfig.hpp" -#include -#include #include "NativeExternalSubtitle.hpp" +#include +#include #include "SubtitleType.hpp" #include -#include #include "VideoInformation.hpp" +#include #include "VideoOrientation.hpp" #include "ReactNativeVideo-Swift-Cxx-Umbrella.hpp" @@ -62,10 +62,12 @@ namespace margelo::nitro::video { } public: - // Get memory pressure inline size_t getExternalMemorySize() noexcept override { return _swiftPart.getMemorySize(); } + void dispose() noexcept override { + _swiftPart.dispose(); + } public: // Properties diff --git a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerSpecSwift.hpp b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerSpecSwift.hpp index 143404ce..2aa557ac 100644 --- a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerSpecSwift.hpp +++ b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoPlayerSpecSwift.hpp @@ -31,8 +31,8 @@ namespace margelo::nitro::video { struct TextTrack; } #include "VideoPlayerStatus.hpp" #include "MixAudioMode.hpp" #include "IgnoreSilentSwitchMode.hpp" -#include #include "TextTrack.hpp" +#include #include #include #include @@ -65,10 +65,12 @@ namespace margelo::nitro::video { } public: - // Get memory pressure inline size_t getExternalMemorySize() noexcept override { return _swiftPart.getMemorySize(); } + void dispose() noexcept override { + _swiftPart.dispose(); + } public: // Properties @@ -175,12 +177,6 @@ namespace margelo::nitro::video { std::rethrow_exception(__result.error()); } } - inline void clean() override { - auto __result = _swiftPart.clean(); - if (__result.hasError()) [[unlikely]] { - std::rethrow_exception(__result.error()); - } - } inline std::shared_ptr> preload() override { auto __result = _swiftPart.preload(); if (__result.hasError()) [[unlikely]] { diff --git a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoViewViewManagerFactorySpecSwift.hpp b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoViewViewManagerFactorySpecSwift.hpp index 16e93749..006c69bd 100644 --- a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoViewViewManagerFactorySpecSwift.hpp +++ b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoViewViewManagerFactorySpecSwift.hpp @@ -46,10 +46,12 @@ namespace margelo::nitro::video { } public: - // Get memory pressure inline size_t getExternalMemorySize() noexcept override { return _swiftPart.getMemorySize(); } + void dispose() noexcept override { + _swiftPart.dispose(); + } public: // Properties diff --git a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoViewViewManagerSpecSwift.hpp b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoViewViewManagerSpecSwift.hpp index 45417e87..97fa8aee 100644 --- a/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoViewViewManagerSpecSwift.hpp +++ b/packages/react-native-video/nitrogen/generated/ios/c++/HybridVideoViewViewManagerSpecSwift.hpp @@ -17,9 +17,9 @@ namespace margelo::nitro::video { class HybridVideoPlayerSpec; } // Forward declaration of `ResizeMode` to properly resolve imports. namespace margelo::nitro::video { enum class ResizeMode; } -#include #include #include "HybridVideoPlayerSpec.hpp" +#include #include "ResizeMode.hpp" #include @@ -51,10 +51,12 @@ namespace margelo::nitro::video { } public: - // Get memory pressure inline size_t getExternalMemorySize() noexcept override { return _swiftPart.getMemorySize(); } + void dispose() noexcept override { + _swiftPart.dispose(); + } public: // Properties diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void.swift index f1976e1f..48b038a9 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `() -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_BandwidthData.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_BandwidthData.swift index df714ea9..59b81f4a 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_BandwidthData.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_BandwidthData.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ data: BandwidthData) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_TimedMetadata.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_TimedMetadata.swift index 04224e5f..f7efc07e 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_TimedMetadata.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_TimedMetadata.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ metadata: TimedMetadata) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_VideoInformation.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_VideoInformation.swift index 46eacb09..db0d4ad7 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_VideoInformation.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_VideoInformation.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ value: VideoInformation) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_VideoPlayerStatus.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_VideoPlayerStatus.swift index 58130add..183d16ae 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_VideoPlayerStatus.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_VideoPlayerStatus.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ status: VideoPlayerStatus) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_bool.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_bool.swift index 7dfc62de..a3afa7f4 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_bool.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_bool.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ fullscreen: Bool) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_double.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_double.swift index 92e53bec..cd1dc433 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_double.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_double.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ seekTime: Double) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onLoadData.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onLoadData.swift index fb4cb6d9..af153509 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onLoadData.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onLoadData.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ data: onLoadData) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onLoadStartData.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onLoadStartData.swift index 25aed2bc..7ffdd51f 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onLoadStartData.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onLoadStartData.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ data: onLoadStartData) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onPlaybackStateChangeData.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onPlaybackStateChangeData.swift index b59f5cc0..16cfa823 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onPlaybackStateChangeData.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onPlaybackStateChangeData.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ data: onPlaybackStateChangeData) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onProgressData.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onProgressData.swift index 4df0ea8e..fd7efea8 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onProgressData.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onProgressData.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ data: onProgressData) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onVolumeChangeData.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onVolumeChangeData.swift index 430f29a0..9162496e 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onVolumeChangeData.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_onVolumeChangeData.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ data: onVolumeChangeData) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift index 5af7c948..1ff9b139 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ error: Error) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_std__optional_TextTrack_.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_std__optional_TextTrack_.swift index db52f38e..10883953 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_std__optional_TextTrack_.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_std__optional_TextTrack_.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ track: TextTrack?) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift index fd5973a4..0836c42c 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift @@ -7,6 +7,7 @@ import NitroModules + /** * Wraps a Swift `(_ texts: [String]) -> Void` as a class. * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`. diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec.swift index 97ede6b8..b55259ab 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec.swift @@ -36,8 +36,9 @@ public protocol HybridVideoPlayerEventEmitterSpec_protocol: HybridObject { } /// See ``HybridVideoPlayerEventEmitterSpec`` -public class HybridVideoPlayerEventEmitterSpec_base { +open class HybridVideoPlayerEventEmitterSpec_base { private weak var cxxWrapper: HybridVideoPlayerEventEmitterSpec_cxx? = nil + public init() { } public func getCxxWrapper() -> HybridVideoPlayerEventEmitterSpec_cxx { #if DEBUG guard self is HybridVideoPlayerEventEmitterSpec else { diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec_cxx.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec_cxx.swift index 7ec7b3e4..b7b57c32 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec_cxx.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerEventEmitterSpec_cxx.swift @@ -17,7 +17,7 @@ import NitroModules * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper * - Throwing methods need to be wrapped with a Result type, as exceptions cannot be propagated to C++ */ -public class HybridVideoPlayerEventEmitterSpec_cxx { +open class HybridVideoPlayerEventEmitterSpec_cxx { /** * The Swift <> C++ bridge's namespace (`margelo::nitro::video::bridge::swift`) * from `ReactNativeVideo-Swift-Cxx-Bridge.hpp`. @@ -96,6 +96,15 @@ public class HybridVideoPlayerEventEmitterSpec_cxx { return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize } + /** + * Call dispose() on the Swift class. + * This _may_ be called manually from JS. + */ + @inline(__always) + public func dispose() { + self.__implementation.dispose() + } + // Properties public final var onAudioBecomingNoisy: bridge.Func_void { @inline(__always) diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec.swift index e3dd9c19..a3ef9be8 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec.swift @@ -18,8 +18,9 @@ public protocol HybridVideoPlayerFactorySpec_protocol: HybridObject { } /// See ``HybridVideoPlayerFactorySpec`` -public class HybridVideoPlayerFactorySpec_base { +open class HybridVideoPlayerFactorySpec_base { private weak var cxxWrapper: HybridVideoPlayerFactorySpec_cxx? = nil + public init() { } public func getCxxWrapper() -> HybridVideoPlayerFactorySpec_cxx { #if DEBUG guard self is HybridVideoPlayerFactorySpec else { diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec_cxx.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec_cxx.swift index 0175e2b1..8b3b6da2 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec_cxx.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerFactorySpec_cxx.swift @@ -17,7 +17,7 @@ import NitroModules * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper * - Throwing methods need to be wrapped with a Result type, as exceptions cannot be propagated to C++ */ -public class HybridVideoPlayerFactorySpec_cxx { +open class HybridVideoPlayerFactorySpec_cxx { /** * The Swift <> C++ bridge's namespace (`margelo::nitro::video::bridge::swift`) * from `ReactNativeVideo-Swift-Cxx-Bridge.hpp`. @@ -96,6 +96,15 @@ public class HybridVideoPlayerFactorySpec_cxx { return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize } + /** + * Call dispose() on the Swift class. + * This _may_ be called manually from JS. + */ + @inline(__always) + public func dispose() { + self.__implementation.dispose() + } + // Properties diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec.swift index 6f0be3cd..7f2f1034 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec.swift @@ -19,8 +19,9 @@ public protocol HybridVideoPlayerSourceFactorySpec_protocol: HybridObject { } /// See ``HybridVideoPlayerSourceFactorySpec`` -public class HybridVideoPlayerSourceFactorySpec_base { +open class HybridVideoPlayerSourceFactorySpec_base { private weak var cxxWrapper: HybridVideoPlayerSourceFactorySpec_cxx? = nil + public init() { } public func getCxxWrapper() -> HybridVideoPlayerSourceFactorySpec_cxx { #if DEBUG guard self is HybridVideoPlayerSourceFactorySpec else { diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec_cxx.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec_cxx.swift index e4d1f7f2..2e075da4 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec_cxx.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceFactorySpec_cxx.swift @@ -17,7 +17,7 @@ import NitroModules * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper * - Throwing methods need to be wrapped with a Result type, as exceptions cannot be propagated to C++ */ -public class HybridVideoPlayerSourceFactorySpec_cxx { +open class HybridVideoPlayerSourceFactorySpec_cxx { /** * The Swift <> C++ bridge's namespace (`margelo::nitro::video::bridge::swift`) * from `ReactNativeVideo-Swift-Cxx-Bridge.hpp`. @@ -96,6 +96,15 @@ public class HybridVideoPlayerSourceFactorySpec_cxx { return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize } + /** + * Call dispose() on the Swift class. + * This _may_ be called manually from JS. + */ + @inline(__always) + public func dispose() { + self.__implementation.dispose() + } + // Properties diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec.swift index 2c35a592..0bf86e9a 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec.swift @@ -19,8 +19,9 @@ public protocol HybridVideoPlayerSourceSpec_protocol: HybridObject { } /// See ``HybridVideoPlayerSourceSpec`` -public class HybridVideoPlayerSourceSpec_base { +open class HybridVideoPlayerSourceSpec_base { private weak var cxxWrapper: HybridVideoPlayerSourceSpec_cxx? = nil + public init() { } public func getCxxWrapper() -> HybridVideoPlayerSourceSpec_cxx { #if DEBUG guard self is HybridVideoPlayerSourceSpec else { diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec_cxx.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec_cxx.swift index 099e5e70..f302d6e6 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec_cxx.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSourceSpec_cxx.swift @@ -17,7 +17,7 @@ import NitroModules * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper * - Throwing methods need to be wrapped with a Result type, as exceptions cannot be propagated to C++ */ -public class HybridVideoPlayerSourceSpec_cxx { +open class HybridVideoPlayerSourceSpec_cxx { /** * The Swift <> C++ bridge's namespace (`margelo::nitro::video::bridge::swift`) * from `ReactNativeVideo-Swift-Cxx-Bridge.hpp`. @@ -96,6 +96,15 @@ public class HybridVideoPlayerSourceSpec_cxx { return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize } + /** + * Call dispose() on the Swift class. + * This _may_ be called manually from JS. + */ + @inline(__always) + public func dispose() { + self.__implementation.dispose() + } + // Properties public final var uri: std.string { @inline(__always) diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSpec.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSpec.swift index 5857c87e..1b5ef107 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSpec.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSpec.swift @@ -31,7 +31,6 @@ public protocol HybridVideoPlayerSpec_protocol: HybridObject { func replaceSourceAsync(source: (any HybridVideoPlayerSourceSpec)?) throws -> Promise func getAvailableTextTracks() throws -> [TextTrack] func selectTextTrack(textTrack: TextTrack?) throws -> Void - func clean() throws -> Void func preload() throws -> Promise func play() throws -> Void func pause() throws -> Void @@ -40,8 +39,9 @@ public protocol HybridVideoPlayerSpec_protocol: HybridObject { } /// See ``HybridVideoPlayerSpec`` -public class HybridVideoPlayerSpec_base { +open class HybridVideoPlayerSpec_base { private weak var cxxWrapper: HybridVideoPlayerSpec_cxx? = nil + public init() { } public func getCxxWrapper() -> HybridVideoPlayerSpec_cxx { #if DEBUG guard self is HybridVideoPlayerSpec else { diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSpec_cxx.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSpec_cxx.swift index daae5c98..a2610e2b 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSpec_cxx.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoPlayerSpec_cxx.swift @@ -17,7 +17,7 @@ import NitroModules * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper * - Throwing methods need to be wrapped with a Result type, as exceptions cannot be propagated to C++ */ -public class HybridVideoPlayerSpec_cxx { +open class HybridVideoPlayerSpec_cxx { /** * The Swift <> C++ bridge's namespace (`margelo::nitro::video::bridge::swift`) * from `ReactNativeVideo-Swift-Cxx-Bridge.hpp`. @@ -96,6 +96,15 @@ public class HybridVideoPlayerSpec_cxx { return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize } + /** + * Call dispose() on the Swift class. + * This _may_ be called manually from JS. + */ + @inline(__always) + public func dispose() { + self.__implementation.dispose() + } + // Properties public final var source: bridge.std__shared_ptr_margelo__nitro__video__HybridVideoPlayerSourceSpec_ { @inline(__always) @@ -315,17 +324,6 @@ public class HybridVideoPlayerSpec_cxx { } } - @inline(__always) - public final func clean() -> bridge.Result_void_ { - do { - try self.__implementation.clean() - return bridge.create_Result_void_() - } catch (let __error) { - let __exceptionPtr = __error.toCpp() - return bridge.create_Result_void_(__exceptionPtr) - } - } - @inline(__always) public final func preload() -> bridge.Result_std__shared_ptr_Promise_void___ { do { diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec.swift index e8217322..cdbbbe1e 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec.swift @@ -18,8 +18,9 @@ public protocol HybridVideoViewViewManagerFactorySpec_protocol: HybridObject { } /// See ``HybridVideoViewViewManagerFactorySpec`` -public class HybridVideoViewViewManagerFactorySpec_base { +open class HybridVideoViewViewManagerFactorySpec_base { private weak var cxxWrapper: HybridVideoViewViewManagerFactorySpec_cxx? = nil + public init() { } public func getCxxWrapper() -> HybridVideoViewViewManagerFactorySpec_cxx { #if DEBUG guard self is HybridVideoViewViewManagerFactorySpec else { diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec_cxx.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec_cxx.swift index d6ab0d60..e4c9a1d5 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec_cxx.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerFactorySpec_cxx.swift @@ -17,7 +17,7 @@ import NitroModules * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper * - Throwing methods need to be wrapped with a Result type, as exceptions cannot be propagated to C++ */ -public class HybridVideoViewViewManagerFactorySpec_cxx { +open class HybridVideoViewViewManagerFactorySpec_cxx { /** * The Swift <> C++ bridge's namespace (`margelo::nitro::video::bridge::swift`) * from `ReactNativeVideo-Swift-Cxx-Bridge.hpp`. @@ -96,6 +96,15 @@ public class HybridVideoViewViewManagerFactorySpec_cxx { return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize } + /** + * Call dispose() on the Swift class. + * This _may_ be called manually from JS. + */ + @inline(__always) + public func dispose() { + self.__implementation.dispose() + } + // Properties diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec.swift index 9919843a..18b22309 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec.swift @@ -32,8 +32,9 @@ public protocol HybridVideoViewViewManagerSpec_protocol: HybridObject { } /// See ``HybridVideoViewViewManagerSpec`` -public class HybridVideoViewViewManagerSpec_base { +open class HybridVideoViewViewManagerSpec_base { private weak var cxxWrapper: HybridVideoViewViewManagerSpec_cxx? = nil + public init() { } public func getCxxWrapper() -> HybridVideoViewViewManagerSpec_cxx { #if DEBUG guard self is HybridVideoViewViewManagerSpec else { diff --git a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec_cxx.swift b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec_cxx.swift index 3b65052d..a93ab097 100644 --- a/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec_cxx.swift +++ b/packages/react-native-video/nitrogen/generated/ios/swift/HybridVideoViewViewManagerSpec_cxx.swift @@ -17,7 +17,7 @@ import NitroModules * - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper * - Throwing methods need to be wrapped with a Result type, as exceptions cannot be propagated to C++ */ -public class HybridVideoViewViewManagerSpec_cxx { +open class HybridVideoViewViewManagerSpec_cxx { /** * The Swift <> C++ bridge's namespace (`margelo::nitro::video::bridge::swift`) * from `ReactNativeVideo-Swift-Cxx-Bridge.hpp`. @@ -96,6 +96,15 @@ public class HybridVideoViewViewManagerSpec_cxx { return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize } + /** + * Call dispose() on the Swift class. + * This _may_ be called manually from JS. + */ + @inline(__always) + public func dispose() { + self.__implementation.dispose() + } + // Properties public final var player: bridge.std__optional_std__shared_ptr_margelo__nitro__video__HybridVideoPlayerSpec__ { @inline(__always) diff --git a/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerEventEmitterSpec.hpp b/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerEventEmitterSpec.hpp index fb716979..d5fac00b 100644 --- a/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerEventEmitterSpec.hpp +++ b/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerEventEmitterSpec.hpp @@ -39,10 +39,10 @@ namespace margelo::nitro::video { enum class VideoPlayerStatus; } #include "onPlaybackStateChangeData.hpp" #include "onProgressData.hpp" #include "TimedMetadata.hpp" -#include #include -#include +#include #include "TextTrack.hpp" +#include #include "onVolumeChangeData.hpp" #include "VideoPlayerStatus.hpp" diff --git a/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerSourceSpec.hpp b/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerSourceSpec.hpp index e87441ca..cff24f42 100644 --- a/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerSourceSpec.hpp +++ b/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerSourceSpec.hpp @@ -20,8 +20,8 @@ namespace margelo::nitro::video { struct VideoInformation; } #include #include "NativeVideoConfig.hpp" -#include #include "VideoInformation.hpp" +#include namespace margelo::nitro::video { diff --git a/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.cpp b/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.cpp index c3fc84e2..c6cc919b 100644 --- a/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.cpp +++ b/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.cpp @@ -41,7 +41,6 @@ namespace margelo::nitro::video { prototype.registerHybridMethod("replaceSourceAsync", &HybridVideoPlayerSpec::replaceSourceAsync); prototype.registerHybridMethod("getAvailableTextTracks", &HybridVideoPlayerSpec::getAvailableTextTracks); prototype.registerHybridMethod("selectTextTrack", &HybridVideoPlayerSpec::selectTextTrack); - prototype.registerHybridMethod("clean", &HybridVideoPlayerSpec::clean); prototype.registerHybridMethod("preload", &HybridVideoPlayerSpec::preload); prototype.registerHybridMethod("play", &HybridVideoPlayerSpec::play); prototype.registerHybridMethod("pause", &HybridVideoPlayerSpec::pause); @@ -50,8 +49,4 @@ namespace margelo::nitro::video { }); } - void HybridVideoPlayerSpec::dispose() { - clean(); - HybridObject::dispose(); - } } // namespace margelo::nitro::video diff --git a/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.hpp b/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.hpp index a27e2939..5f78908c 100644 --- a/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.hpp +++ b/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoPlayerSpec.hpp @@ -32,8 +32,8 @@ namespace margelo::nitro::video { struct TextTrack; } #include "VideoPlayerStatus.hpp" #include "MixAudioMode.hpp" #include "IgnoreSilentSwitchMode.hpp" -#include #include "TextTrack.hpp" +#include #include #include @@ -94,7 +94,6 @@ namespace margelo::nitro::video { virtual std::shared_ptr> replaceSourceAsync(const std::optional>& source) = 0; virtual std::vector getAvailableTextTracks() = 0; virtual void selectTextTrack(const std::optional& textTrack) = 0; - virtual void clean() = 0; virtual std::shared_ptr> preload() = 0; virtual void play() = 0; virtual void pause() = 0; @@ -104,7 +103,6 @@ namespace margelo::nitro::video { protected: // Hybrid Setup void loadHybridMethods() override; - void dispose() override; protected: // Tag for logging diff --git a/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoViewViewManagerSpec.hpp b/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoViewViewManagerSpec.hpp index 85524afa..524c4a92 100644 --- a/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoViewViewManagerSpec.hpp +++ b/packages/react-native-video/nitrogen/generated/shared/c++/HybridVideoViewViewManagerSpec.hpp @@ -18,9 +18,9 @@ namespace margelo::nitro::video { class HybridVideoPlayerSpec; } // Forward declaration of `ResizeMode` to properly resolve imports. namespace margelo::nitro::video { enum class ResizeMode; } -#include #include #include "HybridVideoPlayerSpec.hpp" +#include #include "ResizeMode.hpp" #include diff --git a/packages/react-native-video/nitrogen/generated/shared/c++/NativeVideoConfig.hpp b/packages/react-native-video/nitrogen/generated/shared/c++/NativeVideoConfig.hpp index bf1db68f..29fc2040 100644 --- a/packages/react-native-video/nitrogen/generated/shared/c++/NativeVideoConfig.hpp +++ b/packages/react-native-video/nitrogen/generated/shared/c++/NativeVideoConfig.hpp @@ -22,9 +22,9 @@ namespace margelo::nitro::video { struct NativeExternalSubtitle; } #include -#include -#include #include "NativeExternalSubtitle.hpp" +#include +#include #include namespace margelo::nitro::video { diff --git a/packages/react-native-video/nitrogen/generated/shared/c++/TimedMetadata.hpp b/packages/react-native-video/nitrogen/generated/shared/c++/TimedMetadata.hpp index 83fa6516..8d3c9ddb 100644 --- a/packages/react-native-video/nitrogen/generated/shared/c++/TimedMetadata.hpp +++ b/packages/react-native-video/nitrogen/generated/shared/c++/TimedMetadata.hpp @@ -21,8 +21,8 @@ // Forward declaration of `TimedMetadataObject` to properly resolve imports. namespace margelo::nitro::video { struct TimedMetadataObject; } -#include #include "TimedMetadataObject.hpp" +#include namespace margelo::nitro::video { diff --git a/packages/react-native-video/package.json b/packages/react-native-video/package.json index 8aaca2ea..3c3b0a2f 100644 --- a/packages/react-native-video/package.json +++ b/packages/react-native-video/package.json @@ -79,13 +79,13 @@ "eslint": "^8.51.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.1", - "nitro-codegen": ">=0.26.0", + "nitro-codegen": "^0.27.0", "prettier": "^3.0.3", "react": "18.3.1", "react-native": "^0.77.0", "@react-native/eslint-config": "^0.77.0", "react-native-builder-bob": "^0.40.0", - "react-native-nitro-modules": ">=0.26.0", + "react-native-nitro-modules": "^0.27.0", "typescript": "^5.2.2" }, "resolutions": { @@ -94,7 +94,7 @@ "peerDependencies": { "react": "*", "react-native": "*", - "react-native-nitro-modules": ">=0.25.0" + "react-native-nitro-modules": ">=0.27.2" }, "release-it": { "npm": { diff --git a/packages/react-native-video/src/core/VideoPlayer.ts b/packages/react-native-video/src/core/VideoPlayer.ts index 66bf4fde..034bad86 100644 --- a/packages/react-native-video/src/core/VideoPlayer.ts +++ b/packages/react-native-video/src/core/VideoPlayer.ts @@ -57,11 +57,8 @@ class VideoPlayer extends VideoPlayerEvents implements VideoPlayerBase { private throwError(error: unknown) { const parsedError = tryParseNativeVideoError(error); - if (parsedError instanceof VideoRuntimeError) { - if (this.onError) { - this.onError(parsedError); - } - + if (parsedError instanceof VideoRuntimeError && this.onError) { + this.onError(parsedError); // We don't throw errors if onError is provided return; } diff --git a/packages/react-native-video/src/spec/nitro/VideoPlayer.nitro.ts b/packages/react-native-video/src/spec/nitro/VideoPlayer.nitro.ts index cd279428..62b0dfde 100644 --- a/packages/react-native-video/src/spec/nitro/VideoPlayer.nitro.ts +++ b/packages/react-native-video/src/spec/nitro/VideoPlayer.nitro.ts @@ -26,12 +26,6 @@ export interface VideoPlayer * @param textTrack - Text track to select, or null to unselect current track */ selectTextTrack(textTrack: TextTrack | null): void; - - /** - * Release the player resources. - * It's shouldn't be called manually. You should use the `dispose` method instead. - */ - clean(): void; } export interface VideoPlayerFactory