Flash Ad Player Integration FAQ

This FAQ is designed to answer frequently asked questions regarding Flash Ad Player integrations.

  1. How do I adjust the overlay position?
    • Use the getTarget function and adjust it, for example adPlayer.getTarget(VpTargetNames.OVERLAY_TARGET).y = -20;
  2. How do I avoid ads on certain content?
    • Custom Player: Use the flags property on the ItemInfo class. For example:
      ...
      itemInfo.flags = ["nocom"];
      ...
      adPlayer.setNewItem(itemInfo);
      ...
    • Pre-Integrated Player: In the integration, at the same location that you provided your vpDomain, you need to add the flags variable with the appropriate flag.
  3. Why is post-roll shown incorrectly?
    • Make sure that you are telling the ad player that the item has ended before taking any other actions. This is done by calling
      adPlayer.setPlayerState(PlayerState.CLIP_COMPLETE);
      The adPlayer then displays any post-rolls, and when the ad session is completely ended, it dispatches
      VpEvent.AD_PLAYER_COMPLETE
      after which your player is free to move on to show a splash screen or move on to the next item.
  4. How do I trigger cue points myself, instead of letting the ad player handle them?
    • Note: This feature is still only available in the Flash SDK.

      The ad player plugin keeps track of the player's current position and triggers cue points (and in effect mid-roll breaks) automatically, so you do not have to bother about it. However, if you want more control over when mid-rolls are triggered, you can take ownership of this event yourself by taking the steps below:

      Setup of adPlayer

      …
      adPlayer.setAutoTriggerCuePoints(false);
      …

      On new item

      …
      itemInfo.cuePoints = [{name: "vpspot", time: 120}, {name: "vpspot", time: 240}]; // midroll breaks at seconds 120 and 240
      …
      adPlayer.setNewItem(itemInfo);
      …

      To trigger cue point

      adPlayer.eventTriggered(AdTriggerType.OnCuePoint, {name: "vpspot", time: 120}); // to trigger the first break
  5. Why do I get a "Type Coercion" error when initiating the ad player?
    • For example:
      exception, information=TypeError: Error #1034: Type Coercion failed: cannot convert as3_videoplaza_bootloader@2e80d31 to com.videoplaza.api.VideoplazaBootLoaderWrapper
      Make sure that you are creating the necessary Vp Wrappers and not casting objects to them. For example:
      var vpBootLoader:VideoplazaBootLoaderWrapper = new VideoplazaBootLoaderWrapper(videoplaza);
      and
      var adPlayer:VpAdPlayerWrapper = new VpAdPlayerWrapper(vpBootLoader.createAdPlayer(conf));
      instead of
      var vpBootLoaderWrapper:VideoplazaBootLoaderWrapper = VideoplazaBootLoaderWrapper(videoplaza);
      and
      var adPlayer:VpAdPlayerWrapper = VpAdPlayerWrapper(vpBootLoader.createAdPlayer(conf));
  6. Why are pre-rolls available, but there are no mid-rolls or overlays?
    • You are probably not passing enough data in setNewItem method. The ad session is initiated by calling
      adPlayer.setNewItem(itemInfo);
      The ItemInfo class has the following properies:
      itemInfo.tags: Array of String values.
      Use to pass keywords related to the item to Ooyala Pulse. Example: ["sport", "golf", "tiger woods"]
      itemInfo.flags: Array of String values.
      Use to flag content as short or long form content, and/or to switch off certain ad formats (eg ["long_form"] or ["short_form"]). Required for the ad ops to be able to set different insertion policies in the backoffice for different content forms.
      itemInfo.cuePoints: Array of Cue point objects.
      The cuePoints Array identifies the ad breaks of the item. They have to have name = "vpspot" and time = position of ad break in seconds. Example: [{name: "vpspot", time: 30}, {name: "vpspot", time: 120}]. If you have no ad breaks for this item, pass an empty Array.
      itemInfo.duration: Number (seconds).
      Duration of item in seconds.
      itemInfo.timeReference: ITimeReference.
      The timeReference is used by the adPlayer to fetch the item's current play head position. The timeReference object can be any of your choice, but has to implement the ITimeReference interface, which has the read-only property time.

      How do I see that the correct values come through?

      If you profile the http traffic (using for example FireBug), you should see an ad call similar to the one below being made:
      http://service.videoplaza.com/proxy/distributor?tags=summer,show_one&cues=30,60&ct=194&flags=short_form&rnd=4696140726096&tt=preroll,overlay,midroll,postroll&rev=8523&tid=&sid=e8847228-0a6c-4715-bc71-b1a709c2e2ee
      For this particular ad call, the following values were added to the itemInfo object:
      tags = ["summer", "show_one"]; // descriptive keywords
      cuePoints = [{name: "vpspot", time: 30},{name: "vpspot", time: 60}]; // two midroll breaks: at 30 and 60 seconds
      duration = 194; // the item has a duration of 194 seconds
      flags = ["short_form"]; // this item should be seen as short-form
    • The player state is probably not properly updated. Make sure that you update the ad player on the player state every time it changes. This is done by calling
      adPlayer.setPlayerState(PlayerState.<CURRENT_STATE>);
  7. How do I use category or content partner IDs created in Pulse?
    • Enable in Flowplayer
      plugins: { 
          videoplaza: { 
              url: 'http://se-showroom.cdn.videoplaza.tv/resources/flash/flowplayer-3.2.6/latest/vp_plugin.swf',
              vpDomain:'http://se-showroom.videoplaza.tv',
              vpCategory: '<ID or alias>',
              vpContentPartner: '<ID or alias>'    
          },
      }
    • Enable in JW 5.x
      flashvar vpCategory=<ID>&vpContentPartner=<ID>
    • Enable in Brightcove

      By object param value:

      <param name="vpCategory" value="<ID>"/>
      <param name="vpContentPartner" value="<ID>"/>

      By setting in Brightcove player's player-level key/value pairs configuration:

      ...;vpCategory=<ID>;vpContentPartner=<ID>...
    • Enable in OSMF Players
      flashvar vpCategory=<ID>&vpContentPartner=<ID>
    • Enable in Custom Players
      ...
      itemInfo.duration = ...
      itemInfo.tags = ...
      itemInfo.category = '<ID>';
      itemInfo.contentPartner = '<ID>';
      ...
      adPlayer.setNewItem(itemInfo);
      ...
https://help.ooyala.com/sites/all/libraries/dita/en/video-advertising/oadtech/ad_serving/dg/flash_adplayer_faq.html

Was this article helpful?