Class ExoMediaPlayback
- All Implemented Interfaces:
Component
,MediaPlayback<com.google.android.exoplayer2.ExoPlayer>
See: https://github.com/google/ExoPlayer
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Interface definition to listen for player states.protected static @interface
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final int
protected static final int
protected final com.google.android.exoplayer2.source.MediaSourceEventListener
protected final android.content.Context
protected final com.google.android.exoplayer2.drm.DrmSessionEventListener
protected long
protected final android.os.Handler
protected final PlayerBandwidthMeter
protected long
protected int
static ResourceBundle
protected long
Fields inherited from class com.brightcove.player.event.AbstractComponent
eventEmitter, listenerTokens
-
Constructor Summary
ConstructorDescriptionExoMediaPlayback
(android.content.Context context, EventEmitter eventEmitter) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the video to the video list at the specified index.void
Adds the video to the end of the video list.void
addAll
(int index, Collection<Video> newVideos) Inserts all videos in the collection at the specified index.void
addAll
(Collection<Video> newVideos) Add all videos in the collection to the end of the list.void
addListener
(ExoMediaPlayback.Listener listener) protected com.google.android.exoplayer2.upstream.DataSource.Factory
buildDataSourceFactory
(com.google.android.exoplayer2.upstream.HttpDataSource.Factory httpDatasourceFactory, boolean useBandwidthMeter) Returns a new DataSource factory.void
clear()
Removes all videos from the list.void
Destroys the current player and releases it from memory.void
emitErrorEvent
(String message) Emits an error event with the message passed in the event's propertiesvoid
emitErrorEvent
(String message, Exception exception) Emits an error event including the message passed and the exception in the propertiesboolean
Returns the analytics component, the part of the player that monitors and tracks video playback and engagement.com.google.android.exoplayer2.Format
com.google.android.exoplayer2.upstream.BandwidthMeter
Returns the current bandwidth meter.int
Returns the buffer percentageint
Gets the index from the current videolong
Returns the current playhead position of the underlying video player.Get the current source for theVideo
.Get the currently playing video.com.google.android.exoplayer2.upstream.HttpDataSource.Factory
Returns the currentHttpDataSource.Factory
, which is used when creating theMediaSource
.com.google.android.exoplayer2.DefaultRenderersFactory
Gets the DefaultRenderersFactory object.long
Returns the duration.Gets the ExoPlayer Drm session if available or null otherwise.long
Compute the "live edge" as a long datatype, the largest position not within three target durations of the duration (per the HLS spec).Gets the LoadControlConfig object.android.os.Handler
long
Deprecated.It is not longer used for ExoPlayer v2.long
Deprecated.It is not longer used for ExoPlayer v2.int
Deprecated.It is not longer used for ExoPlayer v2.int
Deprecated.It is not longer used for ExoPlayer v2.Get the object which handles showing an on-going player notification.int
Return the peak bitrate.android.os.Looper
com.google.android.exoplayer2.ExoPlayer
Get the player used for media playback.int
Returns the ExoPlayer state if available, or -1 if the player is null.Returns a immutable copy of the video list.The source selector which uses a delegate to select sources.com.google.android.exoplayer2.trackselection.DefaultTrackSelector
Gets the DefaultTrackSelector object.Gets the TrackSelectorHelper object.boolean
getVideoAt
(int index) Gets a video from the video list at the specified indexcom.google.android.exoplayer2.Format
float
boolean
hasDvr()
Indicates if the current stream is a live video with DVR.protected void
boolean
Returns true if the video is a 360 video otherwise returns falseboolean
Checks the current playhead position with the live edge position and determines if it is within range of the live edge.boolean
isLive()
Indicates whether the current stream is a live video.boolean
boolean
Check if the player is currently playing and the media is audio-only.boolean
Returns if a source has been setprotected void
onHandlePlayPauseAction
(int state) Handle internal state and events for play/pause.void
onTaskRemoved
(android.content.Intent rootIntent) This is called when theMediaPlaybackService
is currently running and the user has removed a task that comes from the service's application.void
Prepares the player to play the current video source.void
Creates, configures, and prepares a new instance of MediaPlaybackvoid
pause()
Convenience method for easily pausing the exoplayer.void
play
(long position) Convenience method for easily starting the exoplayer.void
remove
(int index) Removes the video at the specified index.boolean
removeListener
(ExoMediaPlayback.Listener listener) void
Removes and replaces the video at the specified index.void
setAllowHlsChunklessPreparation
(boolean allowHlsChunklessPreparation) The value of this field in the HlsMediaSource defaults to true in ExoPlayer 2.17.0 Override it here to false if your HLS delivery includes 608/708 captionsvoid
setBandwidthMeter
(com.google.android.exoplayer2.upstream.BandwidthMeter bandwidthMeter) Sets the current bandwidth meter.void
void
setCurrentIndex
(int index) Sets the current video to the specified index.void
setDataSourceFactory
(com.google.android.exoplayer2.upstream.HttpDataSource.Factory httpDataSourceFactory) Sets theHttpDataSource.Factory
, which is used when creating theMediaSource
.void
setDebugListener
(ExoPlayerVideoDisplayComponent.InfoListener debugListener) void
setDefaultRenderersFactory
(com.google.android.exoplayer2.DefaultRenderersFactory defaultRenderersFactory) setEventEmitter
(EventEmitter eventEmitter) This is used to reset the EventEmitter when restoring the playback from the service.void
setInternalErrorListener
(ExoPlayerVideoDisplayComponent.InternalErrorListener internalErrorListener) void
setLoadControlConfig
(LoadControlConfig loadControlConfig) Sets the LoadControlConfig object.void
setMaxBufferDurationToSwitchDown
(long maxBufferDurationToSwitchDown) Deprecated.It is not longer used for ExoPlayer v2.void
setMinBufferDurationToSwitchUp
(long minBufferDurationToSwitchUp) Deprecated.It is not longer used for ExoPlayer v2.void
setMinBufferMs
(int minBufferMs) Deprecated.It is not longer used for ExoPlayer v2.void
setMinRebufferMs
(int minRebufferMs) Deprecated.It is not longer used for ExoPlayer v2.void
Configure the on-going notification.void
setPeakBitrate
(int peakBitrate) Sets the peak bitrate.void
setProgressInterval
(int progressInterval) Sets the the interval in milliseconds at which to fire PROGRESS events during playback.void
Provides a creator for aTrackSelectionOverrides.TrackSelectionOverride
instance specific for the Video track.void
setTrackSelector
(com.google.android.exoplayer2.trackselection.DefaultTrackSelector trackSelector) void
setUseDrmSessionsForClearContent
(boolean useDrmSessionsForClearContent) Whether to use the DRM session with clear content sections in the media (e.g.void
setVideoDisplayProperties
(Map<String, String> videoDisplayProperties) setVideoPath
(String path) Replaces player content with the video at the specified path.setVideoPath
(String videoPath, Map<String, String> languageCodeCaptionsMap) Replace player content with the video and captions at the specified paths.void
Deprecated.void
setVideoSource
(Video video, Source source) Sets the video source that will be used for playback.protected void
protected void
Methods inherited from class com.brightcove.player.event.AbstractComponent
addListener, addOnceListener, getEventEmitter, removeListener, removeListeners
-
Field Details
-
ACTION_PLAY
protected static final int ACTION_PLAY- See Also:
-
ACTION_PAUSE
protected static final int ACTION_PAUSE- See Also:
-
resourceBundle
-
progressInterval
protected int progressInterval -
mainHandler
protected final android.os.Handler mainHandler -
playheadPosition
protected long playheadPosition -
seekPosition
protected long seekPosition -
context
protected final android.content.Context context -
playerBandwidthMeter
-
fromSeekPosition
protected long fromSeekPosition -
drmEventListener
protected final com.google.android.exoplayer2.drm.DrmSessionEventListener drmEventListener -
adaptiveMediaSourceEventListener
protected final com.google.android.exoplayer2.source.MediaSourceEventListener adaptiveMediaSourceEventListener
-
-
Constructor Details
-
ExoMediaPlayback
-
-
Method Details
-
addListener
-
removeListener
-
getExoPlayerDrmSessionManager
Gets the ExoPlayer Drm session if available or null otherwise. TheExoPlayerDrmSessionManager
will be created only when the currentSource
properties has the keySource.Fields.WIDEVINE_KEY_SYSTEM
- Returns:
- the drm session manager
-
getWidevineMediaDrmCallback
-
onTaskRemoved
public void onTaskRemoved(android.content.Intent rootIntent) Description copied from interface:MediaPlayback
This is called when theMediaPlaybackService
is currently running and the user has removed a task that comes from the service's application.- Specified by:
onTaskRemoved
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Parameters:
rootIntent
- The original Intent that was used to launch the task that is being removed.
-
getNotification
Description copied from interface:MediaPlayback
Get the object which handles showing an on-going player notification.- Specified by:
getNotification
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
- An object to configure the on-going playback notification.
-
getSourceController
Description copied from interface:MediaPlayback
The source selector which uses a delegate to select sources.- Specified by:
getSourceController
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
- A source controller
-
getPlaylist
Description copied from interface:MediaPlayback
Returns a immutable copy of the video list.- Specified by:
getPlaylist
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
isPlaying
public boolean isPlaying()- Specified by:
isPlaying
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
- True if the player is currently playing.
-
setVideoPath
Description copied from interface:MediaPlayback
Replaces player content with the video at the specified path.- Specified by:
setVideoPath
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Parameters:
path
- HTTP path to a video- Returns:
- The created Video object.
-
setVideoPath
Description copied from interface:MediaPlayback
Replace player content with the video and captions at the specified paths.- Specified by:
setVideoPath
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Parameters:
videoPath
- HTTP path to the videolanguageCodeCaptionsMap
- A map of language code to caption urls.
-
add
Description copied from interface:MediaPlayback
Adds the video to the end of the video list.- Specified by:
add
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
add
Description copied from interface:MediaPlayback
Adds the video to the video list at the specified index.- Specified by:
add
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Throws:
IndexOutOfBoundsException
- when index < 0 or index is larger than the size of the video list.
-
addAll
Description copied from interface:MediaPlayback
Add all videos in the collection to the end of the list.- Specified by:
addAll
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Parameters:
newVideos
- The videos to append.
-
addAll
Description copied from interface:MediaPlayback
Inserts all videos in the collection at the specified index.- Specified by:
addAll
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Throws:
IndexOutOfBoundsException
- when index < 0 or index is larger than the size of the video list.
-
getVideoAt
Description copied from interface:MediaPlayback
Gets a video from the video list at the specified index- Specified by:
getVideoAt
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
getCurrentIndex
public int getCurrentIndex()Description copied from interface:MediaPlayback
Gets the index from the current video- Specified by:
getCurrentIndex
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
- The index of the current video or -1 if there are none.
-
setCurrentIndex
Description copied from interface:MediaPlayback
Sets the current video to the specified index.- Specified by:
setCurrentIndex
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Throws:
IndexOutOfBoundsException
- when index < 0 or index is larger than the size of the video list.
-
remove
Description copied from interface:MediaPlayback
Removes the video at the specified index.- Specified by:
remove
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Throws:
IndexOutOfBoundsException
- when index < 0 or index is larger than the size of the video list.
-
clear
public void clear()Description copied from interface:MediaPlayback
Removes all videos from the list.- Specified by:
clear
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
getBufferPercentage
public int getBufferPercentage()Description copied from interface:MediaPlayback
Returns the buffer percentage- Specified by:
getBufferPercentage
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
getVolume
public float getVolume()- Specified by:
getVolume
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
isSourceSet
public boolean isSourceSet()Description copied from interface:MediaPlayback
Returns if a source has been set- Specified by:
isSourceSet
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
getTrackSelector
@Nullable public com.google.android.exoplayer2.trackselection.DefaultTrackSelector getTrackSelector()Gets the DefaultTrackSelector object.- Returns:
- the track selector
- See Also:
-
DefaultTrackSelector
-
getTrackSelectorHelper
Gets the TrackSelectorHelper object.- Returns:
- the track selector helper
- See Also:
-
setTrackSelector
public void setTrackSelector(@NonNull com.google.android.exoplayer2.trackselection.DefaultTrackSelector trackSelector) -
setNotificationConfig
Configure the on-going notification.- Parameters:
config
- The configuration to apply to the notification.
-
emitErrorEvent
Description copied from interface:MediaPlayback
Emits an error event with the message passed in the event's properties- Specified by:
emitErrorEvent
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
emitErrorEvent
Description copied from interface:MediaPlayback
Emits an error event including the message passed and the exception in the properties- Specified by:
emitErrorEvent
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
setEventEmitter
This is used to reset the EventEmitter when restoring the playback from the service.- Parameters:
eventEmitter
- The new event emitter to set for this playback instance.- Returns:
- This playback instance
-
initializeListeners
protected void initializeListeners() -
startUpdater
protected void startUpdater() -
stopUpdater
protected void stopUpdater() -
hasDvr
public boolean hasDvr()Description copied from interface:MediaPlayback
Indicates if the current stream is a live video with DVR.- Specified by:
hasDvr
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
TRUE
iff live video with DVR capabilities is supported.
-
isLive
public boolean isLive()Description copied from interface:MediaPlayback
Indicates whether the current stream is a live video.- Specified by:
isLive
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
TRUE
iff live video is supported.
-
isInLiveEdge
public boolean isInLiveEdge()Description copied from interface:MediaPlayback
Checks the current playhead position with the live edge position and determines if it is within range of the live edge.- Specified by:
isInLiveEdge
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
- true if in live edge.
-
getCurrentPosition
public long getCurrentPosition()Description copied from interface:MediaPlayback
Returns the current playhead position of the underlying video player.If the player has not been set or initialized,
Constants.TIME_UNSET
will returned.- Specified by:
getCurrentPosition
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
- the current playhead position.
-
getPlayer
public com.google.android.exoplayer2.ExoPlayer getPlayer()Description copied from interface:MediaPlayback
Get the player used for media playback.- Specified by:
getPlayer
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
- The media player.
-
getLiveEdge
public long getLiveEdge()Compute the "live edge" as a long datatype, the largest position not within three target durations of the duration (per the HLS spec).- Specified by:
getLiveEdge
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
- -1 if the video is not live. Otherwise the largest position that is three target durations away from the duration.
-
getPlayerState
public int getPlayerState()Returns the ExoPlayer state if available, or -1 if the player is null.- Returns:
- the player state
- See Also:
-
Player.getPlaybackState()
-
setDebugListener
-
setCaptionListener
-
setInternalErrorListener
public void setInternalErrorListener(ExoPlayerVideoDisplayComponent.InternalErrorListener internalErrorListener) -
setVideoSource
Sets the video source that will be used for playback.- Specified by:
setVideoSource
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Parameters:
video
- reference to the video, if any.source
- reference to the video source, if any.
-
setProgressInterval
public void setProgressInterval(int progressInterval) Sets the the interval in milliseconds at which to fire PROGRESS events during playback. The default is 500ms.- Specified by:
setProgressInterval
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Parameters:
progressInterval
- the PROGRESS interval in milliseconds
-
getCurrentVideo
Description copied from interface:MediaPlayback
Get the currently playing video.- Specified by:
getCurrentVideo
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
- The current media object.
-
getCurrentSource
Description copied from interface:MediaPlayback
Get the current source for theVideo
.- Specified by:
getCurrentSource
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
- The source used for playback.
-
isPlayingAudioOnly
public boolean isPlayingAudioOnly()Description copied from interface:MediaPlayback
Check if the player is currently playing and the media is audio-only.- Specified by:
isPlayingAudioOnly
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
- True if the player is currently playing audio-only media; false otherwise.
-
getAnalytics
Description copied from interface:MediaPlayback
Returns the analytics component, the part of the player that monitors and tracks video playback and engagement.- Specified by:
getAnalytics
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Returns:
- the analytics component
-
openCurrentVideoSource
public void openCurrentVideoSource()Description copied from interface:MediaPlayback
Prepares the player to play the current video source.- Specified by:
openCurrentVideoSource
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
openVideo
Description copied from interface:MediaPlayback
Creates, configures, and prepares a new instance of MediaPlayback- Specified by:
openVideo
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Parameters:
video
- reference to the video to be prepared for the playback.source
- reference to the source to played if any.
-
getAllowHlsChunklessPreparation
public boolean getAllowHlsChunklessPreparation()- Returns:
- Whether to allow HLS chunkless preparation in ExoPlayer
-
setAllowHlsChunklessPreparation
public void setAllowHlsChunklessPreparation(boolean allowHlsChunklessPreparation) The value of this field in the HlsMediaSource defaults to true in ExoPlayer 2.17.0 Override it here to false if your HLS delivery includes 608/708 captions -
getUseDrmSessionsForClearContent
public boolean getUseDrmSessionsForClearContent()- Returns:
- Whether to use the DRM session with clear content sections in the media (e.g. for DRM content with clear stitched-in ads)
-
setUseDrmSessionsForClearContent
public void setUseDrmSessionsForClearContent(boolean useDrmSessionsForClearContent) Whether to use the DRM session with clear content sections in the media (e.g. for DRM content with clear stitched-in ads) -
isCurrentVideo360Mode
public boolean isCurrentVideo360Mode()Description copied from interface:MediaPlayback
Returns true if the video is a 360 video otherwise returns false- Specified by:
isCurrentVideo360Mode
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
destroyPlayer
public void destroyPlayer()Description copied from interface:MediaPlayback
Destroys the current player and releases it from memory. This helps to manage working with the complex state machines that are the MediaPlayer and the SurfaceView- Specified by:
destroyPlayer
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- See Also:
-
MediaPlayer
SurfaceView
-
getDefaultRenderersFactory
@Nullable public com.google.android.exoplayer2.DefaultRenderersFactory getDefaultRenderersFactory()Gets the DefaultRenderersFactory object.- Returns:
- the DefaultRenderersFactory
- See Also:
-
DefaultRenderersFactory
-
setDefaultRenderersFactory
public void setDefaultRenderersFactory(@NonNull com.google.android.exoplayer2.DefaultRenderersFactory defaultRenderersFactory) -
play
public void play(long position) Convenience method for easily starting the exoplayer. -
pause
public void pause()Convenience method for easily pausing the exoplayer. -
onHandlePlayPauseAction
protected void onHandlePlayPauseAction(int state) Handle internal state and events for play/pause. -
getDuration
public long getDuration()Returns the duration. -
getPlaybackLooper
public android.os.Looper getPlaybackLooper() -
getMainHandler
public android.os.Handler getMainHandler() -
getVideoFormat
public com.google.android.exoplayer2.Format getVideoFormat() -
getAudioFormat
public com.google.android.exoplayer2.Format getAudioFormat() -
getPeakBitrate
public int getPeakBitrate()Return the peak bitrate. -
setPeakBitrate
public void setPeakBitrate(int peakBitrate) Sets the peak bitrate. Set 0 to set the default bitrate.- Parameters:
peakBitrate
- the peak bitrate
-
setVideoSelectionOverrideCreator
Deprecated.Provides a creator for aDefaultTrackSelector.SelectionOverride
instance specific for the Video track.This SelectionOverride is applied every time a new video is loaded, and when the
setPeakBitrate(int)
is set. -
setTrackSelectionOverrideCreator
Provides a creator for a
TrackSelectionOverrides.TrackSelectionOverride
instance specific for the Video track. This TrackSelectionOverride is applied every time a new video is loaded, and when thesetPeakBitrate(int)
is set.If you want to disable the default TrackSelectionOverride, you may pass
TrackSelectionOverrideCreator.EMPTY
, which returnsTrackSelectionOverrideCreator.EMPTY_TRACK_SELECTION_OVERRIDES
and gets ignored when attempting to apply it to theDefaultTrackSelector
. -
replace
Description copied from interface:MediaPlayback
Removes and replaces the video at the specified index.- Specified by:
replace
in interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
- Parameters:
index
- The index to replace a media item.video
- The video to replace
-
getBandwidthMeter
public com.google.android.exoplayer2.upstream.BandwidthMeter getBandwidthMeter()Returns the current bandwidth meter. If null, a default bandwidth meter will be used. -
setBandwidthMeter
public void setBandwidthMeter(com.google.android.exoplayer2.upstream.BandwidthMeter bandwidthMeter) Sets the current bandwidth meter. -
getDataSourceFactory
@NonNull public com.google.android.exoplayer2.upstream.HttpDataSource.Factory getDataSourceFactory()Returns the currentHttpDataSource.Factory
, which is used when creating theMediaSource
. -
setDataSourceFactory
public void setDataSourceFactory(@NonNull com.google.android.exoplayer2.upstream.HttpDataSource.Factory httpDataSourceFactory) Sets theHttpDataSource.Factory
, which is used when creating theMediaSource
. WARNING: When creating a customized HttpDataSource.Factory, you must make sure to use the default user agentC.HTTP_USER_AGENT
to avoid losing Brightcove Analytics and Delivery Rules support.- Parameters:
httpDataSourceFactory
- the http data source factory
-
getMinBufferDurationToSwitchUp
Deprecated.It is not longer used for ExoPlayer v2.Returns the minimum duration of media that needs to be buffered for a switch to a higher quality variant to be considered. -
setMinBufferDurationToSwitchUp
Deprecated.It is not longer used for ExoPlayer v2.Sets the minimum duration of media that needs to be buffered for a switch to a higher quality variant to be considered. -
getMaxBufferDurationToSwitchDown
Deprecated.It is not longer used for ExoPlayer v2.Returns the maximum duration of media that needs to be buffered for a switch to a lower quality variant to be considered. -
setMaxBufferDurationToSwitchDown
Deprecated.It is not longer used for ExoPlayer v2.Sets the maximum duration of media that needs to be buffered for a switch to a lower quality variant to be considered. -
getMinBufferMs
Deprecated.It is not longer used for ExoPlayer v2.Returns the minimum duration of data that must be buffered for playback to start or resume following a user action such as a seek. -
setMinBufferMs
Deprecated.It is not longer used for ExoPlayer v2.Sets the minimum duration of data that must be buffered for playback to start or resume following a user action such as a seek. -
getMinRebufferMs
Deprecated.It is not longer used for ExoPlayer v2. Use UsegetLoadControlConfig()
-
setMinRebufferMs
Deprecated.It is not longer used for ExoPlayer v2. UsesetLoadControlConfig(LoadControlConfig)
-
getLoadControlConfig
Gets the LoadControlConfig object.- Returns:
- the load control config
-
setLoadControlConfig
Sets the LoadControlConfig object.This object is used to create a
LoadControl
instance. TheLoadControl
is used when creating an instance of the ExoPlayer.- Parameters:
loadControlConfig
- the load control config
-
buildDataSourceFactory
protected com.google.android.exoplayer2.upstream.DataSource.Factory buildDataSourceFactory(com.google.android.exoplayer2.upstream.HttpDataSource.Factory httpDatasourceFactory, boolean useBandwidthMeter) Returns a new DataSource factory.- Parameters:
httpDatasourceFactory
- contains RequestProperties information (such as Video request headers)useBandwidthMeter
- specifies whether the transfer operations must be tracked using the bandwidth meter.- Returns:
- A new DataSource factory.
-
getVideoDisplayProperties
-
setVideoDisplayProperties
-