@npo/player 1.24.3 → 1.24.4

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/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npo/player",
3
- "version": "1.24.3",
3
+ "version": "1.24.4",
4
4
  "description": "NPO Player",
5
5
  "author": "Publieke Omroep <player@npo.nl>",
6
6
  "contributors": [
@@ -11,11 +11,6 @@ import { removeReplayClass } from '../js/playeractions/handlers/removereplayclas
11
11
  let adBreakActive = false;
12
12
  export function nativeMobileUiFactory(player, config = {}) {
13
13
  UIManager.setLocalizationConfig(localizationConfig);
14
- const nicamElement = getElementByQuery({ container: player.getContainer(), query: '.bmpui-nicam' });
15
- const seekbarTitleElement = getElementByQuery({
16
- container: player.getContainer(),
17
- query: '.bmpui-seekbar-label-title'
18
- });
19
14
  const uiConfig = {
20
15
  ...config,
21
16
  errorMessages: customSpecificErrorMessageOverlayConfig,
@@ -29,8 +24,13 @@ export function nativeMobileUiFactory(player, config = {}) {
29
24
  };
30
25
  const clearUI = () => {
31
26
  adBreakActive = false;
27
+ const nicamElement = getElementByQuery({ container: player.getContainer(), query: '.bmpui-nicam' });
32
28
  if (nicamElement)
33
29
  nicamElement.innerHTML = '';
30
+ const seekbarTitleElement = getElementByQuery({
31
+ container: player.getContainer(),
32
+ query: '.bmpui-seekbar-label-title'
33
+ });
34
34
  if (seekbarTitleElement)
35
35
  seekbarTitleElement.textContent = '';
36
36
  removeClassFromElementByQuery({
@@ -40,13 +40,19 @@ export function nativeMobileUiFactory(player, config = {}) {
40
40
  });
41
41
  };
42
42
  const updateUI = () => {
43
+ const nicamElement = getElementByQuery({ container: player.getContainer(), query: '.bmpui-nicam' });
44
+ const seekbarTitleElement = getElementByQuery({
45
+ container: player.getContainer(),
46
+ query: '.bmpui-seekbar-label-title'
47
+ });
43
48
  if (_webData.assets.preroll) {
44
49
  adBreakActive = true;
45
50
  player.on(PlayerEvent.AdBreakFinished, setAdBreakActiveToFalse);
46
51
  player.on(PlayerEvent.AdError, setAdBreakActiveToFalse);
47
52
  }
48
- if (_webData.metadata?.ageRating)
53
+ if (_webData.metadata?.ageRating || _webData.metadata?.nicam) {
49
54
  processNicam(_webData, nicamElement, undefined);
55
+ }
50
56
  if (seekbarTitleElement)
51
57
  seekbarTitleElement.textContent = _webData.title || '';
52
58
  handleLiveStreamNoDvr(player, _webData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npo/player",
3
- "version": "1.24.3",
3
+ "version": "1.24.4",
4
4
  "description": "NPO Player",
5
5
  "author": "Publieke Omroep <player@npo.nl>",
6
6
  "contributors": [