@npo/player 1.27.1 → 1.27.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/lib/npoplayer.js +7 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
package/lib/npoplayer.js
CHANGED
|
@@ -86,9 +86,11 @@ export default class NpoPlayer {
|
|
|
86
86
|
console.error('Er is nog geen player geladen.');
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
+
if (this.player.getVideoElement()?.src) {
|
|
90
|
+
await this.unload();
|
|
91
|
+
}
|
|
89
92
|
this.streamOptions = options;
|
|
90
93
|
this.playerContext.player.removeClassFromNpoPlayerElement('npo-player-error');
|
|
91
|
-
this.npoPlayerServices.discardAdBreak(this.playerContext);
|
|
92
94
|
let _streamObject;
|
|
93
95
|
const sourceIsUrl = isUrl(source);
|
|
94
96
|
const sourceIsMedia = await isMediaUrl(source);
|
|
@@ -325,6 +327,10 @@ export default class NpoPlayer {
|
|
|
325
327
|
if (this.npoTag != undefined) {
|
|
326
328
|
clearInterval(this.npoTag.heartbeatInterval);
|
|
327
329
|
}
|
|
330
|
+
this.pause();
|
|
331
|
+
if (this.playerContext) {
|
|
332
|
+
this.npoPlayerServices.discardAdBreak(this.playerContext);
|
|
333
|
+
}
|
|
328
334
|
this.hidePlayNextScreen();
|
|
329
335
|
await this.player?.unload();
|
|
330
336
|
return true;
|
package/lib/package.json
CHANGED