vdocipher-rn-bridge 1.17.5 → 1.18.0
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/ReactVdoPlayerUIViewManager.java +0 -5
- package/android/src/main/java/com/vdocipher/rnbridge/ReactVdoPlayerView.java +8 -2
- package/android/src/main/java/com/vdocipher/rnbridge/ReactVdoPlayerViewManager.java +0 -5
- package/android/src/main/java/com/vdocipher/rnbridge/VdoDownloadModule.java +6 -0
- package/android/src/main/java/com/vdocipher/rnbridge/VdocipherRnBridgeModule.java +0 -5
- package/ios/RCTVdoPlayerUIView.swift +8 -3
- package/ios/VdocipherRnBridgeViewManager.swift +1 -1
- package/package.json +1 -1
- package/react-native-vdocipher-rn-bridge.podspec +1 -1
- package/type.ts +0 -10
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.
|
|
22
|
-
def releaseVersionCode =
|
|
21
|
+
def releaseVersionName = "1.18.0"
|
|
22
|
+
def releaseVersionCode = 28
|
|
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.
|
|
89
|
+
implementation 'com.vdocipher.aegis:vdocipher-android:1.24.1'
|
|
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
|
}
|
|
@@ -68,8 +68,6 @@ public class ReactVdoPlayerUIViewManager extends ViewGroupManager<ReactVdoPlayer
|
|
|
68
68
|
boolean enableAutoResume = embedInfo.hasKey("enableAutoResume") && embedInfo.getBoolean("enableAutoResume");
|
|
69
69
|
String preferredCaptionsLanguage = embedInfo.hasKey("preferredCaptionsLanguage") ?
|
|
70
70
|
embedInfo.getString("preferredCaptionsLanguage") : null;
|
|
71
|
-
String safetyNetApiKey = embedInfo.hasKey("safetyNetApiKey") ?
|
|
72
|
-
embedInfo.getString("safetyNetApiKey") : null;
|
|
73
71
|
boolean allowAdbDebugging = !embedInfo.hasKey("allowAdbDebugging") ||
|
|
74
72
|
embedInfo.getBoolean("allowAdbDebugging");
|
|
75
73
|
|
|
@@ -78,9 +76,6 @@ public class ReactVdoPlayerUIViewManager extends ViewGroupManager<ReactVdoPlayer
|
|
|
78
76
|
if (enableAutoResume) {
|
|
79
77
|
builder.enableAutoResume();
|
|
80
78
|
}
|
|
81
|
-
if (safetyNetApiKey != null) {
|
|
82
|
-
builder.setSafetyNetApiKey(safetyNetApiKey);
|
|
83
|
-
}
|
|
84
79
|
if (preferredCaptionsLanguage != null) {
|
|
85
80
|
builder.setPreferredCaptionsLanguage(preferredCaptionsLanguage);
|
|
86
81
|
}
|
|
@@ -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
|
}
|
|
@@ -69,8 +69,6 @@ public class ReactVdoPlayerViewManager extends ViewGroupManager<ReactVdoPlayerVi
|
|
|
69
69
|
boolean enableAutoResume = embedInfo.hasKey("enableAutoResume") && embedInfo.getBoolean("enableAutoResume");
|
|
70
70
|
String preferredCaptionsLanguage = embedInfo.hasKey("preferredCaptionsLanguage") ?
|
|
71
71
|
embedInfo.getString("preferredCaptionsLanguage") : null;
|
|
72
|
-
String safetyNetApiKey = embedInfo.hasKey("safetyNetApiKey") ?
|
|
73
|
-
embedInfo.getString("safetyNetApiKey") : null;
|
|
74
72
|
boolean allowAdbDebugging = !embedInfo.hasKey("allowAdbDebugging") ||
|
|
75
73
|
embedInfo.getBoolean("allowAdbDebugging");
|
|
76
74
|
|
|
@@ -79,9 +77,6 @@ public class ReactVdoPlayerViewManager extends ViewGroupManager<ReactVdoPlayerVi
|
|
|
79
77
|
if (enableAutoResume) {
|
|
80
78
|
builder.enableAutoResume();
|
|
81
79
|
}
|
|
82
|
-
if (safetyNetApiKey != null) {
|
|
83
|
-
builder.setSafetyNetApiKey(safetyNetApiKey);
|
|
84
|
-
}
|
|
85
80
|
if (preferredCaptionsLanguage != null) {
|
|
86
81
|
builder.setPreferredCaptionsLanguage(preferredCaptionsLanguage);
|
|
87
82
|
}
|
|
@@ -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) {
|
|
@@ -44,8 +44,6 @@ public class VdocipherRnBridgeModule extends ReactContextBaseJavaModule {
|
|
|
44
44
|
boolean enableAutoResume = embedInfo.hasKey("enableAutoResume") && embedInfo.getBoolean("enableAutoResume");
|
|
45
45
|
String preferredCaptionsLanguage = embedInfo.hasKey("preferredCaptionsLanguage") ?
|
|
46
46
|
embedInfo.getString("preferredCaptionsLanguage") : null;
|
|
47
|
-
String safetyNetApiKey = embedInfo.hasKey("safetyNetApiKey") ?
|
|
48
|
-
embedInfo.getString("safetyNetApiKey") : null;
|
|
49
47
|
boolean allowAdbDebugging = !embedInfo.hasKey("allowAdbDebugging") ||
|
|
50
48
|
embedInfo.getBoolean("allowAdbDebugging");
|
|
51
49
|
|
|
@@ -54,9 +52,6 @@ public class VdocipherRnBridgeModule extends ReactContextBaseJavaModule {
|
|
|
54
52
|
if (enableAutoResume) {
|
|
55
53
|
builder.enableAutoResume();
|
|
56
54
|
}
|
|
57
|
-
if (safetyNetApiKey != null) {
|
|
58
|
-
builder.setSafetyNetApiKey(safetyNetApiKey);
|
|
59
|
-
}
|
|
60
55
|
if (preferredCaptionsLanguage != null) {
|
|
61
56
|
builder.setPreferredCaptionsLanguage(preferredCaptionsLanguage);
|
|
62
57
|
}
|
|
@@ -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.
|
|
8
|
+
static let vdocipherRnBridgeVersionString = "1.18.0"
|
|
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.
|
|
3
|
+
"version": "1.18.0",
|
|
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": {
|
|
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
18
|
|
|
19
19
|
s.dependency "React-Core"
|
|
20
|
-
s.dependency "VdoFramework", "2.5.
|
|
20
|
+
s.dependency "VdoFramework", "2.5.4"
|
|
21
21
|
|
|
22
22
|
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
23
23
|
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
package/type.ts
CHANGED
|
@@ -20,10 +20,6 @@ export interface EmbedInfo {
|
|
|
20
20
|
*/
|
|
21
21
|
bufferingGoalMs?: number | null;
|
|
22
22
|
enableAutoResume?: boolean | null;
|
|
23
|
-
/**
|
|
24
|
-
* Not supported in iOS
|
|
25
|
-
*/
|
|
26
|
-
safetyNetApiKey?: string | null;
|
|
27
23
|
preferredCaptionsLanguage?: string | null;
|
|
28
24
|
/**
|
|
29
25
|
* @deprecated
|
|
@@ -43,10 +39,6 @@ export type OfflineEmbedInfo = {
|
|
|
43
39
|
offline: boolean;
|
|
44
40
|
mediaId: string;
|
|
45
41
|
enableAutoResume?: boolean | null;
|
|
46
|
-
/**
|
|
47
|
-
* Not supported in iOS
|
|
48
|
-
*/
|
|
49
|
-
safetyNetApiKey?: string | null;
|
|
50
42
|
preferredCaptionsLanguage?: string | null;
|
|
51
43
|
/**
|
|
52
44
|
* @deprecated
|
|
@@ -161,7 +153,6 @@ export const VdoPropTypes = {
|
|
|
161
153
|
maxVideoBitrateKbps: PropTypes.number,
|
|
162
154
|
bufferingGoalMs: PropTypes.number,
|
|
163
155
|
enableAutoResume: PropTypes.bool,
|
|
164
|
-
safetyNetApiKey: PropTypes.string,
|
|
165
156
|
preferredCaptionsLanguage: PropTypes.string,
|
|
166
157
|
playerConfig: PropTypes.string,
|
|
167
158
|
customPlayerId: PropTypes.string,
|
|
@@ -170,7 +161,6 @@ export const VdoPropTypes = {
|
|
|
170
161
|
offline: PropTypes.bool.isRequired,
|
|
171
162
|
mediaId: PropTypes.string.isRequired,
|
|
172
163
|
enableAutoResume: PropTypes.bool,
|
|
173
|
-
safetyNetApiKey: PropTypes.string,
|
|
174
164
|
preferredCaptionsLanguage: PropTypes.string,
|
|
175
165
|
playerConfig: PropTypes.string,
|
|
176
166
|
})
|