Package com.brightcove.ssai
Class SSAIComponent
java.lang.Object
com.brightcove.player.event.AbstractComponent
com.brightcove.ssai.SSAIComponent
- All Implemented Interfaces:
Component
@ListensFor(events={"didSelectSource","didSetSource","startAdBreak"})
@Emits(events={"adDataReady","adError","error"})
public class SSAIComponent
extends AbstractComponent
Provide a class to support the Brightcove Server Side Ad Insertion (SSAI) functionality.
-
Field Summary
Fields inherited from class com.brightcove.player.event.AbstractComponent
eventEmitter, listenerTokens
-
Constructor Summary
ConstructorDescriptionSSAIComponent
(android.content.Context context, BaseVideoView baseVideoView) SSAIComponentSSAIComponent
(android.content.Context context, BaseVideoView baseVideoView, int connectTimeout, int readTimeout) SSAIComponent -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCompanionContainer
(android.view.ViewGroup companionContainer) Add an additional companion ad container.void
Clear all companion ad containers currently being used in the plugin.void
processVideo
(Video video) Process a video that has a VMAP url in at least one if its sources.void
processVideo
(String adData) Process a video given an ad metadata URL and a content URL.void
processVideo
(String vmapXMLString, String remoteLicenseUrl) Process a video given an ad metadata VMAP XML.void
Removes all set listeners from the EventEmitter.void
updateAdTargetingValues
(Map<String, String> adTargetingValues) Updates the key/value pairs used for audience segment targeting.Methods inherited from class com.brightcove.player.event.AbstractComponent
addListener, addOnceListener, getEventEmitter, removeListener
-
Constructor Details
-
SSAIComponent
public SSAIComponent(@NonNull android.content.Context context, @NonNull BaseVideoView baseVideoView) SSAIComponent- Parameters:
context
- The current applicaton contextbaseVideoView
- The BaseVideoView
-
SSAIComponent
public SSAIComponent(@NonNull android.content.Context context, @NonNull BaseVideoView baseVideoView, int connectTimeout, int readTimeout) SSAIComponent- Parameters:
context
- The current application contextbaseVideoView
- The BaseVideoViewconnectTimeout
- The connect timeout override in milliseconds. The default value is 10000 milliseconds.readTimeout
- The read read timeout in milliseconds. The default value is 10000 milliseconds.
-
-
Method Details
-
processVideo
Process a video that has a VMAP url in at least one if its sources.- Parameters:
video
- the video to play.- See Also:
-
processVideo
Process a video given an ad metadata URL and a content URL. Default to using the VMAP technology and XML data bindings.- Parameters:
adData
- The given VMAP data, either as am ad server URL or as an XML String.
-
processVideo
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
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:Map<String, String> audienceSegmentTargetingValues = new HashMap<>(); audienceSegmentTargetingValues.put("section", "sports"); audienceSegmentTargetingValues.put("multi", "baseball,tennis");
"§ion=sports&multi=baseball%2Ctennis"
-
addCompanionContainer
public void addCompanionContainer(android.view.ViewGroup companionContainer) Add an additional companion ad container.- Parameters:
companionContainer
- The new companion ad container.
-
clearCompanionContainers
public void clearCompanionContainers()Clear all companion ad containers currently being used in the plugin. -
removeListeners
public void removeListeners()Description copied from class:AbstractComponent
Removes all set listeners from the EventEmitter.- Overrides:
removeListeners
in classAbstractComponent
-