@ListensFor(events={"didSetSource","didSelectSource"}) @Emits(events={"adDataReady","error"}) public class SSAIComponent extends AbstractComponent
eventEmitter, listenerTokens
Constructor and Description |
---|
SSAIComponent(android.content.Context context,
BaseVideoView baseVideoView) |
Modifier and Type | Method and Description |
---|---|
void |
addCompanionContainer(android.view.ViewGroup companionContainer)
Add an additional companion ad container.
|
void |
clearCompanionContainers()
Clear all companion ad containers currently being used in the plugin.
|
void |
processVideo(java.lang.String adDataUrl)
Process a video given an ad metadata URL and a content URL.
|
void |
processVideo(Video video)
Process a video that has a VMAP url in at least one if its sources.
|
void |
removeListeners()
Removes all set listeners from the EventEmitter.
|
void |
updateAdTargetingValues(java.util.Map<java.lang.String,java.lang.String> adTargetingValues)
Updates the key/value pairs used for audience segment targeting.
|
addListener, addOnceListener, getEventEmitter, removeListener
public SSAIComponent(@NonNull android.content.Context context, @NonNull BaseVideoView baseVideoView)
public void processVideo(@NonNull Video video)
video
- the video to play.Source
,
SourceCollection
public void processVideo(@NonNull java.lang.String adDataUrl)
adDataUrl
- The given VMAP ad server URL.public void updateAdTargetingValues(@NonNull java.util.Map<java.lang.String,java.lang.String> adTargetingValues)
Map<String, String> audienceSegmentTargetingValues = new HashMap<>();
audienceSegmentTargetingValues.put("section", "sports");
audienceSegmentTargetingValues.put("multi", "baseball,tennis");
The following string will be appended to the provided VMAP Url:
"§ion=sports&multi=baseball%2Ctennis"
public void addCompanionContainer(android.view.ViewGroup companionContainer)
companionContainer
- The new companion ad container.public void clearCompanionContainers()
public void removeListeners()
AbstractComponent
removeListeners
in class AbstractComponent