VerizonMediaAd

@available(*, deprecated, message: "This protocol will be removed with the next major release.")
public protocol VerizonMediaAd : EventDispatcherProtocol

The Verizon Media ad API.

  • Start time of the ad, in seconds.

    Remark

    • This is relative to the duration, e.g. a value of 20 would mean that the ad starts after 20 seconds of playback.
    • Should fall within the duration of the content.

    Declaration

    Swift

    var startTime: Double { get }
  • End time of the ad, in seconds.

    Remark

    • This is relative to the duration, e.g. a value of 30 would mean that the ad ends after 30 seconds of playback.
    • Should fall within the duration of the content.

    Declaration

    Swift

    var endTime: Double { get }
  • The duration of the ad, in seconds.

    Declaration

    Swift

    var duration: Double { get }
  • Indicates the API framework if applicable.

    Remark

    • If the value is “VPAID”, then the ad is a VPAID ad.
    • Otherwise the ad is an Uplynk CMS asset.

    Declaration

    Swift

    var apiFramework: String? { get }
  • The identifier of the creative.

    Remark

    • Either a VPAID URL if the API framework is “VPAID”.
    • Otherwise an asset ID from the Uplynk CMS.

    Declaration

    Swift

    var creative: String { get }
  • The creative’s mime type.

    Remark

    • Either “application/javascript” if the API framework is “VPAID”.
    • Otherwise “uplynk/m3u8”.

    Declaration

    Swift

    var mimeType: String { get }
  • The width of the ad, in pixels.

    Remark

    • Either the width in pixels if the ad is a companion.
    • Otherwise returns 0.

    Declaration

    Swift

    var width: Double { get }
  • The height of the ad, in pixels.

    Remark

    • Either the height in pixels if the ad is a companion.
    • Otherwise returns 0.

    Declaration

    Swift

    var height: Double { get }
  • A record of all VAST 3.0 tracking events for this ad.

    Remark

    Each entry contains all related tracking URLs.

    Declaration

    Swift

    var events: [String : [String]] { get }
  • List of the companion ads of this ad.

    Declaration

    Swift

    var companions: [VerizonMediaAd] { get }
  • All FreeWheel-defined creative parameters.

    Remark

    Each entry contains the parameter’s name together with the associated value.

    Declaration

    Swift

    var freeWheelParameters: [String : String] { get }
  • Adds the event listener of the given EventType.

    Remark

    When attaching a listener on the wrong object, the application will crash.

    Declaration

    Swift

    func addEventListener<E>(type: EventType<E>, listener: @escaping (E) -> ()) -> EventListener where E : EventProtocol

    Parameters

    type

    EventType of the added event listener. See VerizonMediaAdEventTypes for possible values.

    listener

    Closure called when event is dispatched.

    Return Value

    The newly added EventListener.

  • Removes the event listener of the given EventType.

    Declaration

    Swift

    func removeEventListener<E>(type: EventType<E>, listener: EventListener) where E : EventProtocol

    Parameters

    type

    EventType of the event listener to be removed. See VerizonMediaAdEventTypes for possible values.

    listener

    EventListener which was added by addEventListener(...)