vdocipher-rn-bridge 1.8.1 → 1.9.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/CHANGELOG.md +4 -0
- package/README.md +1 -0
- package/android/build.gradle +3 -3
- package/android/src/main/java/com/vdocipher/rnbridge/ReactVdoPlayerView.java +3 -0
- package/android/src/main/java/com/vdocipher/rnbridge/ReactVdoPlayerViewManager.java +9 -0
- package/android/src/main/java/com/vdocipher/rnbridge/VdocipherRnBridgeModule.java +10 -0
- package/ios/.DS_Store +0 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -143,6 +143,7 @@ forceLowestBitrate | boolean | whether to force lowest bitrate; default false
|
|
|
143
143
|
forceHighestSupportedBitrate | boolean | whether to force highest supported bitrate; default false
|
|
144
144
|
maxVideoBitrateKbps | number | maximum allowed video bitrate in kbps
|
|
145
145
|
bufferingGoalMs | number | buffering goal in milliseconds, NOT recommended to change this value for most use cases; cannot be set to a value less than 15000
|
|
146
|
+
enableAutoResume | boolean | whether to auto resume from last saved position
|
|
146
147
|
|
|
147
148
|
#### showNativeControls
|
|
148
149
|
|
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.9.0"
|
|
22
|
+
def releaseVersionCode = 4
|
|
23
23
|
|
|
24
24
|
android {
|
|
25
25
|
compileSdkVersion 30
|
|
@@ -87,5 +87,5 @@ repositories {
|
|
|
87
87
|
dependencies {
|
|
88
88
|
compileOnly 'com.facebook.react:react-native:+'
|
|
89
89
|
implementation 'androidx.appcompat:appcompat:1.3.1'
|
|
90
|
-
implementation 'com.vdocipher.aegis:vdocipher-android:1.
|
|
90
|
+
implementation 'com.vdocipher.aegis:vdocipher-android:1.12.0'
|
|
91
91
|
}
|
|
@@ -5,6 +5,7 @@ import android.os.Build;
|
|
|
5
5
|
import android.util.Log;
|
|
6
6
|
import android.view.View;
|
|
7
7
|
import android.widget.FrameLayout;
|
|
8
|
+
import android.content.pm.ActivityInfo;
|
|
8
9
|
|
|
9
10
|
import com.facebook.react.bridge.LifecycleEventListener;
|
|
10
11
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
@@ -107,6 +108,7 @@ public class ReactVdoPlayerView extends FrameLayout implements InitializationLis
|
|
|
107
108
|
int visibility;
|
|
108
109
|
|
|
109
110
|
if (enterFullscreen) {
|
|
111
|
+
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
|
|
110
112
|
if (Build.VERSION.SDK_INT >= 19) {
|
|
111
113
|
visibility = SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
|
112
114
|
| SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
|
@@ -117,6 +119,7 @@ public class ReactVdoPlayerView extends FrameLayout implements InitializationLis
|
|
|
117
119
|
}
|
|
118
120
|
decorView.setSystemUiVisibility(visibility);
|
|
119
121
|
} else {
|
|
122
|
+
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
|
|
120
123
|
visibility = SYSTEM_UI_FLAG_VISIBLE;
|
|
121
124
|
decorView.setSystemUiVisibility(visibility);
|
|
122
125
|
}
|
|
@@ -53,6 +53,7 @@ public class ReactVdoPlayerViewManager extends ViewGroupManager<ReactVdoPlayerVi
|
|
|
53
53
|
if (embedInfo != null) {
|
|
54
54
|
boolean offline = embedInfo.hasKey("offline") && embedInfo.getBoolean("offline");
|
|
55
55
|
final VdoInitParams initParams;
|
|
56
|
+
boolean enableAutoResume = embedInfo.hasKey("enableAutoResume") && embedInfo.getBoolean("enableAutoResume");
|
|
56
57
|
|
|
57
58
|
if (offline) {
|
|
58
59
|
String mediaId = embedInfo.hasKey("mediaId") ? embedInfo.getString("mediaId") : null;
|
|
@@ -64,6 +65,10 @@ public class ReactVdoPlayerViewManager extends ViewGroupManager<ReactVdoPlayerVi
|
|
|
64
65
|
VdoInitParams.Builder builder = new VdoInitParams.Builder()
|
|
65
66
|
.setOfflinePlayback(mediaId)
|
|
66
67
|
.setAllowAdbDebugging(allowAdbDebugging);
|
|
68
|
+
|
|
69
|
+
if (enableAutoResume) {
|
|
70
|
+
builder.enableAutoResume();
|
|
71
|
+
}
|
|
67
72
|
if (safetyNetApiKey != null) {
|
|
68
73
|
builder.setSafetyNetApiKey(safetyNetApiKey);
|
|
69
74
|
}
|
|
@@ -93,6 +98,10 @@ public class ReactVdoPlayerViewManager extends ViewGroupManager<ReactVdoPlayerVi
|
|
|
93
98
|
.setForceHighestSupportedBitrate(forceHighestSupportedBitrate)
|
|
94
99
|
.setMaxVideoBitrateKbps(maxVideoBitrateKbps);
|
|
95
100
|
//.setPreferredCaptionsLanguage(embedInfo.getString("lang??"))
|
|
101
|
+
|
|
102
|
+
if (enableAutoResume) {
|
|
103
|
+
builder.enableAutoResume();
|
|
104
|
+
}
|
|
96
105
|
if (bufferingGoalMs > 0) {
|
|
97
106
|
builder.setBufferingGoalMs(bufferingGoalMs);
|
|
98
107
|
}
|
|
@@ -40,6 +40,7 @@ public class VdocipherRnBridgeModule extends ReactContextBaseJavaModule {
|
|
|
40
40
|
} else {
|
|
41
41
|
boolean offline = embedInfo.hasKey("offline") && embedInfo.getBoolean("offline");
|
|
42
42
|
final VdoInitParams vdoParams;
|
|
43
|
+
boolean enableAutoResume = embedInfo.hasKey("enableAutoResume") && embedInfo.getBoolean("enableAutoResume");
|
|
43
44
|
|
|
44
45
|
if (offline) {
|
|
45
46
|
String mediaId = embedInfo.hasKey("mediaId") ? embedInfo.getString("mediaId") : null;
|
|
@@ -47,10 +48,15 @@ public class VdocipherRnBridgeModule extends ReactContextBaseJavaModule {
|
|
|
47
48
|
embedInfo.getString("safetyNetApiKey") : null;
|
|
48
49
|
boolean allowAdbDebugging = !embedInfo.hasKey("allowAdbDebugging") ||
|
|
49
50
|
embedInfo.getBoolean("allowAdbDebugging");
|
|
51
|
+
|
|
50
52
|
|
|
51
53
|
VdoInitParams.Builder builder = new VdoInitParams.Builder()
|
|
52
54
|
.setOfflinePlayback(mediaId)
|
|
53
55
|
.setAllowAdbDebugging(allowAdbDebugging);
|
|
56
|
+
|
|
57
|
+
if (enableAutoResume) {
|
|
58
|
+
builder.enableAutoResume();
|
|
59
|
+
}
|
|
54
60
|
if (safetyNetApiKey != null) {
|
|
55
61
|
builder.setSafetyNetApiKey(safetyNetApiKey);
|
|
56
62
|
}
|
|
@@ -80,6 +86,10 @@ public class VdocipherRnBridgeModule extends ReactContextBaseJavaModule {
|
|
|
80
86
|
.setForceHighestSupportedBitrate(forceHighestSupportedBitrate)
|
|
81
87
|
.setMaxVideoBitrateKbps(maxVideoBitrateKbps)
|
|
82
88
|
.setPreferredCaptionsLanguage("en");
|
|
89
|
+
|
|
90
|
+
if (enableAutoResume) {
|
|
91
|
+
builder.enableAutoResume();
|
|
92
|
+
}
|
|
83
93
|
if (bufferingGoalMs > 0) {
|
|
84
94
|
builder.setBufferingGoalMs(bufferingGoalMs);
|
|
85
95
|
}
|
package/ios/.DS_Store
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vdocipher-rn-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "React native bridge library that delegates to vdocipher native android SDK",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"author": "",
|
|
16
16
|
"license": "",
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"react-native": "^0.
|
|
18
|
+
"react-native": "^0.68"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"prop-types": "^15.6.2"
|