SVSAdRuleData

@interface SVSAdRuleData : NSObject <NSCopying, NSCoding>

Represents the details of an ad rule related to a given ad break type.

  • Returns an initialized ad rule data object for a preroll ad break.

    Declaration

    Objective-C

    + (nullable instancetype)prerollDataWithInstances:(NSUInteger)instances;

    Parameters

    instances

    0 to disable the ad break, a positive number to override the default number of ads in the ad break.

    Return Value

    An initialized SVSAdRuleData instance.

  • Returns an initialized ad rule data object for a postroll ad break.

    Declaration

    Objective-C

    + (nullable instancetype)postrollDataWithInstances:(NSUInteger)instances;

    Parameters

    instances

    0 to disable the ad break, a positive number to override the default number of ads in the ad break.

    Return Value

    An initialized SVSAdRuleData instance.

  • Returns an initialized ad rule data object for a midroll ad break.

    Declaration

    Objective-C

    + (nullable instancetype)
    midrollDataWithInstances:(NSUInteger)instances
                    percents:(nonnull NSArray<NSNumber *> *)percents;

    Parameters

    instances

    0 to disable the ad break, a positive number to override the default number of ads in the ad break.

    percents

    Array of percentages where the ad break should happen (irrelevant for streamed content).

    Return Value

    An initialized SVSAdRuleData instance.

  • Returns an initialized ad rule data object for a midroll ad break.

    Declaration

    Objective-C

    + (nullable instancetype)
    midrollDataWithInstances:(NSUInteger)instances
                   timecodes:(nonnull NSArray<NSString *> *)timecodes;

    Parameters

    instances

    0 to disable the ad break, a positive number to override the default number of ads in the ad break.

    timecodes

    Array of timecodes where the ad break should happen (irrelevant for streamed content).

    Return Value

    An initialized SVSAdRuleData instance.

  • Returns an initialized ad rule data object for a midroll ad break.

    Note

    An offset of 0 will be set when using this initializer.

    Declaration

    Objective-C

    + (nullable instancetype)midrollDataWithInstances:(NSUInteger)instances
                                             interval:(NSTimeInterval)interval;

    Parameters

    instances

    0 to disable the ad break, a positive number to override the default number of ads in the ad break.

    interval

    Interval (in seconds) between two ad break.

    Return Value

    An initialized SVSAdRuleData instance.

  • Returns an initialized ad rule data object for a midroll ad break.

    Declaration

    Objective-C

    + (nullable instancetype)midrollDataWithInstances:(NSUInteger)instances
                                             interval:(NSTimeInterval)interval
                                               offset:(NSTimeInterval)offset;

    Parameters

    instances

    0 to disable the ad break, a positive number to override the default number of ads in the ad break.

    interval

    Interval (in seconds) between two ad break.

    offset

    Offset (in seconds) before the first ad break when an interval is defined.

    Return Value

    An initialized SVSAdRuleData instance.