Package 

Class SSAIComponent

  • All Implemented Interfaces:
    com.brightcove.player.event.Component

    @ListensFor(events = {EventType.DID_SELECT_SOURCE, EventType.DID_SET_SOURCE, SSAIEventType.START_AD_BREAK})@Emits(events = {SSAIEventType.AD_DATA_READY, EventType.AD_ERROR, EventType.ERROR, EventType.REGISTER_PLUGIN}) 
    public class SSAIComponent
    extends AbstractComponent
                        

    Provide a class to support the Brightcove Server Side Ad Insertion (SSAI) functionality.

    • Constructor Summary

      Constructors 
      Constructor Description
      SSAIComponent(Context context, BaseVideoView baseVideoView) SSAIComponent
      SSAIComponent(Context context, BaseVideoView baseVideoView, int connectTimeout, int readTimeout) SSAIComponent
    • Method Summary

      Modifier and Type Method Description
      void processVideo(@NonNull() Video video) Process a video that has a VMAP url in at least one if its sources.
      void processVideo(@NonNull() String adData) Process a video given an ad metadata URL and a content URL.
      void processVideo(@NonNull() String vmapXMLString, @Nullable() String remoteLicenseUrl) Process a video given an ad metadata VMAP XML.
      void updateAdTargetingValues(@NonNull() Map<String, String> adTargetingValues) Updates the key/value pairs used for audience segment targeting.These values will be appended to the VMAP Url.
      void addCompanionContainer(ViewGroup companionContainer) Add an additional companion ad container.
      void clearCompanionContainers() Clear all companion ad containers currently being used in the plugin.
      void removeListeners()
      void setNonce(String nonce) Set the nonce for the Programmatic Access Library to the VMAP request.
      • Methods inherited from class com.brightcove.player.event.AbstractComponent

        addListener, addOnceListener, getEventEmitter, removeListener, removeListeners
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SSAIComponent

        SSAIComponent(Context context, BaseVideoView baseVideoView)
        SSAIComponent
        Parameters:
        context - The current applicaton context
        baseVideoView - The BaseVideoView
      • SSAIComponent

        SSAIComponent(Context context, BaseVideoView baseVideoView, int connectTimeout, int readTimeout)
        SSAIComponent
        Parameters:
        context - The current application context
        baseVideoView - The BaseVideoView
        connectTimeout - The connect timeout override in milliseconds.
        readTimeout - The read read timeout in milliseconds.
    • Method Detail

      • processVideo

         void processVideo(@NonNull() Video video)

        Process a video that has a VMAP url in at least one if its sources.

        Parameters:
        video - the video to play.
      • processVideo

         void processVideo(@NonNull() String adData)

        Process a video given an ad metadata URL and a content URL. Default to using the VMAPtechnology and XML data bindings.

        Parameters:
        adData - The given VMAP data, either as am ad server URL or as an XML String.
      • processVideo

         void processVideo(@NonNull() String vmapXMLString, @Nullable() String remoteLicenseUrl)

        Process a video given an ad metadata VMAP XML.

        Parameters:
        vmapXMLString - The given VMAP XML as a String.
        remoteLicenseUrl - The given remoteLicenseUrl for the content.
      • updateAdTargetingValues

         void updateAdTargetingValues(@NonNull() Map<String, String> adTargetingValues)

        Updates the key/value pairs used for audience segment targeting.These values will be appended to the VMAP Url.For example, if you provide the following map:

        {@code * MapaudienceSegmentTargetingValues = new HashMap<>();
             * audienceSegmentTargetingValues.put("section", "sports");
             * audienceSegmentTargetingValues.put("multi", "baseball,tennis");
             * }
         
        The following string will be appended to the provided VMAP Url:

        "&section=sports&multi=baseball%2Ctennis"

      • addCompanionContainer

         void addCompanionContainer(ViewGroup companionContainer)

        Add an additional companion ad container.

        Parameters:
        companionContainer - The new companion ad container.
      • clearCompanionContainers

         void clearCompanionContainers()

        Clear all companion ad containers currently being used in the plugin.

      • setNonce

         void setNonce(String nonce)

        Set the nonce for the Programmatic Access Library to the VMAP request.

        Parameters:
        nonce - The nonce generated with the Programmatic Access Library SDK.