@npo/player 1.22.2 → 1.22.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/README.md CHANGED
@@ -11,7 +11,7 @@ Extensive and up-to-date documentation is available at https://docs.npoplayer.nl
11
11
  Code quality is analysed by SonarCloud. The project can be found at https://sonarcloud.io/project/overview?id=NPOstart_npo-player
12
12
 
13
13
  # Changelog
14
- Current version: v1.22.0
14
+ Current version: v1.22.3
15
15
 
16
16
  The changelog is available at https://docs.npoplayer.nl/implementation/web/changelog/
17
17
 
package/lib/npoplayer.js CHANGED
@@ -137,6 +137,7 @@ export default class NpoPlayer {
137
137
  return;
138
138
  const drmType = this.streamObject.stream.drmType ?? null;
139
139
  this.sourceConfig = await playerAction.processSourceConfig(options.sourceConfig ?? {}, this.streamObject, drmType && drmType.length > 0 ? profile.drm : null, this.streamOptions, this.version, this.npoTag?.npoTagInstance?.getParty());
140
+ await drm.verifyDRM(this, this.player, payload);
140
141
  setupMediaSessionActionHandlers(this.player, this.sourceConfig, _streamObject);
141
142
  logEvent(this, 'load');
142
143
  let streamDuration = _streamObject.metadata.duration;
@@ -154,7 +155,7 @@ export default class NpoPlayer {
154
155
  ? getDurationAndStartPlayerTracker()
155
156
  : startPlayerTracker(this, utility.validateStreamLength(streamDuration, false), this.version, streamPrid);
156
157
  };
157
- if (this.variant !== NpoPlayerUIVariants.AUDIO && (this.streamObject.metadata.hasPreroll !== 'false' || this.streamObject.assets.preroll)) {
158
+ if (this.variant !== NpoPlayerUIVariants.AUDIO && this.streamObject.metadata.hasPreroll === 'true' && this.streamObject.assets.preroll) {
158
159
  this.player.on(PlayerEvent.AdBreakFinished, initAndStartTracker);
159
160
  this.player.on(PlayerEvent.AdError, initAndStartTracker);
160
161
  await handlePreRolls(this.player, this.streamObject, this);
@@ -162,7 +163,6 @@ export default class NpoPlayer {
162
163
  else {
163
164
  this.player.on(PlayerEvent.SourceLoaded, initAndStartTracker);
164
165
  }
165
- await drm.verifyDRM(this, this.player, payload);
166
166
  }
167
167
  else {
168
168
  this.doError(`Het is niet gelukt de stream op te halen: \n Input is geen valide token of media object.`, 500);
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npo/player",
3
- "version": "1.22.2",
3
+ "version": "1.22.4",
4
4
  "description": "NPO Player",
5
5
  "author": "Publieke Omroep <player@npo.nl>",
6
6
  "contributors": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npo/player",
3
- "version": "1.22.2",
3
+ "version": "1.22.4",
4
4
  "description": "NPO Player",
5
5
  "author": "Publieke Omroep <player@npo.nl>",
6
6
  "contributors": [