playheadPosition: Difference between revisions
From Engineering Client Portal
(Created page with "{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|iOS SDK Reference}} {{CurrentBreadcrumb}} Category:Digital Category:iOS SDK Reference For situations where CMS da...") |
ShaneHartman (talk | contribs) m (updated input parameter to reflect spec for live playhead position) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|iOS SDK Reference}} {{CurrentBreadcrumb}} | {{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|iOS SDK API Reference}} {{CurrentBreadcrumb}} | ||
[[Category:Digital]] | [[Category:Digital]] | ||
[[Category:iOS SDK Reference]] | [[Category:iOS SDK API Reference]] | ||
For situations where CMS data is used in conjunction with Nielsen SDK the application needs to call the <code>playheadPosition</code> in the SDK every one second until a pause / stop. The playhead position is the current location in seconds of the playhead from the beginning of the asset. | For situations where CMS data is used in conjunction with Nielsen SDK the application needs to call the <code>playheadPosition</code> in the SDK every one second until a pause / stop. The playhead position is the current location in seconds of the playhead from the beginning of the asset. | ||
Line 32: | Line 32: | ||
! Parameter !! Description | ! Parameter !! Description | ||
|- | |- | ||
| playheadPos || An Integer value representing the time in content in seconds. | | playheadPos || An Integer value representing the time in content in seconds (VOD – Video On Demand) or the current Unix timestamp (seconds since Jan-1-1970 UTC) (live). | ||
|} | |} | ||
Latest revision as of 18:35, 10 January 2019
For situations where CMS data is used in conjunction with Nielsen SDK the application needs to call the playheadPosition
in the SDK every one second until a pause / stop. The playhead position is the current location in seconds of the playhead from the beginning of the asset.
Syntax
– (void) playheadPosition: (long long) playheadPos
Sending playheadposition for content
AVPlayer *player;
CMTime curTime=[player currentTime];
int pos = CMTimeGetSeconds(curTime);
[nAppApiObject playheadPosition:pos];
Sending playheadposition for ad
CMTime curTime=[adplayer currentTime];
long pos=CMTimeGetSeconds(curTime);
[nAppApiObject playheadPosition:pos];
Note: In case the individual ad details are not available, send ad pod (presence) details through the loadMetadata & playhead position and through
playheadPosition
.
Input Parameters
Parameter | Description |
---|---|
playheadPos | An Integer value representing the time in content in seconds (VOD – Video On Demand) or the current Unix timestamp (seconds since Jan-1-1970 UTC) (live). |
Output Parameters
Output Parameters (Return value) | Description |
---|---|
Void |
Notes
The player application must send the value of the playhead to the SDK every one second. The player application can schedule a timer with a one-second-period in a timer event and send the playhead position.
Buffering state
- Do not supply playhead position while the content is being buffered.
- If the content is in buffering state continuously for more than 30 seconds, call stop API.
Live Content
long long pos = [[NSDate date] timeIntervalSince1970];
[nAppApiObject playheadPosition:pos];
On-demand Content
CMTime curTime=[player currentTime];
long pos=CMTimeGetSeconds(curTime);
[nAppApiObject playheadPosition:pos];
Ad Content
CMTime curTime=[adplayer currentTime];
long pos=CMTimeGetSeconds(curTime);
[nAppApiObject playheadPosition:pos];
Note: The playhead positions for ad and content should be maintained separately.
Note: If playhead is not available from audio / video measurement, allow the app to start a timer (1-5 seconds) and send playhead position to SDK based on the timer event. Once the actual playhead is available, let the app send the proper playhead position. This allows the SDK to calculate and provide a closer value for duration.