Remove erroneous multiplication of time to start by 1000

This commit is contained in:
Andrey Beletsky 2021-06-08 12:20:49 +07:00 committed by jessopb
parent 09cfee2fa1
commit 27abc1e9d3

View file

@ -152,15 +152,15 @@ function VideoViewer(props: Props) {
} }
function doTrackingFirstPlay(e: Event, data: any) { function doTrackingFirstPlay(e: Event, data: any) {
let timeToStartInMs = data.secondsToLoad * 1000; let timeToStart = data.secondsToLoad;
if (desktopPlayStartTime !== undefined) { if (desktopPlayStartTime !== undefined) {
const differenceToAdd = Date.now() - desktopPlayStartTime; const differenceToAdd = Date.now() - desktopPlayStartTime;
timeToStartInMs += differenceToAdd; timeToStart += differenceToAdd;
} }
analytics.playerStartedEvent(embedded); analytics.playerStartedEvent(embedded);
analytics.videoStartEvent(claimId, timeToStartInMs); analytics.videoStartEvent(claimId, timeToStart);
doAnalyticsView(uri, timeToStartInMs).then(() => { doAnalyticsView(uri, timeToStart).then(() => {
claimRewards(); claimRewards();
}); });
} }