@24i/smartapps-bigscreen-rnv-build-engine 0.17.26-alpha.2727 → 0.17.26-alpha.2754
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/dist/src/scripts/buildAllWithSchemes.js +8 -3
- package/dist/templates/platforms/androidtv/project/app/build.gradle +4 -4
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/PlayerFactoryExoPlayerCustomized.kt +8 -3
- package/dist/templates/platforms/androidtv/project/app/src/main/java/com/twentyfouri/tvbridge/global/utils/PlayerFactoryExoPlayerNpaw.kt +9 -2
- package/package.json +1 -1
|
@@ -30,6 +30,11 @@ const fse = __importStar(require("fs-extra"));
|
|
|
30
30
|
const getSafeSchemeString_1 = require("../utils/getSafeSchemeString");
|
|
31
31
|
const resolvers_1 = require("../resolvers");
|
|
32
32
|
const getArgs_1 = require("./utils/getArgs");
|
|
33
|
+
const convertToArray = (value) => {
|
|
34
|
+
if (!Array.isArray(value))
|
|
35
|
+
return [value];
|
|
36
|
+
return value || [];
|
|
37
|
+
};
|
|
33
38
|
const getProgressMessage = ({ schemes, schemeIndex, platforms, platformIndex, flavours, flavourIndex, }) => {
|
|
34
39
|
let string = '\nProcessing';
|
|
35
40
|
string += ` "${platforms[platformIndex]}" platform`;
|
|
@@ -69,12 +74,12 @@ const buildAllWithSchemes = () => {
|
|
|
69
74
|
if (include || exclude) {
|
|
70
75
|
supportedPlatforms = supportedPlatforms.filter((platform) => {
|
|
71
76
|
if (include)
|
|
72
|
-
return include.includes(platform);
|
|
73
|
-
return !exclude.includes(platform);
|
|
77
|
+
return convertToArray(include).includes(platform);
|
|
78
|
+
return !convertToArray(exclude).includes(platform);
|
|
74
79
|
});
|
|
75
80
|
}
|
|
76
81
|
supportedPlatforms.forEach((platform, platformIndex, platforms) => {
|
|
77
|
-
buildSchemes.forEach((scheme, schemeIndex, schemes) => {
|
|
82
|
+
convertToArray(buildSchemes).forEach((scheme, schemeIndex, schemes) => {
|
|
78
83
|
c.runtime.scheme = scheme;
|
|
79
84
|
const supportedFlavours = (0, resolvers_1.resolveSupportedFlavoursForPlatform)(c, platform);
|
|
80
85
|
supportedFlavours.forEach((flavour, flavourIndex, flavours) => {
|
|
@@ -104,12 +104,12 @@ dependencies {
|
|
|
104
104
|
implementation "com.squareup.okhttp3:logging-interceptor:4.9.2"
|
|
105
105
|
implementation "com.squareup.okhttp3:okhttp:4.9.2"
|
|
106
106
|
if (useTheoPlayer) {
|
|
107
|
-
compileOnly "com.twentyfouri.player:exoplayer:0.8.0-alpha.
|
|
108
|
-
implementation "com.twentyfouri.player:theoplayer:0.8.0-alpha.
|
|
107
|
+
compileOnly "com.twentyfouri.player:exoplayer:0.8.0-alpha.8"
|
|
108
|
+
implementation "com.twentyfouri.player:theoplayer:0.8.0-alpha.8"
|
|
109
109
|
implementation "com.theoplayer.theoplayer-sdk-android:core:8.2.0"
|
|
110
110
|
} else {
|
|
111
|
-
implementation "com.twentyfouri.player:exoplayer:0.8.0-alpha.
|
|
112
|
-
compileOnly "com.twentyfouri.player:theoplayer:0.8.0-alpha.
|
|
111
|
+
implementation "com.twentyfouri.player:exoplayer:0.8.0-alpha.8"
|
|
112
|
+
compileOnly "com.twentyfouri.player:theoplayer:0.8.0-alpha.8"
|
|
113
113
|
compileOnly "com.theoplayer.theoplayer-sdk-android:core:8.2.0"
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -8,7 +8,7 @@ import com.google.android.exoplayer2.drm.DrmSessionManager
|
|
|
8
8
|
import com.google.android.exoplayer2.drm.FrameworkMediaDrm
|
|
9
9
|
import com.google.android.exoplayer2.drm.MediaDrmCallback
|
|
10
10
|
import com.google.android.exoplayer2.upstream.HttpDataSource
|
|
11
|
-
import com.google.android.exoplayer2.
|
|
11
|
+
import com.google.android.exoplayer2.upstream.LoadErrorHandlingPolicy
|
|
12
12
|
import com.twentyfouri.player.base.DrmPlayready
|
|
13
13
|
import com.twentyfouri.player.base.DrmWidevine
|
|
14
14
|
import com.twentyfouri.player.base.Source
|
|
@@ -29,7 +29,9 @@ class PlayerFactoryExoPlayerCustomized(
|
|
|
29
29
|
|
|
30
30
|
private inner class CustomizedSharedComponents(context: Context) : DefaultSharedComponents(context) {
|
|
31
31
|
|
|
32
|
-
override val drmProvider: DrmSessionManagerProvider by lazy {
|
|
32
|
+
override val drmProvider: DrmSessionManagerProvider by lazy {
|
|
33
|
+
CustomizedDrmSessionManagerProvider(loadErrorHandlingPolicy)
|
|
34
|
+
}
|
|
33
35
|
|
|
34
36
|
override val applicationName: String
|
|
35
37
|
get() = config.playerAppName ?: super.applicationName
|
|
@@ -50,7 +52,9 @@ class PlayerFactoryExoPlayerCustomized(
|
|
|
50
52
|
get() = false
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
private class CustomizedDrmSessionManagerProvider
|
|
55
|
+
private class CustomizedDrmSessionManagerProvider(
|
|
56
|
+
loadErrorHandlingPolicy: LoadErrorHandlingPolicy
|
|
57
|
+
) : DefaultDrmSessionManagerProvider(loadErrorHandlingPolicy) {
|
|
54
58
|
override fun buildDrmSessionManager(
|
|
55
59
|
dataSourceFactory: AuthorizedDataSourceProvider,
|
|
56
60
|
source: Source,
|
|
@@ -85,6 +89,7 @@ class PlayerFactoryExoPlayerCustomized(
|
|
|
85
89
|
return DefaultDrmSessionManager.Builder()
|
|
86
90
|
.setUuidAndExoMediaDrmProvider(drmUuid, FrameworkMediaDrm.DEFAULT_PROVIDER)
|
|
87
91
|
.setMultiSession(false)
|
|
92
|
+
.setLoadErrorHandlingPolicy(loadErrorHandlingPolicy)
|
|
88
93
|
.build(drmCallback)
|
|
89
94
|
}
|
|
90
95
|
|
|
@@ -36,6 +36,7 @@ import com.google.android.exoplayer2.ui.AdViewProvider
|
|
|
36
36
|
import com.google.android.exoplayer2.ui.AspectRatioFrameLayout
|
|
37
37
|
import com.google.android.exoplayer2.ui.SubtitleView
|
|
38
38
|
import com.google.android.exoplayer2.upstream.HttpDataSource
|
|
39
|
+
import com.google.android.exoplayer2.upstream.LoadErrorHandlingPolicy
|
|
39
40
|
import com.google.android.exoplayer2.upstream.cache.CacheDataSource
|
|
40
41
|
import com.google.android.exoplayer2.video.VideoSize
|
|
41
42
|
import com.npaw.NpawPlugin
|
|
@@ -127,7 +128,9 @@ class PlayerFactoryExoPlayerNpaw(
|
|
|
127
128
|
npawPlugin.destroy()
|
|
128
129
|
}
|
|
129
130
|
|
|
130
|
-
override val drmProvider: DrmSessionManagerProvider by lazy {
|
|
131
|
+
override val drmProvider: DrmSessionManagerProvider by lazy {
|
|
132
|
+
CustomizedDrmSessionManagerProvider(loadErrorHandlingPolicy)
|
|
133
|
+
}
|
|
131
134
|
|
|
132
135
|
override val applicationName: String
|
|
133
136
|
get() = config.playerAppName ?: super.applicationName
|
|
@@ -162,7 +165,9 @@ class PlayerFactoryExoPlayerNpaw(
|
|
|
162
165
|
get() = false
|
|
163
166
|
}
|
|
164
167
|
|
|
165
|
-
private class CustomizedDrmSessionManagerProvider
|
|
168
|
+
private class CustomizedDrmSessionManagerProvider(
|
|
169
|
+
loadErrorHandlingPolicy: LoadErrorHandlingPolicy
|
|
170
|
+
) : DefaultDrmSessionManagerProvider(loadErrorHandlingPolicy) {
|
|
166
171
|
override fun buildDrmSessionManager(
|
|
167
172
|
dataSourceFactory: AuthorizedDataSourceProvider,
|
|
168
173
|
source: Source,
|
|
@@ -197,6 +202,7 @@ class PlayerFactoryExoPlayerNpaw(
|
|
|
197
202
|
return DefaultDrmSessionManager.Builder()
|
|
198
203
|
.setUuidAndExoMediaDrmProvider(drmUuid, FrameworkMediaDrm.DEFAULT_PROVIDER)
|
|
199
204
|
.setMultiSession(false)
|
|
205
|
+
.setLoadErrorHandlingPolicy(loadErrorHandlingPolicy)
|
|
200
206
|
.build(drmCallback)
|
|
201
207
|
}
|
|
202
208
|
|
|
@@ -228,6 +234,7 @@ class PlayerFactoryExoPlayerNpaw(
|
|
|
228
234
|
"app.name" -> target.appName = jsonAnalytics.getString(key, null)
|
|
229
235
|
"app.releaseVersion" -> target.appReleaseVersion = jsonAnalytics.getString(key, null)
|
|
230
236
|
"device.id" -> target.deviceId = jsonAnalytics.getString(key, null)
|
|
237
|
+
"username" -> target.username = jsonAnalytics.getString(key, null)
|
|
231
238
|
}
|
|
232
239
|
}
|
|
233
240
|
}
|
package/package.json
CHANGED