vdocipher-rn-bridge 1.12.1 → 1.12.2
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/CHANGELOG.md
CHANGED
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.12.
|
|
22
|
-
def releaseVersionCode =
|
|
21
|
+
def releaseVersionName = "1.12.2"
|
|
22
|
+
def releaseVersionCode = 13
|
|
23
23
|
|
|
24
24
|
android {
|
|
25
25
|
compileSdkVersion 33
|
|
@@ -26,6 +26,7 @@ import android.os.Bundle;
|
|
|
26
26
|
|
|
27
27
|
import androidx.core.app.PictureInPictureModeChangedInfo;
|
|
28
28
|
import androidx.core.util.Consumer;
|
|
29
|
+
import android.graphics.Color;
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
public class ReactVdoPlayerUIView extends FrameLayout implements LifecycleEventListener, Consumer<Configuration> {
|
|
@@ -54,20 +55,13 @@ public class ReactVdoPlayerUIView extends FrameLayout implements LifecycleEventL
|
|
|
54
55
|
themedReactContext = context;
|
|
55
56
|
activity = (AppCompatActivity) themedReactContext.getCurrentActivity();
|
|
56
57
|
setKeepScreenOn(true);
|
|
58
|
+
setBackgroundColor(Color.BLACK);
|
|
57
59
|
|
|
58
60
|
context.addLifecycleEventListener(this);
|
|
59
61
|
activity.addOnConfigurationChangedListener(this);
|
|
60
62
|
|
|
61
63
|
eventEmitter = new VdoEventEmitter(context);
|
|
62
64
|
|
|
63
|
-
|
|
64
|
-
vdoPlayerUIFragment = new VdoPlayerUIFragment();
|
|
65
|
-
Bundle bundle = new Bundle();
|
|
66
|
-
bundle.putBoolean("showControls", true);
|
|
67
|
-
vdoPlayerUIFragment.setArguments(bundle);
|
|
68
|
-
fragmentManager = this.activity.getSupportFragmentManager();
|
|
69
|
-
initializePlayer();
|
|
70
|
-
|
|
71
65
|
int orientation = getResources().getConfiguration().orientation;
|
|
72
66
|
if (orientation == Configuration.ORIENTATION_PORTRAIT) {
|
|
73
67
|
eventEmitter.isInitialPortrait();
|
|
@@ -165,6 +159,14 @@ public class ReactVdoPlayerUIView extends FrameLayout implements LifecycleEventL
|
|
|
165
159
|
protected void onAttachedToWindow() {
|
|
166
160
|
Log.d(TAG, "onAttachedToWindow");
|
|
167
161
|
super.onAttachedToWindow();
|
|
162
|
+
if (vdoPlayerUIFragment == null) {
|
|
163
|
+
vdoPlayerUIFragment = new VdoPlayerUIFragment();
|
|
164
|
+
Bundle bundle = new Bundle();
|
|
165
|
+
bundle.putBoolean("showControls", true);
|
|
166
|
+
vdoPlayerUIFragment.setArguments(bundle);
|
|
167
|
+
fragmentManager = this.activity.getSupportFragmentManager();
|
|
168
|
+
initializePlayer();
|
|
169
|
+
}
|
|
168
170
|
if (playWhenReady) {
|
|
169
171
|
if (vdoPlayer != null) {
|
|
170
172
|
vdoPlayer.setPlayWhenReady(true);
|
|
@@ -41,6 +41,7 @@ import com.facebook.react.bridge.WritableArray;
|
|
|
41
41
|
import com.facebook.react.bridge.ReadableMap;
|
|
42
42
|
import com.facebook.react.bridge.WritableMap;
|
|
43
43
|
import com.facebook.react.bridge.Arguments;
|
|
44
|
+
import android.graphics.Color;
|
|
44
45
|
|
|
45
46
|
public class ReactVdoPlayerView extends FrameLayout implements LifecycleEventListener {
|
|
46
47
|
private static final String TAG = "ReactVdoPlayerView";
|
|
@@ -83,16 +84,10 @@ public class ReactVdoPlayerView extends FrameLayout implements LifecycleEventLis
|
|
|
83
84
|
// Get a handler that can be used to post to the main thread
|
|
84
85
|
mainHandler = new Handler(Looper.getMainLooper());
|
|
85
86
|
setKeepScreenOn(true);
|
|
87
|
+
setBackgroundColor(Color.BLACK);
|
|
86
88
|
|
|
87
89
|
eventEmitter = new VdoEventEmitter(context);
|
|
88
90
|
|
|
89
|
-
vdoPlayerUIFragment = new VdoPlayerUIFragment();
|
|
90
|
-
Bundle bundle = new Bundle();
|
|
91
|
-
bundle.putBoolean("showControls", false);
|
|
92
|
-
vdoPlayerUIFragment.setArguments(bundle);
|
|
93
|
-
fragmentManager = activity.getSupportFragmentManager();
|
|
94
|
-
initializePlayer();
|
|
95
|
-
|
|
96
91
|
int orientation = getResources().getConfiguration().orientation;
|
|
97
92
|
if (orientation == Configuration.ORIENTATION_PORTRAIT) {
|
|
98
93
|
eventEmitter.isInitialPortrait();
|
|
@@ -398,6 +393,14 @@ public class ReactVdoPlayerView extends FrameLayout implements LifecycleEventLis
|
|
|
398
393
|
protected void onAttachedToWindow() {
|
|
399
394
|
Log.d(TAG, "onAttachedToWindow");
|
|
400
395
|
super.onAttachedToWindow();
|
|
396
|
+
if (vdoPlayerUIFragment == null) {
|
|
397
|
+
vdoPlayerUIFragment = new VdoPlayerUIFragment();
|
|
398
|
+
Bundle bundle = new Bundle();
|
|
399
|
+
bundle.putBoolean("showControls", false);
|
|
400
|
+
vdoPlayerUIFragment.setArguments(bundle);
|
|
401
|
+
fragmentManager = activity.getSupportFragmentManager();
|
|
402
|
+
initializePlayer();
|
|
403
|
+
}
|
|
401
404
|
if (playWhenReady) {
|
|
402
405
|
if (vdoPlayer != null) {
|
|
403
406
|
vdoPlayer.setPlayWhenReady(true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vdocipher-rn-bridge",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.2",
|
|
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": {
|