Control Ad Loading For a DVR Window

To control ad loading for a DVR window:

Set the PTAdMetadata.enableDVRAds property to YES to load all ads for the entire stream: NO is the default, which loads ads only from the current live point forward.

For example:

PTMetadata *metadata = [[[PTMetadata alloc] init] autorelease];

PTAuditudeMetadata *adMetadata = [[[PTAuditudeMetadata alloc] init] autorelease]; 
adMetadata.zoneId = <ZoneId>;
adMetadata.domain = <Domain>;

// Enable DVR Ads by setting to YES the enableDVRAds property on PTAdMetadata 
// (PTAuditudeMetadata is a subclass of PTAdMetadata) 
adMetadata.enableDVRAds = YES;

[metadata setMetadata:adMetadata forKey:PTAdResolvingMetadataKey];

//Create PTMediaPlayerItem with the previously prepared metadata   
playerItem = [[PTMediaPlayerItem alloc] initWithUrl:url mediaId:yourMediaID metadata:metadata];