Class ExoMediaPlayback
- All Implemented Interfaces:
Component,MediaPlayback<com.google.android.exoplayer2.ExoPlayer>
See: https://github.com/google/ExoPlayer
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface definition to listen for player states.protected static @interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected final com.google.android.exoplayer2.source.MediaSourceEventListenerprotected final android.content.Contextprotected final com.google.android.exoplayer2.drm.DrmSessionEventListenerprotected longprotected final android.os.Handlerprotected final PlayerBandwidthMeterprotected longprotected intstatic ResourceBundleprotected longFields inherited from class com.brightcove.player.event.AbstractComponent
eventEmitter, listenerTokens -
Constructor Summary
ConstructorsConstructorDescriptionExoMediaPlayback(android.content.Context context, EventEmitter eventEmitter) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the video to the video list at the specified index.voidAdds the video to the end of the video list.voidaddAll(int index, Collection<Video> newVideos) Inserts all videos in the collection at the specified index.voidaddAll(Collection<Video> newVideos) Add all videos in the collection to the end of the list.voidaddListener(ExoMediaPlayback.Listener listener) protected com.google.android.exoplayer2.upstream.DataSource.FactorybuildDataSourceFactory(com.google.android.exoplayer2.upstream.HttpDataSource.Factory httpDatasourceFactory, boolean useBandwidthMeter) Returns a new DataSource factory.voidclear()Removes all videos from the list.voidDestroys the current player and releases it from memory.voidemitErrorEvent(String message) Emits an error event with the message passed in the event's propertiesvoidemitErrorEvent(String message, Exception exception) Emits an error event including the message passed and the exception in the propertiesbooleanReturns the analytics component, the part of the player that monitors and tracks video playback and engagement.com.google.android.exoplayer2.Formatcom.google.android.exoplayer2.upstream.BandwidthMeterReturns the current bandwidth meter.intReturns the buffer percentageintGets the index from the current videolongReturns 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.FactoryReturns the currentHttpDataSource.Factory, which is used when creating theMediaSource.com.google.android.exoplayer2.DefaultRenderersFactoryGets the DefaultRenderersFactory object.longReturns the duration.Gets the ExoPlayer Drm session if available or null otherwise.longCompute 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.HandlerlongDeprecated.It is not longer used for ExoPlayer v2.longDeprecated.It is not longer used for ExoPlayer v2.intDeprecated.It is not longer used for ExoPlayer v2.intDeprecated.It is not longer used for ExoPlayer v2.Get the object which handles showing an on-going player notification.intReturn the peak bitrate.android.os.Loopercom.google.android.exoplayer2.ExoPlayerGet the player used for media playback.intReturns 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.DefaultTrackSelectorGets the DefaultTrackSelector object.Gets the TrackSelectorHelper object.booleangetVideoAt(int index) Gets a video from the video list at the specified indexcom.google.android.exoplayer2.FormatfloatbooleanhasDvr()Indicates if the current stream is a live video with DVR.protected voidbooleanReturns true if the video is a 360 video otherwise returns falsebooleanChecks the current playhead position with the live edge position and determines if it is within range of the live edge.booleanisLive()Indicates whether the current stream is a live video.booleanbooleanCheck if the player is currently playing and the media is audio-only.booleanReturns if a source has been setprotected voidonHandlePlayPauseAction(int state) Handle internal state and events for play/pause.voidonTaskRemoved(android.content.Intent rootIntent) This is called when theMediaPlaybackServiceis currently running and the user has removed a task that comes from the service's application.voidPrepares the player to play the current video source.voidCreates, configures, and prepares a new instance of MediaPlaybackvoidpause()Convenience method for easily pausing the exoplayer.voidplay(long position) Convenience method for easily starting the exoplayer.voidremove(int index) Removes the video at the specified index.booleanremoveListener(ExoMediaPlayback.Listener listener) voidRemoves and replaces the video at the specified index.voidsetAllowHlsChunklessPreparation(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 captionsvoidsetBandwidthMeter(com.google.android.exoplayer2.upstream.BandwidthMeter bandwidthMeter) Sets the current bandwidth meter.voidvoidsetCurrentIndex(int index) Sets the current video to the specified index.voidsetDataSourceFactory(com.google.android.exoplayer2.upstream.HttpDataSource.Factory httpDataSourceFactory) Sets theHttpDataSource.Factory, which is used when creating theMediaSource.voidsetDebugListener(ExoPlayerVideoDisplayComponent.InfoListener debugListener) voidsetDefaultRenderersFactory(com.google.android.exoplayer2.DefaultRenderersFactory defaultRenderersFactory) setEventEmitter(EventEmitter eventEmitter) This is used to reset the EventEmitter when restoring the playback from the service.voidsetInternalErrorListener(ExoPlayerVideoDisplayComponent.InternalErrorListener internalErrorListener) voidsetLoadControlConfig(LoadControlConfig loadControlConfig) Sets the LoadControlConfig object.voidsetMaxBufferDurationToSwitchDown(long maxBufferDurationToSwitchDown) Deprecated.It is not longer used for ExoPlayer v2.voidsetMinBufferDurationToSwitchUp(long minBufferDurationToSwitchUp) Deprecated.It is not longer used for ExoPlayer v2.voidsetMinBufferMs(int minBufferMs) Deprecated.It is not longer used for ExoPlayer v2.voidsetMinRebufferMs(int minRebufferMs) Deprecated.It is not longer used for ExoPlayer v2.voidConfigure the on-going notification.voidsetPeakBitrate(int peakBitrate) Sets the peak bitrate.voidsetProgressInterval(int progressInterval) Sets the the interval in milliseconds at which to fire PROGRESS events during playback.voidProvides a creator for aTrackSelectionOverrides.TrackSelectionOverrideinstance specific for the Video track.voidsetTrackSelector(com.google.android.exoplayer2.trackselection.DefaultTrackSelector trackSelector) voidsetUseDrmSessionsForClearContent(boolean useDrmSessionsForClearContent) Whether to use the DRM session with clear content sections in the media (e.g.voidsetVideoDisplayProperties(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.voidDeprecated.voidsetVideoSource(Video video, Source source) Sets the video source that will be used for playback.protected voidprotected voidMethods 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. TheExoPlayerDrmSessionManagerwill be created only when the currentSourceproperties 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:MediaPlaybackThis is called when theMediaPlaybackServiceis currently running and the user has removed a task that comes from the service's application.- Specified by:
onTaskRemovedin 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:MediaPlaybackGet the object which handles showing an on-going player notification.- Specified by:
getNotificationin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Returns:
- An object to configure the on-going playback notification.
-
getSourceController
Description copied from interface:MediaPlaybackThe source selector which uses a delegate to select sources.- Specified by:
getSourceControllerin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Returns:
- A source controller
-
getPlaylist
Description copied from interface:MediaPlaybackReturns a immutable copy of the video list.- Specified by:
getPlaylistin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
isPlaying
public boolean isPlaying()- Specified by:
isPlayingin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Returns:
- True if the player is currently playing.
-
setVideoPath
Description copied from interface:MediaPlaybackReplaces player content with the video at the specified path.- Specified by:
setVideoPathin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Parameters:
path- HTTP path to a video- Returns:
- The created Video object.
-
setVideoPath
Description copied from interface:MediaPlaybackReplace player content with the video and captions at the specified paths.- Specified by:
setVideoPathin 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:MediaPlaybackAdds the video to the end of the video list.- Specified by:
addin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
add
Description copied from interface:MediaPlaybackAdds the video to the video list at the specified index.- Specified by:
addin 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:MediaPlaybackAdd all videos in the collection to the end of the list.- Specified by:
addAllin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Parameters:
newVideos- The videos to append.
-
addAll
Description copied from interface:MediaPlaybackInserts all videos in the collection at the specified index.- Specified by:
addAllin 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:MediaPlaybackGets a video from the video list at the specified index- Specified by:
getVideoAtin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
getCurrentIndex
public int getCurrentIndex()Description copied from interface:MediaPlaybackGets the index from the current video- Specified by:
getCurrentIndexin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Returns:
- The index of the current video or -1 if there are none.
-
setCurrentIndex
Description copied from interface:MediaPlaybackSets the current video to the specified index.- Specified by:
setCurrentIndexin 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:MediaPlaybackRemoves the video at the specified index.- Specified by:
removein 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:MediaPlaybackRemoves all videos from the list.- Specified by:
clearin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
getBufferPercentage
public int getBufferPercentage()Description copied from interface:MediaPlaybackReturns the buffer percentage- Specified by:
getBufferPercentagein interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
getVolume
public float getVolume()- Specified by:
getVolumein interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
isSourceSet
public boolean isSourceSet()Description copied from interface:MediaPlaybackReturns if a source has been set- Specified by:
isSourceSetin 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:MediaPlaybackEmits an error event with the message passed in the event's properties- Specified by:
emitErrorEventin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
emitErrorEvent
Description copied from interface:MediaPlaybackEmits an error event including the message passed and the exception in the properties- Specified by:
emitErrorEventin 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:MediaPlaybackIndicates if the current stream is a live video with DVR.- Specified by:
hasDvrin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Returns:
TRUEiff live video with DVR capabilities is supported.
-
isLive
public boolean isLive()Description copied from interface:MediaPlaybackIndicates whether the current stream is a live video.- Specified by:
isLivein interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Returns:
TRUEiff live video is supported.
-
isInLiveEdge
public boolean isInLiveEdge()Description copied from interface:MediaPlaybackChecks the current playhead position with the live edge position and determines if it is within range of the live edge.- Specified by:
isInLiveEdgein interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Returns:
- true if in live edge.
-
getCurrentPosition
public long getCurrentPosition()Description copied from interface:MediaPlaybackReturns the current playhead position of the underlying video player.If the player has not been set or initialized,
Constants.TIME_UNSETwill returned.- Specified by:
getCurrentPositionin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Returns:
- the current playhead position.
-
getPlayer
public com.google.android.exoplayer2.ExoPlayer getPlayer()Description copied from interface:MediaPlaybackGet the player used for media playback.- Specified by:
getPlayerin 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:
getLiveEdgein 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:
setVideoSourcein 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:
setProgressIntervalin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Parameters:
progressInterval- the PROGRESS interval in milliseconds
-
getCurrentVideo
Description copied from interface:MediaPlaybackGet the currently playing video.- Specified by:
getCurrentVideoin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Returns:
- The current media object.
-
getCurrentSource
Description copied from interface:MediaPlaybackGet the current source for theVideo.- Specified by:
getCurrentSourcein interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Returns:
- The source used for playback.
-
isPlayingAudioOnly
public boolean isPlayingAudioOnly()Description copied from interface:MediaPlaybackCheck if the player is currently playing and the media is audio-only.- Specified by:
isPlayingAudioOnlyin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Returns:
- True if the player is currently playing audio-only media; false otherwise.
-
getAnalytics
Description copied from interface:MediaPlaybackReturns the analytics component, the part of the player that monitors and tracks video playback and engagement.- Specified by:
getAnalyticsin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- Returns:
- the analytics component
-
openCurrentVideoSource
public void openCurrentVideoSource()Description copied from interface:MediaPlaybackPrepares the player to play the current video source.- Specified by:
openCurrentVideoSourcein interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
openVideo
Description copied from interface:MediaPlaybackCreates, configures, and prepares a new instance of MediaPlayback- Specified by:
openVideoin 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:MediaPlaybackReturns true if the video is a 360 video otherwise returns false- Specified by:
isCurrentVideo360Modein interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>
-
destroyPlayer
public void destroyPlayer()Description copied from interface:MediaPlaybackDestroys 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:
destroyPlayerin interfaceMediaPlayback<com.google.android.exoplayer2.ExoPlayer>- See Also:
-
MediaPlayerSurfaceView
-
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.SelectionOverrideinstance 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.TrackSelectionOverrideinstance 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_OVERRIDESand gets ignored when attempting to apply it to theDefaultTrackSelector. -
replace
Description copied from interface:MediaPlaybackRemoves and replaces the video at the specified index.- Specified by:
replacein 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_AGENTto 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
LoadControlinstance. TheLoadControlis 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
-