@react-native-video/drm 7.0.0-beta.0 → 7.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,6 +33,12 @@ namespace margelo::nitro::videodrm {
33
33
  method(_javaPart);
34
34
  }
35
35
 
36
+ std::string JHybridPluginManagerSpec::toString() {
37
+ static const auto method = javaClassStatic()->getMethod<jni::JString()>("toString");
38
+ auto javaString = method(_javaPart);
39
+ return javaString->toStdString();
40
+ }
41
+
36
42
  // Properties
37
43
  bool JHybridPluginManagerSpec::getIsEnabled() {
38
44
  static const auto method = javaClassStatic()->getMethod<jboolean()>("isEnabled");
@@ -41,6 +41,7 @@ namespace margelo::nitro::videodrm {
41
41
  public:
42
42
  size_t getExternalMemorySize() noexcept override;
43
43
  void dispose() noexcept override;
44
+ std::string toString() override;
44
45
 
45
46
  public:
46
47
  inline const jni::global_ref<JHybridPluginManagerSpec::javaobject>& getJavaPart() const noexcept {
@@ -10,7 +10,7 @@ package com.margelo.nitro.videodrm
10
10
  import androidx.annotation.Keep
11
11
  import com.facebook.jni.HybridData
12
12
  import com.facebook.proguard.annotations.DoNotStrip
13
- import com.margelo.nitro.core.*
13
+ import com.margelo.nitro.core.HybridObject
14
14
 
15
15
  /**
16
16
  * A Kotlin class representing the PluginManager HybridObject.
@@ -36,6 +36,11 @@ abstract class HybridPluginManagerSpec: HybridObject() {
36
36
  super.updateNative(hybridData)
37
37
  }
38
38
 
39
+ // Default implementation of `HybridObject.toString()`
40
+ override fun toString(): String {
41
+ return "[HybridObject PluginManager]"
42
+ }
43
+
39
44
  // Properties
40
45
  @get:DoNotStrip
41
46
  @get:Keep
@@ -10,6 +10,7 @@
10
10
  // Include C++ implementation defined types
11
11
  #include "HybridPluginManagerSpecSwift.hpp"
12
12
  #include "ReactNativeVideoDrm-Swift-Cxx-Umbrella.hpp"
13
+ #include <NitroModules/NitroDefines.hpp>
13
14
 
14
15
  namespace margelo::nitro::videodrm::bridge::swift {
15
16
 
@@ -50,6 +50,9 @@ namespace margelo::nitro::videodrm {
50
50
  void dispose() noexcept override {
51
51
  _swiftPart.dispose();
52
52
  }
53
+ std::string toString() override {
54
+ return _swiftPart.toString();
55
+ }
53
56
 
54
57
  public:
55
58
  // Properties
@@ -18,6 +18,13 @@ public protocol HybridPluginManagerSpec_protocol: HybridObject {
18
18
  func disable() throws -> Void
19
19
  }
20
20
 
21
+ public extension HybridPluginManagerSpec_protocol {
22
+ /// Default implementation of ``HybridObject.toString``
23
+ func toString() -> String {
24
+ return "[HybridObject PluginManager]"
25
+ }
26
+ }
27
+
21
28
  /// See ``HybridPluginManagerSpec``
22
29
  open class HybridPluginManagerSpec_base {
23
30
  private weak var cxxWrapper: HybridPluginManagerSpec_cxx? = nil
@@ -76,7 +76,7 @@ open class HybridPluginManagerSpec_cxx {
76
76
  */
77
77
  public func getCxxPart() -> bridge.std__shared_ptr_HybridPluginManagerSpec_ {
78
78
  let cachedCxxPart = self.__cxxPart.lock()
79
- if cachedCxxPart.__convertToBool() {
79
+ if Bool(fromCxx: cachedCxxPart) {
80
80
  return cachedCxxPart
81
81
  } else {
82
82
  let newCxxPart = bridge.create_std__shared_ptr_HybridPluginManagerSpec_(self.toUnsafe())
@@ -105,6 +105,14 @@ open class HybridPluginManagerSpec_cxx {
105
105
  self.__implementation.dispose()
106
106
  }
107
107
 
108
+ /**
109
+ * Call toString() on the Swift class.
110
+ */
111
+ @inline(__always)
112
+ public func toString() -> String {
113
+ return self.__implementation.toString()
114
+ }
115
+
108
116
  // Properties
109
117
  public final var isEnabled: Bool {
110
118
  @inline(__always)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-video/drm",
3
- "version": "7.0.0-beta.0",
3
+ "version": "7.0.0-beta.3",
4
4
  "description": "DRM plugin for react-native-video",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -72,12 +72,12 @@
72
72
  "eslint": "^8.51.0",
73
73
  "eslint-config-prettier": "9.0.0",
74
74
  "eslint-plugin-prettier": "^5.0.1",
75
- "nitrogen": "^0.30.0",
75
+ "nitrogen": "^0.31.0",
76
76
  "prettier": "^3.0.3",
77
77
  "react": "18.3.1",
78
78
  "react-native": "^0.77.0",
79
79
  "react-native-builder-bob": "^0.40.13",
80
- "react-native-nitro-modules": "^0.30.0",
80
+ "react-native-nitro-modules": "^0.31.0",
81
81
  "release-it": "^17.10.0",
82
82
  "typescript": "^5.8.3",
83
83
  "react-native-video": "*"