VideoDisplayComponent

The VideoDisplayComponent wraps the Brightcove EventEmitter around the lifecycle of the standard Android MediaPlayer API. The intended goal is that the end developer should never have to interact directly with the MediaPlayer instance, but rather only have to fire events at it via the EventEmitter.LifeCycle To begin playing, the VideoDisplayComponent (VDC) must first receive a EventType.SET_SOURCE event, containing a valid Source parameter. Once the source is set, the VDC will emit EventType.DID_SET_SOURCE. Once set, the the VDC will respond to the following events:

  • EventType.PLAY: plays the video / resumes playback if paused
  • EventType.PAUSE: pauses the video
  • EventType.SEEK_TO: seeks to the position
  • EventType.STOP: stops the video and destroys the player
In addition, the VDC will emit Progress , buffering, and video_completed events.

See also

Constructors

Link copied to clipboard
constructor(renderView: RenderView, eventEmitter: EventEmitter)

Functions

Link copied to clipboard
open fun addListener(eventType: String, listener: EventListener)
Convenience method to add an EventListener for the given type using the EventEmitter.on() method.
Link copied to clipboard
open fun addOnceListener(eventType: String, listener: EventListener)
Convenience method to add an EventListener for the given type using the EventEmitter.once() method.
Link copied to clipboard
Create the MediaPlayback for the VideoDisplayComponent.
Link copied to clipboard
open fun destroyPlayer()
Destroys the current player and releases it from memory.
Link copied to clipboard
Link copied to clipboard
Gets reference to the video source that is currently configured for playback, if any
Link copied to clipboard
Gets reference to the video source that is currently configured for playback, if any
Link copied to clipboard
Gets reference to the video that is currently configured for playback, if any
Link copied to clipboard
Gets reference to the video that is currently configured for playback, if any
Link copied to clipboard
Provides a reference to the EventEmitter with which this component was initialized
Link copied to clipboard
open fun getLiveEdge(): Int
Obtains the playhead position of the "live edge".
Link copied to clipboard
open fun getLiveEdgeLong(): Long
Obtains the playhead position of the "live edge".
Link copied to clipboard
open fun getMediaPlayer(): MediaPlayer
Link copied to clipboard
Get the current playback.
Link copied to clipboard
Returns the current playhead position of the underlying video player.
Link copied to clipboard
Link copied to clipboard
open fun hasDvr(): Boolean
Indicates if Live with DVR is supported.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isInLiveEdge(): Boolean
Checks the current playhead position with the live edge position and determines if it is in live edge.
Link copied to clipboard
open fun isLive(): Boolean
Provides a default for handling live videos.
Link copied to clipboard
open fun onSurfaceTextureAvailable(surfaceTexture: SurfaceTexture, width: Int, height: Int)
Link copied to clipboard
open fun onSurfaceTextureDestroyed(surfaceTexture: SurfaceTexture)
Link copied to clipboard
open fun onSurfaceTextureSizeChanged(surfaceTexture: SurfaceTexture, width: Int, height: Int)
Link copied to clipboard
open fun onSurfaceTextureUpdated(surfaceTexture: SurfaceTexture)
Link copied to clipboard
open fun removeListener(eventType: String)
Removes the specified listener from the EventEmitter.
Link copied to clipboard
open fun removeListeners()
Removes all set listeners from the EventEmitter.
Link copied to clipboard
open fun setProgressInterval(progressInterval: Int)
Sets the the interval in milliseconds at which to fire PROGRESS events during playback.
Link copied to clipboard
open fun setRendererConfig(rendererConfig: RendererConfig)
Link copied to clipboard
Sets the Text Information Frame Listener.
Link copied to clipboard
open fun surfaceChanged(surfaceHolder: SurfaceHolder, format: Int, width: Int, height: Int)
Link copied to clipboard
open fun surfaceCreated(surfaceHolder: SurfaceHolder)
Link copied to clipboard
open fun surfaceDestroyed(surfaceHolder: SurfaceHolder)