@npo/player 1.28.1 → 1.28.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 +3 -1
- package/lib/package.json +1 -1
- package/lib/services/npoPlayerAPI/playerModules.js +3 -1
- package/lib/services/services.d.ts +1 -1
- package/lib/services/services.js +3 -2
- package/lib/services/trackingHandlers/playerTrackerStart.d.ts +1 -1
- package/lib/services/trackingHandlers/playerTrackerStart.js +4 -1
- package/lib/src/services/services.d.ts +1 -1
- package/lib/src/services/trackingHandlers/playerTrackerStart.d.ts +1 -1
- package/lib/src/types/interfaces.d.ts +1 -0
- package/lib/types/interfaces.d.ts +1 -0
- package/package.json +1 -1
package/lib/npoplayer.js
CHANGED
|
@@ -179,12 +179,14 @@ export default class NpoPlayer {
|
|
|
179
179
|
const initAndStartTracker = () => {
|
|
180
180
|
if (!this.playerContext || !this.player)
|
|
181
181
|
return;
|
|
182
|
+
this.playerContext.npoPlayer.adBreakActive = false;
|
|
182
183
|
this.player?.off(PlayerEvent.AdBreakFinished, initAndStartTracker);
|
|
183
184
|
this.player?.off(PlayerEvent.AdError, initAndStartTracker);
|
|
184
185
|
this.npoPlayerServices.startPlayerTracker({
|
|
185
186
|
playerContext: this.playerContext,
|
|
186
187
|
source: source,
|
|
187
|
-
duration: streamDuration ? Number(streamDuration) : undefined
|
|
188
|
+
duration: streamDuration ? Number(streamDuration) : undefined,
|
|
189
|
+
afterAd: true
|
|
188
190
|
});
|
|
189
191
|
};
|
|
190
192
|
this.npoPlayerServices.setupNicamKijkwijzerIcons(this.playerContext);
|
package/lib/package.json
CHANGED
|
@@ -20,6 +20,7 @@ import StyleModule from 'bitmovin-player/modules/bitmovinplayer-style';
|
|
|
20
20
|
import CryptoModule from 'bitmovin-player/modules/bitmovinplayer-crypto';
|
|
21
21
|
import PatchModule from 'bitmovin-player/modules/bitmovinplayer-patch';
|
|
22
22
|
import ThumbnailModule from 'bitmovin-player/modules/bitmovinplayer-thumbnail';
|
|
23
|
+
import RemoteControlModule from 'bitmovin-player/modules/bitmovinplayer-remotecontrol';
|
|
23
24
|
export const playerModules = [
|
|
24
25
|
EngineBitmovinModule,
|
|
25
26
|
EngineNativeModule,
|
|
@@ -42,5 +43,6 @@ export const playerModules = [
|
|
|
42
43
|
AdvertisingCoreModule,
|
|
43
44
|
AdvertisingBitmovinModule,
|
|
44
45
|
AnalyticsModule,
|
|
45
|
-
ThumbnailModule
|
|
46
|
+
ThumbnailModule,
|
|
47
|
+
RemoteControlModule
|
|
46
48
|
];
|
|
@@ -23,7 +23,7 @@ export declare class NpoPlayerServices {
|
|
|
23
23
|
handleStreamOptions(playerContext: PlayerContext): void;
|
|
24
24
|
handleError({ playerContext, status: input, context: context }: LogErrorParams): Promise<void>;
|
|
25
25
|
fetchStream(playerContext: PlayerContext, payload: ApiPayload): Promise<StreamObject>;
|
|
26
|
-
startPlayerTracker({ playerContext, source, duration }: PlayerTrackerParams): void;
|
|
26
|
+
startPlayerTracker({ playerContext, source, duration, afterAd }: PlayerTrackerParams): void;
|
|
27
27
|
initPlayerTracker(playerContext: PlayerContext): void;
|
|
28
28
|
logEvent({ playerContext, event, data }: LogEventParams): void;
|
|
29
29
|
removeEventListeners(playerContext: PlayerContext): void;
|
package/lib/services/services.js
CHANGED
|
@@ -94,11 +94,12 @@ export class NpoPlayerServices {
|
|
|
94
94
|
async fetchStream(playerContext, payload) {
|
|
95
95
|
return await fetchStream(playerContext, payload);
|
|
96
96
|
}
|
|
97
|
-
startPlayerTracker({ playerContext, source, duration }) {
|
|
97
|
+
startPlayerTracker({ playerContext, source, duration, afterAd = false }) {
|
|
98
98
|
startPlayerTracker({
|
|
99
99
|
playerContext,
|
|
100
100
|
source,
|
|
101
|
-
duration
|
|
101
|
+
duration,
|
|
102
|
+
afterAd
|
|
102
103
|
});
|
|
103
104
|
}
|
|
104
105
|
initPlayerTracker(playerContext) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PlayerTrackerParams } from 'types/interfaces';
|
|
2
|
-
export declare const startPlayerTracker: ({ playerContext, source, duration }: PlayerTrackerParams) => void;
|
|
2
|
+
export declare const startPlayerTracker: ({ playerContext, source, duration, afterAd }: PlayerTrackerParams) => void;
|
|
@@ -3,7 +3,7 @@ import { getStreamDurationInSeconds } from '../../js/utilities/utilities.stream'
|
|
|
3
3
|
import { initStreamTracker } from './streamTrackerInit';
|
|
4
4
|
import { bindPlayerEvents } from './eventBinding';
|
|
5
5
|
import { logEvent } from './eventLogging';
|
|
6
|
-
export const startPlayerTracker = function ({ playerContext, source, duration }) {
|
|
6
|
+
export const startPlayerTracker = function ({ playerContext, source, duration, afterAd = false }) {
|
|
7
7
|
const { npoPlayer } = playerContext;
|
|
8
8
|
const { player, sourceConfig, streamObject } = npoPlayer;
|
|
9
9
|
const playerDuration = duration ?? player?.getDuration() ?? undefined;
|
|
@@ -22,4 +22,7 @@ export const startPlayerTracker = function ({ playerContext, source, duration })
|
|
|
22
22
|
});
|
|
23
23
|
bindPlayerEvents(playerContext);
|
|
24
24
|
logEvent({ playerContext, event: 'load' });
|
|
25
|
+
if (afterAd) {
|
|
26
|
+
logEvent({ playerContext, event: 'load_complete' });
|
|
27
|
+
}
|
|
25
28
|
};
|
|
@@ -23,7 +23,7 @@ export declare class NpoPlayerServices {
|
|
|
23
23
|
handleStreamOptions(playerContext: PlayerContext): void;
|
|
24
24
|
handleError({ playerContext, status: input, context: context }: LogErrorParams): Promise<void>;
|
|
25
25
|
fetchStream(playerContext: PlayerContext, payload: ApiPayload): Promise<StreamObject>;
|
|
26
|
-
startPlayerTracker({ playerContext, source, duration }: PlayerTrackerParams): void;
|
|
26
|
+
startPlayerTracker({ playerContext, source, duration, afterAd }: PlayerTrackerParams): void;
|
|
27
27
|
initPlayerTracker(playerContext: PlayerContext): void;
|
|
28
28
|
logEvent({ playerContext, event, data }: LogEventParams): void;
|
|
29
29
|
removeEventListeners(playerContext: PlayerContext): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PlayerTrackerParams } from 'types/interfaces';
|
|
2
|
-
export declare const startPlayerTracker: ({ playerContext, source, duration }: PlayerTrackerParams) => void;
|
|
2
|
+
export declare const startPlayerTracker: ({ playerContext, source, duration, afterAd }: PlayerTrackerParams) => void;
|