@24i/smartapps-bigscreen-rnv-build-engine 0.18.2-test.0 → 0.18.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.
Files changed (24) hide show
  1. package/dist/src/__tests__/engine.spec.js +1 -0
  2. package/dist/src/__tests__/resolvers/resolveBaseUrl.spec.js +19 -14
  3. package/dist/src/__tests__/resolvers/resolveBuildFileName.spec.js +1 -0
  4. package/dist/src/__tests__/resolvers/resolveDeployLocations.spec.js +3 -0
  5. package/dist/src/__tests__/resolvers/resolveZippedPlatformBuildsRelativeFilePath.spec.js +1 -1
  6. package/dist/src/__tests__/utils/zipBuildsByPlatforms.spec.js +7 -0
  7. package/dist/src/sdks/sdk-androidtv/sdkAndroidtv.js +5 -0
  8. package/dist/src/sdks/sdk-vegaos/sdkVegaOS.js +22 -5
  9. package/dist/templates/platforms/androidtv/project/app/build.gradle +3 -1
  10. package/dist/templates/platforms/androidtv/project/app/src/main/kotlin/com/twentyfouri/tvbridge/configuration/BridgeConfig.kt +1 -0
  11. package/dist/templates/platforms/androidtv/project/app/src/main/kotlin/com/twentyfouri/tvbridge/global/utils/PlayerFactoryBitmovinCustomized.kt +3 -1
  12. package/dist/templates/platforms/androidtv/project/app/src/main/kotlin/com/twentyfouri/tvbridge/webview/model/MediaEventType.kt +1 -0
  13. package/dist/templates/platforms/androidtv/project/app/src/main/kotlin/com/twentyfouri/tvbridge/webview/viewmodel/WebViewModel.kt +11 -0
  14. package/dist/templates/platforms/vegaos/project/manifest.toml +14 -0
  15. package/dist/templates/platforms/vegaos/project/package-lock.json +5838 -608
  16. package/dist/templates/platforms/vegaos/project/package.json +2 -0
  17. package/dist/templates/platforms/vegaos/project/src/App.tsx +5 -4
  18. package/dist/templates/platforms/vegaos/project/src/deviceApi/adInfo.ts +16 -0
  19. package/dist/templates/platforms/vegaos/project/src/deviceApi/index.ts +3 -0
  20. package/dist/templates/platforms/vegaos/project/src/deviceApi/purchase.ts +61 -0
  21. package/dist/templates/platforms/vegaos/project/src/inject.ts +13 -2
  22. package/dist/templates/platforms/vegaos/project/src/messageHandler.ts +24 -7
  23. package/package.json +2 -3
  24. /package/dist/templates/platforms/vegaos/project/src/{deviceInfo.ts → deviceApi/deviceInfo.ts} +0 -0
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const engine_1 = __importDefault(require("../engine"));
7
7
  const constants_1 = require("../constants");
8
8
  const engineTasks_1 = require("../tasks/engineTasks");
9
+ jest.mock('manifoldjs-windows10', () => ({}));
9
10
  jest.mock('../../../renative.engine.json', () => ({ __esModule: true, id: 'engineID', plugins: {} }), { virtual: true });
