vdocipher-rn-bridge 1.17.4 → 1.17.6
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.
- package/android/build.gradle +3 -3
- package/android/src/main/java/com/vdocipher/rnbridge/ReactVdoPlayerUIView.java +8 -2
- package/android/src/main/java/com/vdocipher/rnbridge/ReactVdoPlayerView.java +8 -2
- package/android/src/main/java/com/vdocipher/rnbridge/VdoDownloadModule.java +6 -0
- package/ios/RCTVdoPlayerUIView.swift +8 -3
- package/ios/VdocipherRnBridgeViewManager.swift +1 -1
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -18,8 +18,8 @@ apply plugin: 'com.android.library'
|
|
|
18
18
|
// TODO read from package.json
|
|
19
19
|
// "releaseVersionName" must be the same as "version" in package.json
|
|
20
20
|
// "releaseVersionCode" must increment by 1 with every release
|
|
21
|
-
def releaseVersionName = "1.17.
|
|
22
|
-
def releaseVersionCode =
|
|
21
|
+
def releaseVersionName = "1.17.6"
|
|
22
|
+
def releaseVersionCode = 27
|
|
23
23
|
|
|
24
24
|
android {
|
|
25
25
|
compileSdkVersion 33
|
|
@@ -86,5 +86,5 @@ repositories {
|
|
|
86
86
|
dependencies {
|
|
87
87
|
compileOnly 'com.facebook.react:react-native:+'
|
|
88
88
|
implementation 'androidx.appcompat:appcompat:1.3.1'
|
|
89
|
-
implementation 'com.vdocipher.aegis:vdocipher-android:1.23.
|
|
89
|
+
implementation 'com.vdocipher.aegis:vdocipher-android:1.23.4'
|
|
90
90
|
}
|
|
@@ -209,7 +209,9 @@ public class ReactVdoPlayerUIView extends FrameLayout implements LifecycleEventL
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
public void setResizeMode(String resizeModeName) {
|
|
212
|
-
|
|
212
|
+
if (resizeModeName != null && !resizeModeName.isEmpty()) {
|
|
213
|
+
this.resizeMode = resizeModeIntFromName(resizeModeName);
|
|
214
|
+
}
|
|
213
215
|
}
|
|
214
216
|
|
|
215
217
|
public void setAspectRatio(float aspectRatio) {
|
|
@@ -428,7 +430,11 @@ public class ReactVdoPlayerUIView extends FrameLayout implements LifecycleEventL
|
|
|
428
430
|
|
|
429
431
|
public void load(VdoInitParams params) {
|
|
430
432
|
if (vdoPlayer != null && params != null) {
|
|
431
|
-
|
|
433
|
+
try {
|
|
434
|
+
vdoPlayer.load(params);
|
|
435
|
+
} catch(Exception e) {
|
|
436
|
+
Log.e(TAG, Log.getStackTraceString(e));
|
|
437
|
+
}
|
|
432
438
|
} else {
|
|
433
439
|
vdoParams = params;
|
|
434
440
|
}
|
|
@@ -234,7 +234,9 @@ public class ReactVdoPlayerView extends FrameLayout implements LifecycleEventLis
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
public void setResizeMode(String resizeModeName) {
|
|
237
|
-
|
|
237
|
+
if (resizeModeName != null && !resizeModeName.isEmpty()) {
|
|
238
|
+
this.resizeMode = resizeModeIntFromName(resizeModeName);
|
|
239
|
+
}
|
|
238
240
|
}
|
|
239
241
|
|
|
240
242
|
public void setAspectRatio(float aspectRatio) {
|
|
@@ -523,7 +525,11 @@ public class ReactVdoPlayerView extends FrameLayout implements LifecycleEventLis
|
|
|
523
525
|
|
|
524
526
|
public void load(VdoInitParams params) {
|
|
525
527
|
if (vdoPlayer != null && params != null) {
|
|
526
|
-
|
|
528
|
+
try {
|
|
529
|
+
vdoPlayer.load(params);
|
|
530
|
+
} catch(Exception e) {
|
|
531
|
+
Log.e(TAG, Log.getStackTraceString(e));
|
|
532
|
+
}
|
|
527
533
|
} else {
|
|
528
534
|
pendingInitParams = params;
|
|
529
535
|
}
|
|
@@ -76,6 +76,7 @@ public class VdoDownloadModule extends ReactContextBaseJavaModule implements Vdo
|
|
|
76
76
|
errorCallback.invoke(
|
|
77
77
|
makeErrorDescriptionMap(errDesc)
|
|
78
78
|
);
|
|
79
|
+
return;
|
|
79
80
|
}
|
|
80
81
|
String otp = optionParams.getString("otp");
|
|
81
82
|
String playbackInfo = optionParams.getString("playbackInfo");
|
|
@@ -334,6 +335,11 @@ public class VdoDownloadModule extends ReactContextBaseJavaModule implements Vdo
|
|
|
334
335
|
String eventName,
|
|
335
336
|
String mediaId,
|
|
336
337
|
@Nullable DownloadStatus downloadStatus) {
|
|
338
|
+
|
|
339
|
+
if(!reactContext.hasActiveCatalystInstance()) {
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
|
|
337
343
|
WritableMap params = Arguments.createMap();
|
|
338
344
|
params.putString("mediaId", mediaId);
|
|
339
345
|
if (downloadStatus != null) {
|
|
@@ -22,10 +22,15 @@ class RCTVdoPlayerUIView: VdoCipherRNView {
|
|
|
22
22
|
let playerViewController = VdoCipher.getVdoPlayerViewController()
|
|
23
23
|
playerViewController.view.frame = self.bounds
|
|
24
24
|
playerViewController.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
|
25
|
-
self.reactViewController()
|
|
25
|
+
guard let reactVC = self.reactViewController() else {
|
|
26
|
+
let errorDescription = ErrorDescription(errorCode: 3100, errorMsg: "Error: 3100 Failed to Load reactViewController. Please try again.", httpStatusCode: -1)
|
|
27
|
+
self.sendErrorEventWithDescription(errorDescription)
|
|
28
|
+
return
|
|
29
|
+
}
|
|
30
|
+
reactVC.addChild(playerViewController)
|
|
26
31
|
self.addSubview(playerViewController.view)
|
|
27
|
-
playerViewController.didMove(toParent:
|
|
28
|
-
|
|
32
|
+
playerViewController.didMove(toParent: reactVC)
|
|
33
|
+
reactVC.navigationController?.delegate = self
|
|
29
34
|
if embedInfo["offline"] as? Bool == true {
|
|
30
35
|
self.parseOfflineCredentials(fromInfo: embedInfo)
|
|
31
36
|
} else {
|
|
@@ -5,7 +5,7 @@ import VdoFramework
|
|
|
5
5
|
@objc(VdocipherRnBridge)
|
|
6
6
|
class VdocipherRnBridge: RCTViewManager {
|
|
7
7
|
|
|
8
|
-
static let vdocipherRnBridgeVersionString = "1.17.
|
|
8
|
+
static let vdocipherRnBridgeVersionString = "1.17.6"
|
|
9
9
|
|
|
10
10
|
@objc override static func requiresMainQueueSetup() -> Bool {
|
|
11
11
|
return true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vdocipher-rn-bridge",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.6",
|
|
4
4
|
"description": "React native bridge library that delegates to vdocipher native android SDK",
|
|
5
5
|
"homepage": "https://www.vdocipher.com/docs/mobile/react-native/getting-started/",
|
|
6
6
|
"scripts": {
|