loadMetadata: Difference between revisions

From Engineering Client Portal

(Created page with "{{DISPLAYTITLE:loadMetadata}} The application uses this API to send metadata to the SDK. App constructs a JSON dictionary and calls loadMetadata. The API that accepts the JSON...")
 
No edit summary
Line 3: Line 3:


In case of a preroll ad, call loadMetadata with metadata values for content followed by loadMetadata with ad (preroll) metadata.
In case of a preroll ad, call loadMetadata with metadata values for content followed by loadMetadata with ad (preroll) metadata.
== Syntax ==
<syntaxhighlight lang="objective-c">
– (void)loadMetadata:(id)metadata;
</syntaxhighlight>
== Input Parameters ==
{| class="wikitable"
|-
! Parameter !! Description !! JSON Object
|-
| rowspan=10 | jsonMetaData
| '''DTVR'''
| <syntaxhighlight lang="objective-c">
NSDictionary *metadata = @
{
  @"adModel": @"1"
};
</syntaxhighlight>
|-
|'''DAR'''
type should always be “ad” for DAR
|
<syntaxhighlight lang="objective-c">
NSDictionary *metadata = @
{
  @"type": @"ad",
  @"ocrtag": @"http://secure- uat-cert.imrworldwide.com/cgi-bin/m?ci= ENTXX5&am=3&ep=1&at=view&rt=banner&st=image&ca=cmp97144&cr=1186239&pc=3739659&r=2011370876"
};
</syntaxhighlight>
|-
|'''Digital Audio'''
type should always be “radio”. See [[Digital Audio Metadata]].
| <syntaxhighlight lang="objective-c">
NSDictionary *metadata = @
{
  @"dataSrc": @"cms",
  @"type": @"radio",
  @"assetid": @"WXYZ-FM",
  @"stationType": @"3",
  @"provider": @"MyRadioProvider"
};
</syntaxhighlight>
|-
|'''DCR'''
type should be “content”, “static”, “preroll”, “midroll” or “postroll”.
|
<syntaxhighlight lang="objective-c">
// Audio & Video Measurement:
NSDictionary *metadata = @
{
  @"type": @"content",
  @"assetid": @"vid345-67483",
  @"program": @"ProgramName",
  @"title": @"Program S3, EP1",
  @"length": @"3600",
  @"segB": @"CustomSegmentValueB",
  @"segC": @"CustomSegmentValueC",
  @"crossId1": @"Reference11",
  @"crossId2": @"Reference22",
  @"vcid": @"cXX",
  @"isfullepisode": @"y",
  @"airdate": @"20161013 20:00:00",
  @"adloadtype": @"2",
  @"hasAds": @"1"
};
</syntaxhighlight>
<syntaxhighlight lang="objective-c">
// Static Measurement:
NSDictionary *metadata = @
{
  @"type": @"static",
  @"section": @"siteSection",
  @"segA": @"segmentA",
  @"segB": @"segmentB",
  @"segC": @"segmentC",
  @"crossId1": @"Reference11"
};
</syntaxhighlight>
<syntaxhighlight lang="objective-c">
// Ad Measurement:
NSDictionary *metadata = @
{
  @"type": @"preroll",
  @"assetid": @"AD361-84413",
  @"title": @"MyAdName"
};
</syntaxhighlight>
|-
|'''DCR Germany'''
type should be “content”, “static”, “preroll”, “midroll” or “postroll”.
| <syntaxhighlight lang="objective-c">
NSURL *url = [NSURL URLWithString:@"http://nielsense-assets.s3.amazonaws.com/id3/001/prog_index.m3u8"];
NSDictionary *assetInfoDict = @
{
//SDK Metadata
  @"type": @"content",
  @"assetid": @"vid345-67483",
  @"program": @"ProgramName",
  @"title": @"Program S3, EP1",
  @"length": @"3600",
  @"segB": @"CustomSegmentValueB",
  @"segC": @"CustomSegmentValueC",
  @"crossId1": @"Reference11",
  @"crossId2": @"Reference22",
  @"vcid": @"cXX",
  @"isfullepisode": @"y",
  @"airdate": @"20161013 20:00:00"
  //Custom Properties
  @"nol_c{number}": @"p{Number},value"
};
[nielsenMeter loadMetadata:assetInfoDict];
//Ad Measurement:
//SDK Metadata
NSDictionary *assetInfoDict = @
{
  @"type": @"preroll",
  @"assetid": @"AD361-84413",
  @"title": @"MyAdName"
  //Custom Properties
  @"nol_c{number}": @"p{Number},value"
};
[nielsenMeter loadMetadata:assetInfoDict];
</syntaxhighlight>
|}
== Output Parameters ==
{| class="wikitable"
|-
! Output Parameters (Return value) !! Description
|-
| Void ||
|}

