@npo/player 1.22.1 → 1.22.3
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 +1 -1
- package/lib/npoplayer.js +9 -8
- package/lib/package.json +1 -1
- package/package.json +1 -1
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.
|
|
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
|
@@ -85,6 +85,7 @@ export default class NpoPlayer {
|
|
|
85
85
|
if (this.player === null)
|
|
86
86
|
return;
|
|
87
87
|
let prid = (utility.isJWTToken(source) ? this.streamObject?.metadata.prid : source) || 'unknown';
|
|
88
|
+
this.player.off(PlayerEvent.SourceLoaded, getDurationAndStartPlayerTracker);
|
|
88
89
|
let duration = this.player ? this.player.getDuration() : undefined;
|
|
89
90
|
startPlayerTracker(this, utility.validateStreamLength(duration, true), this.version, prid);
|
|
90
91
|
}.bind(this);
|
|
@@ -137,14 +138,6 @@ export default class NpoPlayer {
|
|
|
137
138
|
return;
|
|
138
139
|
const drmType = this.streamObject.stream.drmType ?? null;
|
|
139
140
|
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);
|
|
141
|
-
setupMediaSessionActionHandlers(this.player, this.sourceConfig, _streamObject);
|
|
142
|
-
logEvent(this, 'load');
|
|
143
|
-
let streamDuration = _streamObject.metadata.duration;
|
|
144
|
-
let streamPrid = this.streamObject.metadata.prid || _streamObject.metadata.prid;
|
|
145
|
-
if (this.isShowingPlayNextScreen) {
|
|
146
|
-
this.hidePlayNextScreen();
|
|
147
|
-
}
|
|
148
141
|
const initAndStartTracker = () => {
|
|
149
142
|
if (this.player === null)
|
|
150
143
|
return;
|
|
@@ -163,6 +156,14 @@ export default class NpoPlayer {
|
|
|
163
156
|
else {
|
|
164
157
|
this.player.on(PlayerEvent.SourceLoaded, initAndStartTracker);
|
|
165
158
|
}
|
|
159
|
+
await drm.verifyDRM(this, this.player, payload);
|
|
160
|
+
setupMediaSessionActionHandlers(this.player, this.sourceConfig, _streamObject);
|
|
161
|
+
logEvent(this, 'load');
|
|
162
|
+
let streamDuration = _streamObject.metadata.duration;
|
|
163
|
+
let streamPrid = this.streamObject.metadata.prid || _streamObject.metadata.prid;
|
|
164
|
+
if (this.isShowingPlayNextScreen) {
|
|
165
|
+
this.hidePlayNextScreen();
|
|
166
|
+
}
|
|
166
167
|
}
|
|
167
168
|
else {
|
|
168
169
|
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