Skip to main content

updatePlayerTimeCode

Updates the Player Time Code stored in the SDK.

Overview

Use this method to pass in the current user player time code. We use this timestamp to mainly filter out Key Plays based on their wallClock value, and also to fetch the appropriate game Stats relative to the current time code.

Method Signature

updatePlayerTimeCode(timestamp: number);

Parameters

ParameterTypeDescription
datanumberThe timestamp value in milliseconds corresponding the player time code

Example Usage

import SDK from "@maestro_io/maestro-web-sdk";

async function onSeekVideoPlayer(timestamp: number) {
const event = SDK.getMaestroEventViewModel();
event.updatePlayerTimeCode(timestamp);
}

Notes

  • Make sure to debounce the call to prevent unnecessary process usage by the SDK method.