Skip to content

Commit 12e9c66

Browse files
Generate latest bundle
1 parent 18cd217 commit 12e9c66

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

dist/mparticle-media.common.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,12 @@ var MediaSession = /** @class */ (function () {
651651
*/
652652
MediaSession.prototype.logMediaContentEnd = function (options) {
653653
this.mediaContentComplete = true;
654+
if (this.currentPlaybackStartTimestamp) {
655+
this.storedPlaybackTime =
656+
this.storedPlaybackTime +
657+
(Date.now() - this.currentPlaybackStartTimestamp);
658+
this.currentPlaybackStartTimestamp = undefined;
659+
}
654660
var event = this.createMediaEvent(MediaEventType.ContentEnd, options);
655661
this.logEvent(event);
656662
};

dist/mparticle-media.iife.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,12 @@ var MediaSession = (function () {
652652
*/
653653
MediaSession.prototype.logMediaContentEnd = function (options) {
654654
this.mediaContentComplete = true;
655+
if (this.currentPlaybackStartTimestamp) {
656+
this.storedPlaybackTime =
657+
this.storedPlaybackTime +
658+
(Date.now() - this.currentPlaybackStartTimestamp);
659+
this.currentPlaybackStartTimestamp = undefined;
660+
}
655661
var event = this.createMediaEvent(MediaEventType.ContentEnd, options);
656662
this.logEvent(event);
657663
};

0 commit comments

Comments
 (0)