10
11
  describe('engine config', () => {
11
12
  afterAll(() => {
@@ -5,7 +5,7 @@ const resolveGenericRnvConfig_1 = require("../../resolvers/resolveGenericRnvConf
5
5
  const constants_1 = require("../../constants");
6
6
  jest.mock('../../resolvers/resolveGenericRnvConfig');
7
7
  describe('resolveBaseUrl', () => {
8
- const bucketName = 'test-bucket';
8
+ const hostedBaseUrl = 'http://test-bucket.s3.amazonaws.com';
9
9
  const flavour = 'test_flavour';
10
10
  const packageVersion = '1.0.0';
11
11
  const expectEmptyStringOutputForEachPlatformAndSchemeByFlavour = (customFlavour) => {
@@ -20,19 +20,23 @@ describe('resolveBaseUrl', () => {
20
20
  jest.resetAllMocks();
21
21
  jest.resetModules();
22
22
  });
23
- it('returns empty string when c.common.packageVersion is not set', () => {
23
+ it('returns latest URL when packageVersion is not set', () => {
24
24
  resolveGenericRnvConfig_1.getBaseConfig.mockReturnValue({
25
25
  runtime: {},
26
26
  buildConfig: {
27
27
  common: {
28
28
  packageVersion: '',
29
- deploy: { aws3: { bucketName } },
29
+ hostedUrl: { baseUrl: hostedBaseUrl },
30
30
  },
31
31
  },
32
32
  });
33
- expectEmptyStringOutputForEachPlatformAndSchemeByFlavour(flavour);
33
+ Object.values(constants_1.Platforms).forEach((platform) => {
34
+ expect((0, resolveBaseUrl_1.resolveBaseUrl)({
35
+ platform, scheme: constants_1.BuildSchemes.DEV_LATEST, flavour,
36
+ })).toBe(`${hostedBaseUrl}/builds/${platform}/${flavour}/latest/dev`);
37
+ });
34
38
  });
35
- it('returns empty string when c.buildConfig.common.deploy.aws3.bucketName is not set', () => {
39
+ it('returns empty string when c.buildConfig.common.hostedUrl.baseUrl is not set', () => {
36
40
  resolveGenericRnvConfig_1.getBaseConfig.mockReturnValue({
37
41
  runtime: {},
38
42
  buildConfig: { common: { packageVersion } },
@@ -40,14 +44,13 @@ describe('resolveBaseUrl', () => {
40
44
  expectEmptyStringOutputForEachPlatformAndSchemeByFlavour(flavour);
41
45
  });
42
46
  describe('resolving baseUrl for configured schemes', () => {
43
- const bucketUrl = `http://${bucketName}.s3.amazonaws.com`;
44
47
  beforeEach(() => {
45
48
  resolveGenericRnvConfig_1.getBaseConfig.mockReturnValue({
46
49
  runtime: {},
47
50
  buildConfig: {
48
51
  common: {
49
52
  packageVersion,
50
- deploy: { aws3: { bucketName } },
53
+ hostedUrl: { baseUrl: hostedBaseUrl },
51
54
  },
52
55
  },
53
56
  });
@@ -77,43 +80,45 @@ describe('resolveBaseUrl', () => {
77
80
  it('returns proper url for "latest development" build scheme', () => {
78
81
  const scheme = constants_1.BuildSchemes.DEV_LATEST;
79
82
  Object.values(constants_1.Platforms).forEach((platform) => {
80
- expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/latest/dev`);
83
+ expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${hostedBaseUrl}/builds/${platform}/${flavour}/latest/dev`);
81
84
  });
82
85
  });
83
86
  it('returns proper url for "latest release candidate (staging)" scheme', () => {
84
87
  const scheme = constants_1.BuildSchemes.RC_STAGING_LATEST;
85
88
  Object.values(constants_1.Platforms).forEach((platform) => {
86
- expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/latest/rc/staging`);
89
+ expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${hostedBaseUrl}/builds/${platform}/${flavour}/latest/rc/staging`);
87
90
  });
88
91
  });
89
92
  it('returns proper url for "latest release candidate (production)" scheme', () => {
90
93
  const scheme = constants_1.BuildSchemes.RC_PROD_LATEST;
91
94
  Object.values(constants_1.Platforms).forEach((platform) => {
92
- expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/latest/rc/production`);
95
+ expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${hostedBaseUrl}/builds/${platform}/${flavour}/latest/rc/production`);
93
96
  });
94
97
  });
95
98
  it('returns proper url for "latest release (staging)" build scheme', () => {
96
99
  const scheme = constants_1.BuildSchemes.RELEASE_STAGING_LATEST;
97
100
  Object.values(constants_1.Platforms).forEach((platform) => {
98
- expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/latest/release/staging`);
101
+ expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${hostedBaseUrl}/builds/${platform}/${flavour}/latest/release/staging`);
99
102
  });
100
103
  });
101
104
  it('returns proper url for "latest release (production)" build scheme', () => {
102
105
  const scheme = constants_1.BuildSchemes.RELEASE_PROD_LATEST;
103
106
  Object.values(constants_1.Platforms).forEach((platform) => {
104
- expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/latest/release/production`);
107
+ expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${hostedBaseUrl}/builds/${platform}/${flavour}/latest/release/production`);
105
108
  });
106
109
  });
107
110
  it('returns proper url for "distribution release (staging)" build scheme', () => {
108
111
  const scheme = constants_1.BuildSchemes.RELEASE_STAGING_DIST;
109
112
  Object.values(constants_1.Platforms).forEach((platform) => {
110
- expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/dist/v${packageVersion}/staging`);
113
+ expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${hostedBaseUrl}/builds/${platform}/${flavour}`
114
+ + `/dist/v${packageVersion}/staging`);
111
115
  });
112
116
  });
113
117
  it('returns proper url for "distribution release (production)" build scheme', () => {
114
118
  const scheme = constants_1.BuildSchemes.RELEASE_PROD_DIST;
115
119
  Object.values(constants_1.Platforms).forEach((platform) => {
116
- expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${bucketUrl}/builds/${platform}/${flavour}/dist/v${packageVersion}/production`);
120
+ expect((0, resolveBaseUrl_1.resolveBaseUrl)({ platform, flavour, scheme })).toBe(`${hostedBaseUrl}/builds/${platform}/${flavour}`
121
+ + `/dist/v${packageVersion}/production`);
117
122
  });
118
123
  });
119
124
  });
@@ -10,6 +10,7 @@ const getPackageExtensionByPlatform = (platform) => {
10
10
  switch (platform) {
11
11
  case constants_1.Platforms.TIZEN: return 'wgt';
12
12
  case constants_1.Platforms.WEBOS: return 'ipk';
13
+ case constants_1.Platforms.VEGAOS: return 'vpkg';
13
14
  default: return 'zip';
14
15
  }
15
16
  };
@@ -17,6 +17,9 @@ const c = {
17
17
  common: {
18
18
  appNameInFileName: 'appName',
19
19
  packageVersion: '1.0.0',
20
+ hostedUrl: {
21
+ baseUrl: 'http://bucketName.s3.amazonaws.com',
22
+ },
20
23
  deploy: {
21
24
  aws3: {
22
25
  bucketName: 'bucketName',
@@ -12,7 +12,7 @@ describe('resolveZippedPlatformBuildsRelativeFilePath', () => {
12
12
  };
13
13
  Object.values(constants_1.Platforms).forEach((platform) => {
14
14
  const r = (0, resolveZippedPlatformBuildsRelativeFilePath_1.resolveZippedPlatformBuildsRelativeFilePath)(c, platform);
15
- expect(r).toBe(`./dir1/dir2/dir3/zipped_by_platform/appName_${platform}_1.0.0.zip`);
15
+ expect(r).toBe(`dir1/dir2/dir3/zipped_by_platform/appName_${platform}_1.0.0.zip`);
16
16
  });
17
17
  });
18
18
  });
@@ -24,6 +24,8 @@ describe('zipBuildsByPlatforms', () => {
24
24
  fs_1.default.writeFileSync(path_1.default.resolve(outputPath, 'another_build.wgt'), 'data');
25
25
  fs_1.default.writeFileSync(path_1.default.resolve(outputPath, 'build.ipk'), 'data');
26
26
  fs_1.default.writeFileSync(path_1.default.resolve(outputPath, 'another_build.ipk'), 'data');
27
+ fs_1.default.writeFileSync(path_1.default.resolve(outputPath, 'build.vpkg'), 'data');
28
+ fs_1.default.writeFileSync(path_1.default.resolve(outputPath, 'another_build.vpkg'), 'data');
27
29
  });
28
30
  });
29
31
  });
@@ -32,6 +34,8 @@ describe('zipBuildsByPlatforms', () => {
32
34
  });
33
35
  it('create zip file for each supported platform', () => {
34
36
  const rnvC = {
37
+ program: { schemeFolder: false },
38
+ runtime: {},
35
39
  buildConfig: {
36
40
  paths: {
37
41
  platformBuildsDir: platformBuildsPath,
@@ -61,6 +65,9 @@ describe('zipBuildsByPlatforms', () => {
61
65
  else if (platform === constants_1.Platforms.WEBOS) {
62
66
  expect(zipFileContent).toStrictEqual(['another_build.ipk', 'build.ipk']);
63
67
  }
68
+ else if (platform === constants_1.Platforms.VEGAOS) {
69
+ expect(zipFileContent).toStrictEqual(['another_build.vpkg', 'build.vpkg']);
70
+ }
64
71
  else {
65
72
  expect(zipFileContent).toStrictEqual(['another_build.zip', 'build.zip']);
66
73
  }
@@ -200,6 +200,8 @@ const configureEntryUrl = (c) => {
200
200
  const entryUrl = getHostedAppEntryUrl(c);
201
201
  const bitmovinLicense = process.env.BITMOVIN_LICENSE
202
202
  || rnv_1.Common.getConfigProp(c, c.platform, 'bitmovinLicense', '');
203
+ const bitmovinAnalytics = process.env.BITMOVIN_ANALYTICS
204
+ || rnv_1.Common.getConfigProp(c, c.platform, 'bitmovinAnalytics', '');
203
205
  const npawAccountCode = process.env.NPAW_ACCOUNT_CODE
204
206
  || rnv_1.Common.getConfigProp(c, c.platform, 'npawAccountCode', '');
205
207
  const enableImaSdk = !!rnv_1.Common.getConfigProp(c, c.platform, 'enableImaSdk', false);
@@ -209,6 +211,9 @@ const configureEntryUrl = (c) => {
209
211
  }, {
210
212
  pattern: '{{BITMOVIN_LICENSE}}',
211
213
  override: bitmovinLicense,
214
+ }, {
215
+ pattern: '{{BITMOVIN_ANALYTICS}}',
216
+ override: bitmovinAnalytics,
212
217
  }, {
213
218
  pattern: '{{NPAW_ACCOUNT_CODE}}',
214
219
  override: npawAccountCode,
@@ -35,6 +35,7 @@ const rnv_1 = require("rnv");
35
35
  const sdk_webpack_1 = require("@rnv/sdk-webpack");
36
36
  const resolvers_1 = require("../../resolvers");
37
37
  const copyEnvironmentFolder_1 = require("../../utils/copyEnvironmentFolder");
38
+ const resolveBuildEnvType_1 = require("../../resolvers/resolveBuildEnvType");
38
39
  const constants_1 = require("../../constants");
39
40
  const sdk_webpack_2 = require("../sdk-webpack");
40
41
  const getHostedAppUrl = (c) => {
@@ -92,7 +93,20 @@ const copyAppIcon = (c) => {
92
93
  if (!fs.existsSync(destDir)) {
93
94
  fs.mkdirSync(destDir, { recursive: true });
94
95
  }
95
- rnv_1.Logger.logDebug(`App icon destination: ${destIconPath}`);
96
+ const envType = (0, resolveBuildEnvType_1.resolveBuildEnvType)(c.runtime.scheme);
97
+ const envHierarchy = ['dev', 'staging', 'prod'];
98
+ const envIndex = envHierarchy.indexOf(envType);
99
+ const srcIconPath = envHierarchy
100
+ .slice(envIndex)
101
+ .map((env) => path.join(destDir, `_${env}`, 'app_icon.png'))
102
+ .find((candidate) => fs.existsSync(candidate));
103
+ if (srcIconPath) {
104
+ fs.copyFileSync(srcIconPath, destIconPath);
105
+ rnv_1.Logger.logInfo(`App icon copied from: ${srcIconPath}`);
106
+ }
107
+ else {
108
+ rnv_1.Logger.logDebug(`No environment-specific app icon found, skipping copy.`);
109
+ }
96
110
  };
97
111
  const installDependencies = (c) => {
98
112
  rnv_1.Logger.logTask('installDependencies');
@@ -113,6 +127,8 @@ const buildVegaOSProject = async (c) => {
113
127
  const projectParentDir = path.join(projectDir, '..');
114
128
  const outputDir = path.join(projectParentDir, 'output');
115
129
  const buildType = c.runtime.scheme === constants_1.BuildSchemes.DEBUG ? 'Debug' : 'Release';
130
+ const appVersion = rnv_1.Common.getAppVersion(c, c.platform) || '0.0.1';
131
+ const versionCode = rnv_1.Common.getConfigProp(c, c.platform, 'versionCode', '1');
116
132
  try {
117
133
  const watchListOutput = (0, child_process_1.execSync)('watchman watch-list', { stdio: 'pipe' }).toString();
118
134
  const watchList = JSON.parse(watchListOutput);
@@ -124,7 +140,7 @@ const buildVegaOSProject = async (c) => {
124
140
  catch {
125
141
  }
126
142
  rnv_1.Logger.logInfo(`Building VegaOS project (${buildType})...`);
127
- const buildCmd = `npx react-native build-vega --build-type ${buildType}`;
143
+ const buildCmd = `npx react-native build-vega --build-type ${buildType} --build-version ${appVersion} --build-number ${versionCode}`;
128
144
  (0, child_process_1.execSync)(buildCmd, { cwd: projectDir, stdio: 'inherit' });
129
145
  if (!fs.existsSync(outputDir)) {
130
146
  fs.mkdirSync(outputDir, { recursive: true });
@@ -174,11 +190,12 @@ exports.configureVegaOSProject = configureVegaOSProject;
174
190
  const handleVegaOSSdk = async (_c) => {
175
191
  rnv_1.Logger.logTask('handleVegaOSSdk');
176
192
  try {
177
- (0, child_process_1.execSync)('npm --version', { stdio: 'pipe' });
178
- rnv_1.Logger.logInfo('VegaOS SDK: npm is available. Kepler CLI will be installed via npm install during project configuration.');
193
+ (0, child_process_1.execSync)('kepler --version', { stdio: 'pipe' });
194
+ rnv_1.Logger.logInfo('Kepler CLI is available.');
179
195
  }
180
196
  catch {
181
- throw new Error('VegaOS SDK: npm not found. Please install Node.js and npm to build VegaOS projects.');
197
+ throw new Error('Kepler CLI not found. Please install the Kepler SDK before building VegaOS projects.\n'
198
+ + 'See: https://developer.amazon.com/docs/vega/0.21/install-vega-sdk.html');
182
199
  }
183
200
  };
184
201
  exports.handleVegaOSSdk = handleVegaOSSdk;
@@ -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.41'
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]]