public class OnceUxComponent extends AbstractComponent
eventEmitter, listenerTokens
Constructor and Description |
---|
OnceUxComponent(android.content.Context context,
BaseVideoView videoView)
Create a default Once UX plugin using VMAP and XML.
|
OnceUxComponent(android.content.Context context,
BaseVideoView videoView,
com.brightcove.player.onceux.ProtocolType protocol,
com.brightcove.player.onceux.FormatType format)
Create a new Brightcove Media Once UX plugin for the supplied Android context and video
view.
|
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.
|
protected void |
registerEventHandlers()
Procedural abstraction used to setup event handlers for the OnceUX plugin.
|
void |
removeListeners()
Removes all set listeners from the EventEmitter.
|
addListener, addOnceListener, getEventEmitter, removeListener
public OnceUxComponent(android.content.Context context, BaseVideoView videoView)
context
- The given Android context set up by the Application.videoView
- The player object rendering the video provided via the SDK.public OnceUxComponent(android.content.Context context, BaseVideoView videoView, com.brightcove.player.onceux.ProtocolType protocol, com.brightcove.player.onceux.FormatType format)
context
- The given Android context set up by the Application.videoView
- The player object rendering the video provided via the SDK.protocol
- The Once protocol choice.format
- The Once data format choice.public void processVideo(Video video) throws NoSourceFoundException
video
- the video to play.NoSourceFoundException
- if no VMAP url was found in neither of the Video Sources.Source
public void processVideo(java.lang.String adDataUrl)
adDataUrl
- The given VMAP ad server URL.public void addCompanionContainer(android.view.ViewGroup companionContainer)
companionContainer
- The new companion ad container.public void clearCompanionContainers()
public void removeListeners()
AbstractComponent
removeListeners
in class AbstractComponent
protected void registerEventHandlers()