ExoMediaPlayback

open class ExoMediaPlayback

This class extends the VideoDisplayComponent to add support for the ExoPlayer.

See: https://github.com/google/ExoPlayer

See also

com.brightcove.player.display.VideoDisplayComponent

Constructors

Link copied to clipboard
constructor(context: Context, eventEmitter: EventEmitter)

Types

Link copied to clipboard
interface Listener
Interface definition to listen for player states.

Properties

Link copied to clipboard
val ACTION_PAUSE: Int = 1
Link copied to clipboard
val ACTION_PLAY: Int = 0
Link copied to clipboard
open val analytics: Analytics
Link copied to clipboard
open var currentIndex: Int
Link copied to clipboard
open val currentSource: Source
Link copied to clipboard
open val currentVideo: Video
Link copied to clipboard
open var defaultRenderersFactory: DefaultRenderersFactory
Link copied to clipboard
open val isPlaying: Boolean
Link copied to clipboard
Link copied to clipboard
open val mediaSession: MediaSession
Link copied to clipboard
open var mediaStore: MediaStore
Link copied to clipboard
Link copied to clipboard
open var minBufferMs: Int
Link copied to clipboard
open var minRebufferMs: Int
Link copied to clipboard
open val notification: PlaybackNotification
Link copied to clipboard
open var peakBitrate: Int
Link copied to clipboard
val playlist: List<Video>
Link copied to clipboard
Link copied to clipboard
open val sourceController: DefaultSourceSelectionController
Link copied to clipboard
open var trackSelector: DefaultTrackSelector
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun add(video: Video)
open fun add(index: Int, video: Video)
Link copied to clipboard
open fun addAll(newVideos: Collection<Video>)
open fun addAll(index: Int, newVideos: Collection<Video>)
Link copied to clipboard
Link copied to clipboard
open fun bumperPlayed(bumperPlayed: Boolean)
Link copied to clipboard
open fun clear()
Link copied to clipboard
open fun destroyPlayer()
Link copied to clipboard
Link copied to clipboard
open fun emitErrorEvent(message: String)
open fun emitErrorEvent(message: String, exception: Exception)
Link copied to clipboard
open fun getAudioFormat(): Format
Link copied to clipboard
open fun getBandwidthMeter(): BandwidthMeter
Returns the current bandwidth meter.
Link copied to clipboard
Link copied to clipboard
open fun getCurrentlyPlayingStreamType(): StreamType
Link copied to clipboard
Link copied to clipboard
open fun getDataSourceFactory(): Factory
Returns the current HttpDataSource.
Link copied to clipboard
open fun getDuration(): Long
Returns the duration.
Link copied to clipboard
Gets the ExoPlayer Drm session if available or null otherwise.
Link copied to clipboard
open fun getLiveEdge(): Long
Compute the "live edge" as a long datatype, the largest position not within three target durations of the duration (per the HLS spec).
Link copied to clipboard
open fun getMainHandler(): Handler
Link copied to clipboard
open fun getPlaybackLooper(): Looper
Link copied to clipboard
open fun getPlaybackNotification(): PlaybackNotification
Static method to access the notification
Link copied to clipboard
open fun getPlayer(): ExoPlayer
Link copied to clipboard
open fun getPlayerState(): Int
Returns the ExoPlayer state if available, or -1 if the player is null.
Link copied to clipboard
open fun getVideoAt(index: Int): Video
Link copied to clipboard
open fun getVideoFormat(): Format
Link copied to clipboard
open fun getVolume(): Float
Link copied to clipboard
open fun hasDvr(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun isInLiveEdge(): Boolean
Link copied to clipboard
open fun isLive(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun isSourceSet(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun onHandlePlayPauseAction(state: Int)
Handle internal state and events for play/pause.
Link copied to clipboard
open fun onTaskRemoved(rootIntent: Intent)
Link copied to clipboard
Link copied to clipboard
open fun openVideo(video: Video, source: Source)
Link copied to clipboard
open fun pause()
Convenience method for easily pausing the exoplayer.
Link copied to clipboard
open fun play(position: Long)
Convenience method for easily starting the exoplayer.
Link copied to clipboard
open fun remove(index: Int)
Link copied to clipboard
Link copied to clipboard
open fun replace(index: Int, video: Video)
Link copied to clipboard
open fun setBandwidthMeter(bandwidthMeter: BandwidthMeter)
Sets the current bandwidth meter.
Link copied to clipboard
open fun setDataSourceFactory(httpDataSourceFactory: Factory)
Sets the HttpDataSource.
Link copied to clipboard
Link copied to clipboard
open fun setEventEmitter(eventEmitter: EventEmitter): ExoMediaPlayback
This is used to reset the EventEmitter when restoring the playback from the service.
Link copied to clipboard
open fun setNotificationConfig(config: PlaybackNotificationConfig)
Configure the on-going notification.
Link copied to clipboard
open fun setPlaybackNotification(playbackNotification: PlaybackNotification)
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
Provides a creator for a TrackSelectionOverride instance specific for the Video track.
Link copied to clipboard
open fun setVideoPath(path: String): Video
open fun setVideoPath(videoPath: String, languageCodeCaptionsMap: Map<String, String>): Video
Link copied to clipboard
Provides a creator for a DefaultTrackSelector.
Link copied to clipboard
open fun setVideoSource(video: Video, source: Source)
Sets the video source that will be used for playback.
Link copied to clipboard
open fun useBumper(useBumper: Boolean)