vdocipher-rn-bridge 1.20.1 → 1.20.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.
- package/android/build.gradle +3 -3
- package/android/src/main/java/com/vdocipher/rnbridge/ReactVdoPlayerUIView.java +19 -2
- package/android/src/main/java/com/vdocipher/rnbridge/ReactVdoPlayerView.java +19 -2
- package/ios/VdocipherRnBridgeViewManager.swift +1 -1
- package/package.json +1 -1
- package/react-native-vdocipher-rn-bridge.podspec +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.20.
|
|
22
|
-
def releaseVersionCode =
|
|
21
|
+
def releaseVersionName = "1.20.3"
|
|
22
|
+
def releaseVersionCode = 35
|
|
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.26.
|
|
89
|
+
implementation 'com.vdocipher.aegis:vdocipher-android:1.26.4'
|
|
90
90
|
}
|
|
@@ -5,11 +5,13 @@ import androidx.fragment.app.FragmentManager;
|
|
|
5
5
|
import androidx.fragment.app.Fragment;
|
|
6
6
|
|
|
7
7
|
import android.util.Log;
|
|
8
|
+
import android.view.View;
|
|
8
9
|
import android.view.KeyEvent;
|
|
9
10
|
import android.view.ViewGroup;
|
|
10
11
|
import android.widget.FrameLayout;
|
|
11
12
|
import android.content.pm.ActivityInfo;
|
|
12
13
|
import android.view.LayoutInflater;
|
|
14
|
+
import android.view.Gravity;
|
|
13
15
|
|
|
14
16
|
import com.facebook.react.bridge.LifecycleEventListener;
|
|
15
17
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
@@ -31,6 +33,7 @@ import androidx.core.app.PictureInPictureModeChangedInfo;
|
|
|
31
33
|
import com.facebook.react.bridge.Callback;
|
|
32
34
|
import com.facebook.react.bridge.WritableMap;
|
|
33
35
|
import com.facebook.react.bridge.Arguments;
|
|
36
|
+
import android.widget.LinearLayout;
|
|
34
37
|
|
|
35
38
|
import com.facebook.react.bridge.WritableArray;
|
|
36
39
|
import com.facebook.react.bridge.ReadableMap;
|
|
@@ -38,7 +41,7 @@ import com.facebook.react.bridge.ReadableMap;
|
|
|
38
41
|
import com.vdocipher.aegis.ui.view.FullScreenActionListener;
|
|
39
42
|
|
|
40
43
|
|
|
41
|
-
public class ReactVdoPlayerUIView extends
|
|
44
|
+
public class ReactVdoPlayerUIView extends LinearLayout implements LifecycleEventListener {
|
|
42
45
|
private static final String TAG = "ReactVdoPlayerUIView";
|
|
43
46
|
|
|
44
47
|
private final ThemedReactContext themedReactContext;
|
|
@@ -64,6 +67,8 @@ public class ReactVdoPlayerUIView extends FrameLayout implements LifecycleEventL
|
|
|
64
67
|
private Track[] selectedTracks;
|
|
65
68
|
private Handler mainHandler;
|
|
66
69
|
|
|
70
|
+
final int frameLayoutId;
|
|
71
|
+
|
|
67
72
|
private int resizeMode = PlayerHost.RESIZE_MODE_FIT;
|
|
68
73
|
|
|
69
74
|
public ReactVdoPlayerUIView(ThemedReactContext context) {
|
|
@@ -71,8 +76,17 @@ public class ReactVdoPlayerUIView extends FrameLayout implements LifecycleEventL
|
|
|
71
76
|
themedReactContext = context;
|
|
72
77
|
activity = (AppCompatActivity) themedReactContext.getCurrentActivity();
|
|
73
78
|
setKeepScreenOn(true);
|
|
79
|
+
setClickable(false);
|
|
80
|
+
setGravity(Gravity.CENTER);
|
|
74
81
|
setBackgroundColor(Color.BLACK);
|
|
75
82
|
|
|
83
|
+
FrameLayout frameLayout = new FrameLayout(context);
|
|
84
|
+
frameLayout.setKeepScreenOn(true);
|
|
85
|
+
frameLayoutId = View.generateViewId();
|
|
86
|
+
frameLayout.setId(frameLayoutId);
|
|
87
|
+
|
|
88
|
+
addView(frameLayout);
|
|
89
|
+
|
|
76
90
|
context.addLifecycleEventListener(this);
|
|
77
91
|
|
|
78
92
|
mainHandler = new Handler(Looper.getMainLooper());
|
|
@@ -89,7 +103,7 @@ public class ReactVdoPlayerUIView extends FrameLayout implements LifecycleEventL
|
|
|
89
103
|
new Handler().postDelayed(() -> {
|
|
90
104
|
if (fragmentManager != null && !fragmentManager.isDestroyed()) {
|
|
91
105
|
try {
|
|
92
|
-
fragmentManager.beginTransaction().replace(
|
|
106
|
+
fragmentManager.beginTransaction().replace(frameLayoutId, vdoPlayerUIFragment, "VdoPlayerUIFragmentRN").commitAllowingStateLoss();
|
|
93
107
|
fragmentManager.executePendingTransactions();
|
|
94
108
|
if (isRunningOnTv(activity)) {
|
|
95
109
|
vdoPlayerControlView = vdoPlayerUIFragment.requireView().findViewById(com.vdocipher.aegis.R.id.vdo_player_control_view);
|
|
@@ -211,6 +225,9 @@ public class ReactVdoPlayerUIView extends FrameLayout implements LifecycleEventL
|
|
|
211
225
|
public void setResizeMode(String resizeModeName) {
|
|
212
226
|
if (resizeModeName != null && !resizeModeName.isEmpty()) {
|
|
213
227
|
this.resizeMode = resizeModeIntFromName(resizeModeName);
|
|
228
|
+
if (vdoPlayerUIFragment != null) {
|
|
229
|
+
vdoPlayerUIFragment.setResizeMode(this.resizeMode);
|
|
230
|
+
}
|
|
214
231
|
}
|
|
215
232
|
}
|
|
216
233
|
|
|
@@ -44,7 +44,10 @@ import com.facebook.react.bridge.WritableMap;
|
|
|
44
44
|
import com.facebook.react.bridge.Arguments;
|
|
45
45
|
import android.graphics.Color;
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
import android.view.Gravity;
|
|
48
|
+
import android.widget.LinearLayout;
|
|
49
|
+
|
|
50
|
+
public class ReactVdoPlayerView extends LinearLayout implements LifecycleEventListener {
|
|
48
51
|
private static final String TAG = "ReactVdoPlayerView";
|
|
49
52
|
|
|
50
53
|
private final ThemedReactContext themedReactContext;
|
|
@@ -55,6 +58,8 @@ public class ReactVdoPlayerView extends FrameLayout implements LifecycleEventLis
|
|
|
55
58
|
|
|
56
59
|
private VdoPlayer vdoPlayer;
|
|
57
60
|
|
|
61
|
+
final int frameLayoutId;
|
|
62
|
+
|
|
58
63
|
// from props
|
|
59
64
|
private boolean playWhenReady = true;
|
|
60
65
|
private float pendingPlaybackSpeed = 0;
|
|
@@ -86,8 +91,17 @@ public class ReactVdoPlayerView extends FrameLayout implements LifecycleEventLis
|
|
|
86
91
|
// Get a handler that can be used to post to the main thread
|
|
87
92
|
mainHandler = new Handler(Looper.getMainLooper());
|
|
88
93
|
setKeepScreenOn(true);
|
|
94
|
+
setClickable(false);
|
|
95
|
+
setGravity(Gravity.CENTER);
|
|
89
96
|
setBackgroundColor(Color.BLACK);
|
|
90
97
|
|
|
98
|
+
FrameLayout frameLayout = new FrameLayout(context);
|
|
99
|
+
frameLayout.setKeepScreenOn(true);
|
|
100
|
+
frameLayoutId = View.generateViewId();
|
|
101
|
+
frameLayout.setId(frameLayoutId);
|
|
102
|
+
|
|
103
|
+
addView(frameLayout);
|
|
104
|
+
|
|
91
105
|
eventEmitter = new VdoEventEmitter(context);
|
|
92
106
|
|
|
93
107
|
setPictureInPictureSupport();
|
|
@@ -100,7 +114,7 @@ public class ReactVdoPlayerView extends FrameLayout implements LifecycleEventLis
|
|
|
100
114
|
new Handler().postDelayed(() -> {
|
|
101
115
|
if (fragmentManager != null && !fragmentManager.isDestroyed()) {
|
|
102
116
|
try {
|
|
103
|
-
fragmentManager.beginTransaction().replace(
|
|
117
|
+
fragmentManager.beginTransaction().replace(frameLayoutId, vdoPlayerUIFragment, "VdoPlayerUIFragmentRN").commitAllowingStateLoss();
|
|
104
118
|
fragmentManager.executePendingTransactions();
|
|
105
119
|
// initialize the playerFragment; a VdoPlayer instance will be received
|
|
106
120
|
// in onInitializationSuccess() callback
|
|
@@ -236,6 +250,9 @@ public class ReactVdoPlayerView extends FrameLayout implements LifecycleEventLis
|
|
|
236
250
|
public void setResizeMode(String resizeModeName) {
|
|
237
251
|
if (resizeModeName != null && !resizeModeName.isEmpty()) {
|
|
238
252
|
this.resizeMode = resizeModeIntFromName(resizeModeName);
|
|
253
|
+
if (vdoPlayerUIFragment != null) {
|
|
254
|
+
vdoPlayerUIFragment.setResizeMode(this.resizeMode);
|
|
255
|
+
}
|
|
239
256
|
}
|
|
240
257
|
}
|
|
241
258
|
|
|
@@ -5,7 +5,7 @@ import VdoFramework
|
|
|
5
5
|
@objc(VdocipherRnBridge)
|
|
6
6
|
class VdocipherRnBridge: RCTViewManager {
|
|
7
7
|
|
|
8
|
-
static let vdocipherRnBridgeVersionString = "1.20.
|
|
8
|
+
static let vdocipherRnBridgeVersionString = "1.20.3"
|
|
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.20.
|
|
3
|
+
"version": "1.20.3",
|
|
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.7"
|
|
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
|