-
- All Implemented Interfaces:
-
com.brightcove.player.event.Component
@Emits(events = {EventType.COMPLETED, EventType.CUE_POINT, EventType.DID_SELECT_SOURCE, EventType.DID_SET_VIDEO, EventType.PLAY, EventType.SELECT_SOURCE, EventType.SET_SOURCE, EventType.SET_VIDEO_STILL})@ListensFor(events = {EventType.COMPLETED, EventType.CUE_POINT, EventType.SEEK_TO, EventType.DID_SEEK_TO, EventType.DID_SET_SOURCE, EventType.PLAY, EventType.DID_PLAY, EventType.PROGRESS, EventType.READY_TO_PLAY, EventType.REMOVE_CUE_POINT, EventType.SET_CUE_POINT, EventType.SET_CUE_POINTS, EventType.SET_VIDEO, EventType.WILL_CHANGE_VIDEO}) public class VideoPlaybackController extends AbstractComponent implements Component
Manages video playback and provides proper translation between the Brightcove representation of videos and the underlying platform's representation. This includes performing activities such as selecting the appropriate rendition to play, given a Video object, and ensuring that a Video still image loads properly if specified in a Video object.
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
TAG
private boolean
shouldSelectSource
protected boolean
adsDisabled
protected int
liveWindowTimeMs
-
Constructor Summary
Constructors Constructor Description VideoPlaybackController(EventEmitter eventEmitter)
Being a Component, VideoPlaybackController requires an EventEmitter on initialization.
-
Method Summary
Modifier and Type Method Description VideoPlaybackController
setShouldSelectSource(boolean shouldSelectSource)
Set whether the controller selects the source or if this is handled by another component.This is set to true by default. void
setAdsDisabled(boolean disable)
int
getLiveWindowTimeMs()
Gets the time in milliseconds for the Live Stream Window.Currently used only for UI. void
setLiveWindowTimeMs(int liveWindowTimeMs)
Sets the time in milliseconds for the Live Stream Window.Currently used only for UI. boolean
isAdsDisabled()
void
initialize()
Resets the state of the controller to its initial values. boolean
hasPendingSourcesToLoad()
Indicates whether there are pending Sources to load. -
-
Constructor Detail
-
VideoPlaybackController
VideoPlaybackController(EventEmitter eventEmitter)
Being a Component, VideoPlaybackController requires an EventEmitter on initialization.- Parameters:
eventEmitter
- the EventEmitter through which this Component will listen for and emitevents to interact with other components in the player
-
-
Method Detail
-
setShouldSelectSource
VideoPlaybackController setShouldSelectSource(boolean shouldSelectSource)
Set whether the controller selects the source or if this is handled by another component.This is set to true by default.
- Parameters:
shouldSelectSource
- True to allow the controller to publish source and video events.
-
setAdsDisabled
void setAdsDisabled(boolean disable)
-
getLiveWindowTimeMs
@Deprecated() int getLiveWindowTimeMs()
Gets the time in milliseconds for the Live Stream Window.Currently used only for UI.
-
setLiveWindowTimeMs
@Deprecated() void setLiveWindowTimeMs(int liveWindowTimeMs)
Sets the time in milliseconds for the Live Stream Window.Currently used only for UI.
- Parameters:
liveWindowTimeMs
- the live window time in ms
-
isAdsDisabled
boolean isAdsDisabled()
-
initialize
void initialize()
Resets the state of the controller to its initial values. This is automatically called bythe constructor, but can be called again if new components are introduced to the givenEventEmitter. This will also clear out any pending SET_SOURCE events that might havehappened if one was to be emitted before READY_TO_PLAY was received.
-
hasPendingSourcesToLoad
boolean hasPendingSourcesToLoad()
Indicates whether there are pending Sources to load.
-
-
-
-