vdocipher-rn-bridge 1.20.3 → 1.20.5
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 +22 -13
- package/android/src/main/java/com/vdocipher/rnbridge/ReactVdoPlayerView.java +21 -14
- package/android/src/main/res/layout/vdo_frame_layout.xml +6 -0
- 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.20.
|
|
22
|
-
def releaseVersionCode =
|
|
21
|
+
def releaseVersionName = "1.20.5"
|
|
22
|
+
def releaseVersionCode = 37
|
|
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.5'
|
|
90
90
|
}
|
|
@@ -67,7 +67,7 @@ public class ReactVdoPlayerUIView extends LinearLayout implements LifecycleEvent
|
|
|
67
67
|
private Track[] selectedTracks;
|
|
68
68
|
private Handler mainHandler;
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
private int frameLayoutId;
|
|
71
71
|
|
|
72
72
|
private int resizeMode = PlayerHost.RESIZE_MODE_FIT;
|
|
73
73
|
|
|
@@ -80,13 +80,30 @@ public class ReactVdoPlayerUIView extends LinearLayout implements LifecycleEvent
|
|
|
80
80
|
setGravity(Gravity.CENTER);
|
|
81
81
|
setBackgroundColor(Color.BLACK);
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
frameLayout.
|
|
85
|
-
frameLayoutId =
|
|
86
|
-
frameLayout.setId(frameLayoutId);
|
|
83
|
+
|
|
84
|
+
FrameLayout frameLayout = LayoutInflater.from(context).inflate(R.layout.vdo_frame_layout, null).findViewById(R.id.vdo_player_frame_layout);
|
|
85
|
+
frameLayoutId = frameLayout.getId();
|
|
87
86
|
|
|
88
87
|
addView(frameLayout);
|
|
89
88
|
|
|
89
|
+
frameLayout.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {
|
|
90
|
+
@Override
|
|
91
|
+
public void onViewAttachedToWindow(View v) {
|
|
92
|
+
if (vdoPlayerUIFragment == null) {
|
|
93
|
+
vdoPlayerUIFragment = new VdoPlayerUIFragment();
|
|
94
|
+
Bundle bundle = new Bundle();
|
|
95
|
+
bundle.putBoolean("showControls", true);
|
|
96
|
+
vdoPlayerUIFragment.setArguments(bundle);
|
|
97
|
+
fragmentManager = activity.getSupportFragmentManager();
|
|
98
|
+
initializePlayer();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@Override
|
|
103
|
+
public void onViewDetachedFromWindow(View v) {
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
90
107
|
context.addLifecycleEventListener(this);
|
|
91
108
|
|
|
92
109
|
mainHandler = new Handler(Looper.getMainLooper());
|
|
@@ -343,14 +360,6 @@ public class ReactVdoPlayerUIView extends LinearLayout implements LifecycleEvent
|
|
|
343
360
|
protected void onAttachedToWindow() {
|
|
344
361
|
Log.d(TAG, "onAttachedToWindow");
|
|
345
362
|
super.onAttachedToWindow();
|
|
346
|
-
if (vdoPlayerUIFragment == null) {
|
|
347
|
-
vdoPlayerUIFragment = new VdoPlayerUIFragment();
|
|
348
|
-
Bundle bundle = new Bundle();
|
|
349
|
-
bundle.putBoolean("showControls", true);
|
|
350
|
-
vdoPlayerUIFragment.setArguments(bundle);
|
|
351
|
-
fragmentManager = this.activity.getSupportFragmentManager();
|
|
352
|
-
initializePlayer();
|
|
353
|
-
}
|
|
354
363
|
if (playWhenReady) {
|
|
355
364
|
if (vdoPlayer != null) {
|
|
356
365
|
vdoPlayer.setPlayWhenReady(true);
|
|
@@ -58,7 +58,7 @@ public class ReactVdoPlayerView extends LinearLayout implements LifecycleEventLi
|
|
|
58
58
|
|
|
59
59
|
private VdoPlayer vdoPlayer;
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
private int frameLayoutId;
|
|
62
62
|
|
|
63
63
|
// from props
|
|
64
64
|
private boolean playWhenReady = true;
|
|
@@ -95,13 +95,28 @@ public class ReactVdoPlayerView extends LinearLayout implements LifecycleEventLi
|
|
|
95
95
|
setGravity(Gravity.CENTER);
|
|
96
96
|
setBackgroundColor(Color.BLACK);
|
|
97
97
|
|
|
98
|
-
FrameLayout frameLayout =
|
|
99
|
-
frameLayout.
|
|
100
|
-
frameLayoutId = View.generateViewId();
|
|
101
|
-
frameLayout.setId(frameLayoutId);
|
|
102
|
-
|
|
98
|
+
FrameLayout frameLayout = LayoutInflater.from(context).inflate(R.layout.vdo_frame_layout, null).findViewById(R.id.vdo_player_frame_layout);
|
|
99
|
+
frameLayoutId = frameLayout.getId();
|
|
103
100
|
addView(frameLayout);
|
|
104
101
|
|
|
102
|
+
frameLayout.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {
|
|
103
|
+
@Override
|
|
104
|
+
public void onViewAttachedToWindow(View v) {
|
|
105
|
+
if (vdoPlayerUIFragment == null) {
|
|
106
|
+
vdoPlayerUIFragment = new VdoPlayerUIFragment();
|
|
107
|
+
Bundle bundle = new Bundle();
|
|
108
|
+
bundle.putBoolean("showControls", false);
|
|
109
|
+
vdoPlayerUIFragment.setArguments(bundle);
|
|
110
|
+
fragmentManager = activity.getSupportFragmentManager();
|
|
111
|
+
initializePlayer();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@Override
|
|
116
|
+
public void onViewDetachedFromWindow(View v) {
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
|
|
105
120
|
eventEmitter = new VdoEventEmitter(context);
|
|
106
121
|
|
|
107
122
|
setPictureInPictureSupport();
|
|
@@ -446,14 +461,6 @@ public class ReactVdoPlayerView extends LinearLayout implements LifecycleEventLi
|
|
|
446
461
|
protected void onAttachedToWindow() {
|
|
447
462
|
Log.d(TAG, "onAttachedToWindow");
|
|
448
463
|
super.onAttachedToWindow();
|
|
449
|
-
if (vdoPlayerUIFragment == null) {
|
|
450
|
-
vdoPlayerUIFragment = new VdoPlayerUIFragment();
|
|
451
|
-
Bundle bundle = new Bundle();
|
|
452
|
-
bundle.putBoolean("showControls", false);
|
|
453
|
-
vdoPlayerUIFragment.setArguments(bundle);
|
|
454
|
-
fragmentManager = activity.getSupportFragmentManager();
|
|
455
|
-
initializePlayer();
|
|
456
|
-
}
|
|
457
464
|
if (playWhenReady) {
|
|
458
465
|
if (vdoPlayer != null) {
|
|
459
466
|
vdoPlayer.setPlayWhenReady(true);
|
|
@@ -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.5"
|
|
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.5",
|
|
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": {
|