@24i/smartapps-bigscreen-rnv-build-engine 0.18.2-test.1 → 5.0.0-alpha.16
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/.eslintrc.vegaos.js +32 -0
- package/dist/src/__tests__/engine.spec.js +2 -0
- package/dist/src/__tests__/resolvers/resolveBaseUrl.spec.js +19 -14
- package/dist/src/__tests__/resolvers/resolveBuildFileName.spec.js +1 -0
- package/dist/src/__tests__/resolvers/resolveBuildVersion.spec.js +21 -7
- package/dist/src/__tests__/resolvers/resolveDeployLocations.spec.js +3 -0
- package/dist/src/__tests__/resolvers/resolveZippedPlatformBuildsRelativeFilePath.spec.js +1 -1
- package/dist/src/__tests__/utils/zipBuildsByPlatforms.spec.js +7 -0
- package/dist/src/resolvers/shared/constructFullUrl.js +1 -1
- package/dist/src/scripts/release/productionPackages/notifySlack.js +11 -13
- package/dist/src/sdks/sdk-androidtv/sdkAndroidtv.js +10 -3
- package/dist/src/sdks/sdk-tizen/sdkTizen.js +1 -1
- package/dist/src/sdks/sdk-vegaos/sdkVegaOS.js +25 -7
- package/dist/src/tasks/task.rnv.hooks.run.js +1 -24
- package/dist/src/tasks/task.rnv.project.configure.js +4 -1
- package/dist/src/utils/copyEnvironmentFolder.js +2 -2
- package/dist/src/utils/forEachSupportedPlatformFlavour.js +14 -7
- package/dist/src/utils/getSafeSchemeString.js +1 -3
- package/dist/src/utils/zipBuildsByPlatforms.js +3 -3
- package/dist/src/utils/zipStagingProdBuildsByPlatforms.js +17 -16
- package/dist/templates/platforms/_shared/template.js +2 -1
- package/dist/templates/platforms/_shared/webpack.base.js +12 -0
- package/dist/templates/platforms/androidtv/project/app/build.gradle +3 -1
- package/dist/templates/platforms/androidtv/project/app/src/main/kotlin/com/twentyfouri/tvbridge/configuration/BridgeConfig.kt +1 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/kotlin/com/twentyfouri/tvbridge/global/utils/PlayerFactoryBitmovinCustomized.kt +3 -1
- package/dist/templates/platforms/androidtv/project/app/src/main/kotlin/com/twentyfouri/tvbridge/webview/model/MediaEventType.kt +1 -0
- package/dist/templates/platforms/androidtv/project/app/src/main/kotlin/com/twentyfouri/tvbridge/webview/viewmodel/WebViewModel.kt +11 -0
- package/dist/templates/platforms/vegaos/project/manifest.toml +14 -0
- package/dist/templates/platforms/vegaos/project/package-lock.json +5838 -608
- package/dist/templates/platforms/vegaos/project/package.json +2 -0
- package/dist/templates/platforms/vegaos/project/src/App.tsx +5 -4
- package/dist/templates/platforms/vegaos/project/src/deviceApi/adInfo.ts +16 -0
- package/dist/templates/platforms/vegaos/project/src/deviceApi/index.ts +3 -0
- package/dist/templates/platforms/vegaos/project/src/deviceApi/purchase.ts +47 -0
- package/dist/templates/platforms/vegaos/project/src/inject.ts +13 -2
- package/dist/templates/platforms/vegaos/project/src/messageHandler.ts +24 -7
- package/fixDependency.js +53 -11
- package/index.js +103 -0
- package/jest.config.js +3 -0
- package/package.json +92 -90
- /package/dist/templates/platforms/vegaos/project/src/{deviceInfo.ts → deviceApi/deviceInfo.ts} +0 -0
|
@@ -42,8 +42,7 @@ const getPlatformBuildsPaths = (c, platformName, scheme) => {
|
|
|
42
42
|
const platformBuildsGlob = `${outputGlob}/*.${(0, index_1.resolveBuildFileExtension)(platformName)}`;
|
|
43
43
|
try {
|
|
44
44
|
const buildsPathsCandidates = glob.sync(platformBuildsGlob) || [];
|
|
45
|
-
|
|
46
|
-
return platformBuildsPaths;
|
|
45
|
+
return buildsPathsCandidates.filter((buildPath) => buildPath.includes(platformName));
|
|
47
46
|
}
|
|
48
47
|
catch (e) {
|
|
49
48
|
return [];
|
|
@@ -56,8 +55,7 @@ const getPublicDirPath = (c, platform, flavour, scheme) => {
|
|
|
56
55
|
const baseC = (0, index_1.getBaseConfig)({ scheme });
|
|
57
56
|
const { isBuildHosted } = getConfigProp(baseC, platform, 'webpackConfig', {});
|
|
58
57
|
const sourceDirPath = isBuildHosted ? `${sourcePath}-public` : sourcePath;
|
|
59
|
-
|
|
60
|
-
return contentDirPath;
|
|
58
|
+
return path.join(sourceDirPath, 'project', 'public');
|
|
61
59
|
};
|
|
62
60
|
const copyProdContentIntoTempPlatformFlavourDir = (c, platform, flavour, prodScheme, destPlatformFlavourPath) => {
|
|
63
61
|
const srcPublicDirPath = getPublicDirPath(c, platform, flavour, prodScheme);
|
|
@@ -75,13 +73,16 @@ const processPlatform = (c, platformName, schemes) => {
|
|
|
75
73
|
throw new Error('Missing production scheme.');
|
|
76
74
|
}
|
|
77
75
|
const outputZipFilePath = (0, index_1.resolveZippedPlatformBuildsRelativeFilePath)(c, platformName);
|
|
78
|
-
const
|
|
79
|
-
|
|
76
|
+
const stagingBuildPaths = stagingScheme
|
|
77
|
+
? getPlatformBuildsPaths(c, platformName, stagingScheme) : [];
|
|
78
|
+
const prodBuildPaths = getPlatformBuildsPaths(c, platformName, prodScheme);
|
|
80
79
|
const flavourBuilds = [];
|
|
81
80
|
const supportedFlavours = (0, index_1.resolveSupportedFlavoursForPlatform)(c, platformName);
|
|
82
81
|
supportedFlavours.forEach((flavour) => {
|
|
83
|
-
const flavourStagingBuildsPaths =
|
|
84
|
-
|
|
82
|
+
const flavourStagingBuildsPaths = stagingBuildPaths
|
|
83
|
+
.filter((buildPath) => buildPath.includes(flavour));
|
|
84
|
+
const flavourProdBuildsPaths = prodBuildPaths
|
|
85
|
+
.filter((buildPath) => buildPath.includes(flavour));
|
|
85
86
|
flavourBuilds.push({
|
|
86
87
|
flavour,
|
|
87
88
|
stagingBuildsPaths: flavourStagingBuildsPaths,
|
|
@@ -90,15 +91,15 @@ const processPlatform = (c, platformName, schemes) => {
|
|
|
90
91
|
});
|
|
91
92
|
const tempPlatformDir = `${path.dirname(outputZipFilePath)}/${platformName}`;
|
|
92
93
|
flavourBuilds.forEach((flavourBuild) => {
|
|
93
|
-
const { flavour, stagingBuildsPaths, prodBuildsPaths } = flavourBuild;
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
(0, fs_1.mkdirSync)(
|
|
97
|
-
(0, fs_1.mkdirSync)(
|
|
98
|
-
[...
|
|
99
|
-
copyBuildFileIntoTempPlatformFlavourDir(buildFilePath,
|
|
94
|
+
const { flavour, stagingBuildsPaths: stagingPaths, prodBuildsPaths: prodPaths, } = flavourBuild;
|
|
95
|
+
const tempPlatformFlavourDir = path.join(tempPlatformDir, flavour);
|
|
96
|
+
const tempPlatformFlavourBuildsDir = path.join(tempPlatformFlavourDir, 'builds');
|
|
97
|
+
(0, fs_1.mkdirSync)(tempPlatformFlavourDir, { recursive: true });
|
|
98
|
+
(0, fs_1.mkdirSync)(tempPlatformFlavourBuildsDir, { recursive: true });
|
|
99
|
+
[...stagingPaths, ...prodPaths].forEach((buildFilePath) => {
|
|
100
|
+
copyBuildFileIntoTempPlatformFlavourDir(buildFilePath, tempPlatformFlavourBuildsDir);
|
|
100
101
|
});
|
|
101
|
-
copyProdContentIntoTempPlatformFlavourDir(c, platformName, flavour, prodScheme,
|
|
102
|
+
copyProdContentIntoTempPlatformFlavourDir(c, platformName, flavour, prodScheme, tempPlatformFlavourDir);
|
|
102
103
|
});
|
|
103
104
|
zipDir(tempPlatformDir, path.resolve(outputZipFilePath));
|
|
104
105
|
(0, fs_1.rmdirSync)(tempPlatformDir, { recursive: true });
|
|
@@ -40,7 +40,8 @@ const htmlTemp = (options) => {
|
|
|
40
40
|
if (platform === 'tizen') {
|
|
41
41
|
tizenScripts = '<script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script>';
|
|
42
42
|
}
|
|
43
|
-
let faviconTag = '<link id="favicon" rel="icon" type="image/png"
|
|
43
|
+
let faviconTag = '<link id="favicon" rel="icon" type="image/png" '
|
|
44
|
+
+ 'href="data:image/png;base64,iVBORw0KGgo=">';
|
|
44
45
|
if (platform === 'webtv') {
|
|
45
46
|
faviconTag = `
|
|
46
47
|
<script>
|
|
@@ -43,6 +43,12 @@ const getAppContentPath = (baseUrl, isBuildHosted = false) => {
|
|
|
43
43
|
? `${baseUrl}/${relativePath}`
|
|
44
44
|
: `./${relativePath}`;
|
|
45
45
|
};
|
|
46
|
+
const getBuildEnginePackageRoot = (projectDir) => path_1.default.dirname(require.resolve('@24i/smartapps-bigscreen-rnv-build-engine/package.json', { paths: [projectDir, __dirname] }));
|
|
47
|
+
const resolveFromProject = (moduleName, projectDir) => require.resolve(moduleName, { paths: [projectDir, getBuildEnginePackageRoot(projectDir), __dirname] });
|
|
48
|
+
const makeTypeScriptOptions = (projectDir) => ({
|
|
49
|
+
typescriptPath: resolveFromProject('typescript', projectDir),
|
|
50
|
+
configFile: path_1.default.join(projectDir, 'tsconfig.json'),
|
|
51
|
+
});
|
|
46
52
|
const makeRules = (config, projectDir, isDevServer) => ({
|
|
47
53
|
babel: {
|
|
48
54
|
test: /\.[tj]sx?$/,
|
|
@@ -51,6 +57,8 @@ const makeRules = (config, projectDir, isDevServer) => ({
|
|
|
51
57
|
{
|
|
52
58
|
loader: 'ts-loader',
|
|
53
59
|
options: {
|
|
60
|
+
compiler: makeTypeScriptOptions(projectDir).typescriptPath,
|
|
61
|
+
configFile: makeTypeScriptOptions(projectDir).configFile,
|
|
54
62
|
transpileOnly: true,
|
|
55
63
|
allowTsInNodeModules: true,
|
|
56
64
|
},
|
|
@@ -66,6 +74,7 @@ const makeRules = (config, projectDir, isDevServer) => ({
|
|
|
66
74
|
{
|
|
67
75
|
loader: 'sass-loader',
|
|
68
76
|
options: {
|
|
77
|
+
implementation: require(resolveFromProject('sass', projectDir)),
|
|
69
78
|
sourceMap: false,
|
|
70
79
|
additionalData: (0, extendSass_1.extendSass)(config),
|
|
71
80
|
},
|
|
@@ -135,10 +144,13 @@ function generateConfig(config) {
|
|
|
135
144
|
const isBuildHosted = config.isBuildHosted || false;
|
|
136
145
|
const appContentPath = getAppContentPath(baseUrl, isBuildHosted);
|
|
137
146
|
const copiedDirWithPublicContentPath = path_1.default.join(appBuildDir, `../${path_1.default.parse(appBuildDir).name}-public`);
|
|
147
|
+
const typeScriptOptions = makeTypeScriptOptions(projectDir);
|
|
138
148
|
const plugins = {
|
|
139
149
|
forkTsChecker: new fork_ts_checker_webpack_plugin_1.default({
|
|
140
150
|
typescript: {
|
|
151
|
+
configFile: typeScriptOptions.configFile,
|
|
141
152
|
memoryLimit: 4096,
|
|
153
|
+
typescriptPath: typeScriptOptions.typescriptPath,
|
|
142
154
|
},
|
|
143
155
|
}),
|
|
144
156
|
webpack: new webpack_1.default.DefinePlugin({
|
|
@@ -7,12 +7,13 @@ plugins {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
def bitmovinLicense = '{{BITMOVIN_LICENSE}}'
|
|
10
|
+
def bitmovinAnalytics = '{{BITMOVIN_ANALYTICS}}'
|
|
10
11
|
def useBitmovin = bitmovinLicense != ''
|
|
11
12
|
def npawAccountCode = '{{NPAW_ACCOUNT_CODE}}'
|
|
12
13
|
def useNpawPlugin = npawAccountCode != ''
|
|
13
14
|
def useImaSdk = {{ENABLE_IMA_SDK}}
|
|
14
15
|
|
|
15
|
-
def player_version = '0.8.0-alpha.
|
|
16
|
+
def player_version = '0.8.0-alpha.43'
|
|
16
17
|
|
|
17
18
|
android {
|
|
18
19
|
namespace = 'com.twentyfouri.tvbridge'
|
|
@@ -42,6 +43,7 @@ android {
|
|
|
42
43
|
|
|
43
44
|
buildConfigField "String", "APP_URL", '"{{APP_URL}}"'
|
|
44
45
|
buildConfigField "String", "BITMOVIN_LICENSE", "\"$bitmovinLicense\""
|
|
46
|
+
buildConfigField "String", "BITMOVIN_ANALYTICS", "\"$bitmovinAnalytics\""
|
|
45
47
|
buildConfigField "String", "NPAW_ACCOUNT_CODE", "\"$npawAccountCode\""
|
|
46
48
|
buildConfigField "Boolean", "startWithHighVideoQuality", "true"
|
|
47
49
|
}
|
|
@@ -14,5 +14,6 @@ class BridgeConfig {
|
|
|
14
14
|
var customizableUrl: Boolean = BuildConfig.DEBUG
|
|
15
15
|
var startWithHighVideoQuality: Boolean = false
|
|
16
16
|
var bitmovinLicense: String = BuildConfig.BITMOVIN_LICENSE
|
|
17
|
+
var bitmovinAnalytics: String = BuildConfig.BITMOVIN_ANALYTICS
|
|
17
18
|
var npawAccount: String = BuildConfig.NPAW_ACCOUNT_CODE
|
|
18
19
|
}
|
|
@@ -2,6 +2,7 @@ package com.twentyfouri.tvbridge.global.utils
|
|
|
2
2
|
|
|
3
3
|
import android.app.Application
|
|
4
4
|
import com.twentyfouri.player.bitmovin.NpawConfig
|
|
5
|
+
import com.twentyfouri.player.bitmovin.PlayerBitmovin
|
|
5
6
|
import com.twentyfouri.player.bitmovin.PlayerFactoryBitmovin
|
|
6
7
|
import com.twentyfouri.tvbridge.configuration.BridgeConfig
|
|
7
8
|
|
|
@@ -12,6 +13,7 @@ class PlayerFactoryBitmovinCustomized(config: BridgeConfig, application: Applica
|
|
|
12
13
|
NpawConfig(config.npawAccount, application)
|
|
13
14
|
} else {
|
|
14
15
|
null
|
|
15
|
-
}
|
|
16
|
+
},
|
|
17
|
+
config.bitmovinAnalytics.ifEmpty { PlayerBitmovin.ANALYTICS_LICENSE_DEFERRED }
|
|
16
18
|
),
|
|
17
19
|
PlayerFactoryVersion
|
|
@@ -14,6 +14,7 @@ object MediaEventType {
|
|
|
14
14
|
const val LOADEDMETADATA = "loadedmetadata"
|
|
15
15
|
const val LOADEDDATA = "loadeddata"
|
|
16
16
|
const val WAITING = "waiting"
|
|
17
|
+
const val DURATION_CHANGE = "durationchange"
|
|
17
18
|
const val SEEKING = "seeking"
|
|
18
19
|
const val SEEKED = "seeked"
|
|
19
20
|
const val KEY_PRESS = "keypress"
|
|
@@ -29,6 +29,7 @@ import com.twentyfouri.player.base.AudioTrack
|
|
|
29
29
|
import com.twentyfouri.player.base.CanPlayEvent
|
|
30
30
|
import com.twentyfouri.player.base.ChangeAudioTrackEvent
|
|
31
31
|
import com.twentyfouri.player.base.ChangeTextTrackEvent
|
|
32
|
+
import com.twentyfouri.player.base.DurationChangeEvent
|
|
32
33
|
import com.twentyfouri.player.base.EndedEvent
|
|
33
34
|
import com.twentyfouri.player.base.ErrorEvent
|
|
34
35
|
import com.twentyfouri.player.base.Event
|
|
@@ -46,6 +47,7 @@ import com.twentyfouri.player.base.SeekingEvent
|
|
|
46
47
|
import com.twentyfouri.player.base.Source
|
|
47
48
|
import com.twentyfouri.player.base.SourceDrmPlayready
|
|
48
49
|
import com.twentyfouri.player.base.SourceDrmWidevine
|
|
50
|
+
import com.twentyfouri.player.base.SourceImaAds
|
|
49
51
|
import com.twentyfouri.player.base.TextTrack
|
|
50
52
|
import com.twentyfouri.player.base.TimeUpdateEvent
|
|
51
53
|
import com.twentyfouri.player.base.TrackKind
|
|
@@ -178,6 +180,11 @@ class WebViewModel @Inject constructor(
|
|
|
178
180
|
|
|
179
181
|
private fun logSource(source: Source) {
|
|
180
182
|
Log.i("BridgeVideo", "Url: ${source.url}")
|
|
183
|
+
when (val ads = source.ads) {
|
|
184
|
+
is SourceImaAds -> {
|
|
185
|
+
Log.i("BridgeVideo", "Ads: ${ads.url}")
|
|
186
|
+
}
|
|
187
|
+
}
|
|
181
188
|
when (val drmModel = source.drm.firstOrNull()) {
|
|
182
189
|
is SourceDrmWidevine -> {
|
|
183
190
|
Log.i("BridgeVideo", "DRM: " + drmModel.packageName)
|
|
@@ -366,6 +373,10 @@ class WebViewModel @Inject constructor(
|
|
|
366
373
|
jsBridge.bridgeAndroidToJavaScript_MediaEvent(MediaEventType.PLAYING)
|
|
367
374
|
}
|
|
368
375
|
|
|
376
|
+
is DurationChangeEvent -> {
|
|
377
|
+
jsBridge.bridgeAndroidToJavaScript_MediaEvent(MediaEventType.DURATION_CHANGE)
|
|
378
|
+
}
|
|
379
|
+
|
|
369
380
|
is SeekingEvent -> {
|
|
370
381
|
jsBridge.bridgeAndroidToJavaScript_MediaEvent(MediaEventType.SEEKING)
|
|
371
382
|
}
|
|
@@ -49,6 +49,20 @@ id = "com.amazon.audio.control"
|
|
|
49
49
|
[[wants.service]]
|
|
50
50
|
id = "com.amazon.audio.system"
|
|
51
51
|
|
|
52
|
+
[[wants.service]]
|
|
53
|
+
id = "com.amazon.admanager.service.main"
|
|
54
|
+
|
|
55
|
+
[[wants.service]]
|
|
56
|
+
id = "com.amazon.iap.core.service"
|
|
57
|
+
|
|
58
|
+
[[wants.module]]
|
|
59
|
+
id = "/com.amazon.iap.core@IIAPCoreUI"
|
|
60
|
+
|
|
61
|
+
[needs]
|
|
62
|
+
|
|
63
|
+
[[needs.module]]
|
|
64
|
+
id = "/com.amazon.kepler.appstore.iap.purchase.core@IAppstoreIAPPurchaseCoreService"
|
|
65
|
+
|
|
52
66
|
[offers]
|
|
53
67
|
|
|
54
68
|
[[offers.service]]
|