Skip to main content
Integration for HTML5 Sites/Apps Updated Jun 13

Step 4: Setting up Local Callback

The Applixir Video platform provides a local callback that sends events with status of the various actions and errors that occur while a video is being played.  

We are using adStatusCallbackFn to capture ad status. The callback function will receive a status object with the following properties:

{type: "allAdsCompleted" | "click" | "complete" | "firstQuartile" | "loaded" | "midpoint" | "paused" | "started" | "thirdQuartile" | "skipped" | "manuallyEnded" | "thankYouModalClosed" | "consentDeclined",}

Following are the different status messages which are received in the call back event. Note that these events are lower-case strings.

  • allAdsCompleted: Fires when the ads manager is done playing all the valid ads in the ads response, or when the response doesn't return any valid ads
  • click: Fires when the ad is clicked
  • complete: Fires when the ad completes playing
  • firstQuartile: Fires when the ad playhead crosses first quartile
  • loaded: Fires when ad data is available
  • midpoint: Fires when the ad playhead crosses midpoint
  • paused: Fires when the ad is paused
  • started: Fires when the ad starts playing
  • thirdQuartile: Fires when the ad playhead crosses third quartile
  • skipped: Fires when the ad is skipped by the user
  • manuallyEnded: Fires when the ad is manually ended by the user
  • thankYouModalClosed: Fires when the thank you modal is closed by the user
  • consentDeclined: Fires when the user declines consent for personalized ads

Applixir errors:

{
getError: () => {
return {
data: {
type:
"adsRequestNetworkError" |
"assetFallbackFailed" |
"autoplayDisallowed" |
"companionAdLoadingFailed" |
"companionRequiredError" |
"consentManagementProviderNotReady" |
"failedToRequestAds" |
"invalidAdTag" |
"invalidArguments" |
"nonlinearDimensionsError" |
"overlayAdLoadingFailed" |
"overlayAdPlayingFailed" |
"protectedAudienceApiError" |
"streamInitializationFailed" |
"unknownAdResponse" |
"unknownError" |
"unsupportedUrl" |
"vastAssetNotFound" |
"vastEmptyResponse" |
"vastLinearAssetMismatch" |
"vastLoadTimeout" |
"vastMalformedResponse" |
"vastMediaLoadTimeout" |
"vastNoAdsAfterWrapper" |
"vastNonlinearAssetMismatch" |
"vastProblemDisplayingMediaFile" |
"vastSchemaValidationError" |
"vastTooManyRedirects" |
"vastTraffickingError" |
"vastUnexpectedDurationError" |
"vastUnexpectedLinearity" |
"vastUnsupportedVersion" |
"vastWrapperError" |
"videoPlayError" |
"vpaidError",
errorCode: number, // Error code - as described bellow
errorMessage: string,
innerError: string,
},
};
};
}
  • adsRequestNetworkError: There was a problem requesting ads from the server. IMA Error code 1012
  • assetFallbackFailed: There was an error with asset fallback. IMA Error code 1021
  • autoplayDisallowed: The browser prevented playback initiated without user interaction. IMA Error code 1205
  • companionAdLoadingFailed: Deprecated. A companion ad failed to load or render. VAST error code 603
  • companionRequiredError: Unable to display one or more required companions. The main ad is discarded since the required companions could not be displayed. VAST error code 602
  • consentManagementProviderNotReady: Deprecated. A Consent Management Provider was detected on the page, and it has indicated that consent is not yet known. IMA Error code 1300
  • failedToRequestAds: There was a problem requesting ads from the server. IMA Error code 1005
  • invalidAdTag: The ad tag url specified was invalid. It needs to be properly encoded. IMA Error code 1013
  • invalidArguments: Invalid arguments were provided to SDK methods. IMA Error code 1101
  • nonlinearDimensionsError: Unable to display NonLinear ad because creative dimensions do not align with creative display area (for example, creative dimension too large). VAST error code 501
  • overlayAdLoadingFailed: Deprecated. An overlay ad failed to load. VAST error code 502
  • overlayAdPlayingFailed: An overlay ad failed to render. VAST error code 500
  • protectedAudienceApiError: A protected audience api error occurred. Refer to the inner error for more information. VAST error code 1014
  • streamInitializationFailed: There was an error with stream initialization during server side ad insertion. IMA Error code 1020
  • unknownAdResponse: The ad response was not understood and cannot be parsed. IMA Error code 1010
  • unknownError: An unexpected error occurred and the cause is not known. Refer to the inner error for more information. VAST error code 900
  • unsupportedUrl: The URL is invalid or is not supported by the current browser. IMA Error code 1022
  • vastAssetNotFound: No assets were found in the VAST ad response. IMA Error code 1007
  • vastEmptyResponse: A VAST response containing a single tag with no child tags. IMA Error code 1009
  • vastLinearAssetMismatch: Assets were found in the VAST ad response for linear ad, but none of them matched the video player's capabilities. VAST error code 403
  • vastLoadTimeout: The VAST URI provided, or a VAST URI provided in a subsequent wrapper element, was either unavailable or reached a timeout, as defined by the video player. The timeout is 5 seconds for initial VAST requests and each subsequent wrapper. VAST error code 301
  • vastMalformedResponse: The ad response was not recognized as a valid VAST ad. VAST error code 100
  • vastMediaLoadTimeout: Failed to load media assets from a VAST response. The default timeout for media loading is 8 seconds. VAST error code 402
  • vastNoAdsAfterWrapper: No Ads VAST response after one or more wrappers. VAST error code 303
  • vastNonlinearAssetMismatch: Assets were found in the VAST ad response for nonlinear ad, but none of them matched the video player's capabilities. VAST error code 503
  • vastProblemDisplayingMediaFile: Problem displaying MediaFile. Currently used if video playback is stopped due to poor playback quality. VAST error code 405
  • vastSchemaValidationError: VAST schema validation error. VAST error code 101
  • vastTooManyRedirects: The maximum number of VAST wrapper redirects has been reached. VAST error code 302
  • vastTraffickingError: Trafficking error. Video player received an ad type that it was not expecting and/or cannot display. VAST error code 200
  • vastUnexpectedDurationError: VAST duration is different from the actual media file duration. VAST error code 202
  • vastUnexpectedLinearity: Ad linearity is different from what the video player is expecting. VAST error code 201
  • vastUnsupportedVersion: The ad response contained an unsupported VAST version. VAST error code 102
  • vastWrapperError: General VAST wrapper error. VAST error code 300
  • videoPlayError: There was an error playing the video ad. VAST error code 400
  • vpaidError: A VPAID error occurred. Refer to the inner error for more information. VAST error code 901
Was this article helpful?
Your feedback shapes what we write next.
Live status
Ad server● 99.98%
Dashboard● 100%
Reporting● 99.95%
Avg CPM$11.40