The ad observer interface which receive notifications from the playback session tracker.

interface AdObserver {
    onAdBeaconResponse?(adData, beaconInfo, beaconUrl, status): void;
    onAdClick?(adData): void;
    onAdEnd?(adData): void;
    onAdLoad?(adData): void;
    onAdProgress?(adData, adElapsedTime, playhead): void;
    onAdStart?(adData, adElapsedTime, playhead): void;
    onAdTrackingEvent?(adData, adTrackingEvent): void;
    onNewAd?(adData): void;
    onNewNonLinearAds?(adData): void;
    onNonLinearAdsEnd?(adData): void;
    onNonLinearAdsStart?(adData, adElapsedTime, playhead): void;
    onTrackingInfoResponse?(failed): void;
}

Methods

  • For the tracker to notify about the response status of an ad-beacon request.

    Parameters

    • adData: AdData

      The corresponding ad data object.

    • beaconInfo: any

      The ad-beacon related information.

    • beaconUrl: string

      The ad-beacon request URL.

    • status: number

      The HTTP status of the response of an ad-beacon request.

    Returns void

  • For the tracker to notify about the current ad being clicked.

    Parameters

    • adData: AdData

      The corresponding ad data object.

    Returns void

  • For the tracker to notify about the end of playback of an ad.

    Parameters

    • adData: AdData

      The corresponding ad data object.

    Returns void

  • For the tracker to notify about an ad being loaded (playback will start soon).

    Parameters

    • adData: AdData

      The corresponding ad data object.

    Returns void

  • For the tracker to notify about the progress of playback of an ad.

    Parameters

    • adData: AdData

      The corresponding ad data object.

    • adElapsedTime: number

      The time difference (in seconds) between the current playhead position and the first frame of the ad.

    • playhead: number

      The current playhead position as the elapsed time on the media timeline, in seconds.

    Returns void

  • For the tracker to notify about the start of playback of an ad.

    Parameters

    • adData: AdData

      The corresponding ad data object.

    • adElapsedTime: number

      The time difference (in seconds) between the current playhead position and the first frame of the ad.

    • playhead: number

      The current playhead position as the elapsed time on the media timeline, in seconds.

    Returns void

  • For the tracker to notify about an ad tracking event.

    Parameters

    • adData: AdData

      The corresponding ad data object.

    • adTrackingEvent: AdTrackingEvent

      The ad tracking event that just occurred.

    Returns void

  • For the tracker to notify about a new ad data coming into existence.

    Parameters

    • adData: AdData

      The newly created ad data object.

    Returns void

  • For the tracker to notify about a new nonlinear ad data coming into existence.

    Parameters

    Returns void

  • For the tracker to notify about the end of a nonlinear ad.

    Parameters

    Returns void

  • For the tracker to notify about the start of a nonlinear ad.

    Parameters

    • adData: NonLinearAdsData

      The corresponding nonlinear ad data object.

    • adElapsedTime: number

      The time difference (in seconds) between the current playhead position and the start of the nonlinear ad.

    • playhead: number

      The current playhead position as the elapsed time on the media timeline, in seconds.

    Returns void

  • For the tracker to notify about the end of processing of an ad tracking info response.

    Parameters

    • failed: boolean

      Whether the response indicates a failed ad tracking info request.

    Returns void

Generated using TypeDoc