setPlayheadPosition (Browser)

From Engineering Client Portal

Revision as of 19:34, 30 November 2018 by Admin (talk | contribs)

Engineering Portal / Digital / Browser SDK API Reference / setPlayheadPosition (Browser)
For situations where CMS data is used in conjunction with Nielsen’s SDK, the application needs to call setPlayheadPosition in the SDK every second. For proper reporting, the SDK should:

  • Receive a playhead position update every second on the playback of content.
  • Not receive playhead updates when the content playback is paused, is being buffered, or stopped.

When streaming VOD (Video On Demand), the playhead position is the current location of the player from the beginning of the asset in seconds (0, 1, 2, 3, …). When streaming live content, the playhead position passed is the current Unix timestamp (seconds since Jan-1-1970 UTC). For Digital Audio streaming Live or On Demand content, the playhead position passed is the current Unix timestamp (seconds since Jan-1-1970 UTC).

Syntax

ggPM('49', playheadposition); //For VA users only


International (Germany) implementation

ggPM("setPlayheadPosition", playheadposition); // Except VA users

Input Parameters

Parameter Description
event setPlayheadPosition
playheadposition The position of playhead while the streaming is in progress (integer).

Notes

The playhead position must be passed as an integer in parameter 2. Send the progress event to SDK at an interval not greater than 10 seconds, when the content is playing. An interval of one second is recommended for most implementations. For accurate time tracking, it is important to send the whole range of playhead positions from the player.

  • If playing starts at zero, pass the first value as zero (not ‘one’).
  • When the player is paused or stopped, send setPlayheadPosition along with the respective stop / end to the SDK.

Video On Demand Content

ggPM(setPlayheadPosition, setPlayheadPosition);

Live Content through JavaScript

ggPM(setPlayheadPosition, (Date.now()/1000));

Live Event through Flash

ggCom.getInstance().PM('setPlayheadPosition',Math.floor((new Date()).getTime()/1000));