Revision as of 02:24, 21 May 2017

The application uses this API to send metadata to the SDK. App constructs a JSON dictionary and calls loadMetadata. The API that accepts the JSON string has been deprecated.

In case of a preroll ad, call loadMetadata with metadata values for content followed by loadMetadata with ad (preroll) metadata.

Syntax

 
 (void)loadMetadata:(id)metadata;

Input Parameters

Parameter Description JSON Object
jsonMetaData DTVR
 
NSDictionary *metadata = @
{
  @"adModel": @"1"
};
DAR

type should always be “ad” for DAR

 
NSDictionary *metadata = @
{
  @"type": @"ad",
  @"ocrtag": @"http://secure- uat-cert.imrworldwide.com/cgi-bin/m?ci= ENTXX5&am=3&ep=1&at=view&rt=banner&st=image&ca=cmp97144&cr=1186239&pc=3739659&r=2011370876"
};
Digital Audio

type should always be “radio”. See Digital Audio Metadata.

 
NSDictionary *metadata = @
{
  @"dataSrc": @"cms",
  @"type": @"radio",
  @"assetid": @"WXYZ-FM",
  @"stationType": @"3",
  @"provider": @"MyRadioProvider"
};
DCR

type should be “content”, “static”, “preroll”, “midroll” or “postroll”.

 
// Audio & Video Measurement:
NSDictionary *metadata = @
{
  @"type": @"content",
  @"assetid": @"vid345-67483",
  @"program": @"ProgramName",
  @"title": @"Program S3, EP1",
  @"length": @"3600",
  @"segB": @"CustomSegmentValueB",
  @"segC": @"CustomSegmentValueC",
  @"crossId1": @"Reference11",
  @"crossId2": @"Reference22",
  @"vcid": @"cXX",
  @"isfullepisode": @"y",
  @"airdate": @"20161013 20:00:00",
  @"adloadtype": @"2",
  @"hasAds": @"1"
};
 
// Static Measurement:
NSDictionary *metadata = @
{
  @"type": @"static",
  @"section": @"siteSection",
  @"segA": @"segmentA",
  @"segB": @"segmentB",
  @"segC": @"segmentC",
  @"crossId1": @"Reference11"
};
 
// Ad Measurement:
NSDictionary *metadata = @
{
  @"type": @"preroll",
  @"assetid": @"AD361-84413",
  @"title": @"MyAdName"
};
DCR Germany

type should be “content”, “static”, “preroll”, “midroll” or “postroll”.

 
NSURL *url = [NSURL URLWithString:@"http://nielsense-assets.s3.amazonaws.com/id3/001/prog_index.m3u8"];
NSDictionary *assetInfoDict = @
{
//SDK Metadata
  @"type": @"content",
  @"assetid": @"vid345-67483",
  @"program": @"ProgramName",
  @"title": @"Program S3, EP1",
  @"length": @"3600",
  @"segB": @"CustomSegmentValueB",
  @"segC": @"CustomSegmentValueC",
  @"crossId1": @"Reference11",
  @"crossId2": @"Reference22",
  @"vcid": @"cXX",
  @"isfullepisode": @"y",
  @"airdate": @"20161013 20:00:00"
 
  //Custom Properties
  @"nol_c{number}": @"p{Number},value"
};
[nielsenMeter loadMetadata:assetInfoDict];
 
 
//Ad Measurement:
//SDK Metadata
NSDictionary *assetInfoDict = @
{
  @"type": @"preroll",
  @"assetid": @"AD361-84413",
  @"title": @"MyAdName"
 
  //Custom Properties
  @"nol_c{number}": @"p{Number},value"
};
[nielsenMeter loadMetadata:assetInfoDict];

Output Parameters

Output Parameters (Return value) Description
Void