@Emits(events={"addAnalyticsBaseParams","analyticsVideoEngagement","audioTracks","bufferingCompleted","bufferingStarted","caption","captionsLanguages","toggleClosedCaptions","playWhenReadyCommitted","renditionChanged"}) @ListensFor(events={"selectAudioTrack","selectClosedCaptionTrack","on360FrameAvailable"}) @Deprecated public class ExoPlayerVideoDisplayComponent extends VideoDisplayComponent implements com.google.android.exoplayer.ExoPlayer.Listener, com.google.android.exoplayer.chunk.ChunkSampleSource.EventListener, com.google.android.exoplayer.hls.HlsChunkSource.EventListener, com.google.android.exoplayer.hls.HlsSampleSource.EventListener, com.google.android.exoplayer.upstream.BandwidthMeter.EventListener, com.google.android.exoplayer.MediaCodecVideoTrackRenderer.EventListener, com.google.android.exoplayer.MediaCodecAudioTrackRenderer.EventListener, com.google.android.exoplayer.dash.DashChunkSource.EventListener, ExoPlayerDrmSessionManager.EventListener, com.google.android.exoplayer.text.TextRenderer, com.google.android.exoplayer.metadata.MetadataTrackRenderer.MetadataRenderer<java.util.List<com.google.android.exoplayer.metadata.id3.Id3Frame>>, com.google.android.exoplayer.audio.AudioCapabilitiesReceiver.Listener
See: https://github.com/google/ExoPlayer
VideoDisplayComponent| Modifier and Type | Class and Description |
|---|---|
static interface |
ExoPlayerVideoDisplayComponent.CaptionListener
Deprecated.
A listener for receiving notifications of timed text.
|
static interface |
ExoPlayerVideoDisplayComponent.Id3MetadataListener
Deprecated.
Listener for receiving ID3 metadata parsed from the media stream.
|
static interface |
ExoPlayerVideoDisplayComponent.InfoListener
Deprecated.
A listener for debugging information.
|
static interface |
ExoPlayerVideoDisplayComponent.InternalErrorListener
Deprecated.
Listeners for receiving error information.
|
static interface |
ExoPlayerVideoDisplayComponent.RendererBuilder
Deprecated.
Builds renderers for the player.
|
static interface |
ExoPlayerVideoDisplayComponent.RendererBuilderCallback
Deprecated.
The callbacks fired once renderers are built.
|
VideoDisplayComponent.OnSetSourceListener, VideoDisplayComponent.OnWillChangeVideoListener| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BUFFERED_POSITION
Deprecated.
The buffered position property of a BUFFERED_UPDATE event.
|
static int |
DISABLED_TRACK
Deprecated.
|
static java.lang.String |
EXOPLAYER_FORMAT
Deprecated.
The key for a Format object emitted when the ExoPlayer changes rendition.
|
static java.lang.String |
IN_MANIFEST_CC_URI_STR
Deprecated.
|
static java.lang.String |
PLAY_WHEN_READY_COMMITTED
Deprecated.
|
static int |
RENDERER_COUNT
Deprecated.
|
static java.lang.String |
RENDITION_CHANGED
Deprecated.
Emitted when the ExoPlayer changes the rendition
|
captionsPath, context, fromSeekPosition, hasSurface, isFrameAvailable, mRendererConfig, nextSource, nextVideo, ON_PLAY_SEEK_THRESHOLD, playheadPosition, progressInterval, renderView, reseeking, seekPosition, updatereventEmitter, listenerTokens| Constructor and Description |
|---|
ExoPlayerVideoDisplayComponent(RenderView renderView,
EventEmitter eventEmitter)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
destroyPlayer()
Deprecated.
Destroys the current player and releases it from memory.
|
com.google.android.exoplayer.upstream.BandwidthMeter |
getBandwidthMeter()
Deprecated.
Returns the current bandwidth meter.
|
BrightcoveDrmSession |
getBrightcoveDrmSession()
Deprecated.
Gets the Brightcove Drm session if available or null otherwise.
|
com.google.android.exoplayer.CodecCounters |
getCodecCounters()
Deprecated.
|
com.google.android.exoplayer.ExoPlayer |
getExoPlayer()
Deprecated.
|
int |
getLiveEdge()
Deprecated.
Compute the "live edge", the largest position not within three target durations of the duration (per the HLS spec).
|
android.os.Handler |
getMainHandler()
Deprecated.
|
long |
getMaxBufferDurationToSwitchDown()
Deprecated.
Returns the maximum duration of media that needs to be buffered
for a switch to a lower quality variant to be considered.
|
android.media.MediaPlayer |
getMediaPlayer()
Deprecated.
|
long |
getMinBufferDurationToSwitchUp()
Deprecated.
Returns the minimum duration of media that needs to be buffered
for a switch to a higher quality variant to be considered.
|
int |
getMinBufferMs()
Deprecated.
Returns the minimum duration of data that must be buffered for
playback to start or resume following a user action such as a
seek.
|
int |
getMinRebufferMs()
Deprecated.
Returns the minimum duration of data that must be buffered for
playback to resume after a player invoked rebuffer (i.e.
|
int |
getPeakBitrate()
Deprecated.
Return the peak bitrate.
|
android.os.Looper |
getPlaybackLooper()
Deprecated.
|
int |
getPlayerState()
Deprecated.
|
com.google.android.exoplayer.chunk.Format |
getVideoFormat()
Deprecated.
|
boolean |
hasDvr()
Deprecated.
Indicates if Live with DVR is supported.
|
protected void |
initializeListeners()
Deprecated.
|
boolean |
isLive()
Deprecated.
Provides a default for handling live videos.
|
void |
onAudioCapabilitiesChanged(com.google.android.exoplayer.audio.AudioCapabilities audioCapabilities)
Deprecated.
|
void |
onAudioTrackInitializationError(com.google.android.exoplayer.audio.AudioTrack.InitializationException e)
Deprecated.
|
void |
onAudioTrackUnderrun(int bufferSize,
long bufferSizeMs,
long elapsedSinceLastFeedMs)
Deprecated.
|
void |
onAudioTrackWriteError(com.google.android.exoplayer.audio.AudioTrack.WriteException e)
Deprecated.
|
void |
onAvailableRangeChanged(int sourceId,
com.google.android.exoplayer.TimeRange availableRange)
Deprecated.
|
void |
onAvailableRangeChanged(com.google.android.exoplayer.TimeRange availableRange)
Deprecated.
|
void |
onBandwidthSample(int elapsedMs,
long bytes,
long bitrateEstimate)
Deprecated.
|
void |
onCryptoError(android.media.MediaCodec.CryptoException e)
Deprecated.
|
void |
onCues(java.util.List<com.google.android.exoplayer.text.Cue> cues)
Deprecated.
|
void |
onDecoderInitializationError(com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException e)
Deprecated.
|
void |
onDecoderInitialized(java.lang.String decoderName,
long elapsedRealtimeMs,
long initializationDurationMs)
Deprecated.
|
void |
onDownstreamFormatChanged(int sourceId,
com.google.android.exoplayer.chunk.Format format,
int trigger,
long mediaTimeMs)
Deprecated.
|
void |
onDrawnToSurface(android.view.Surface surface)
Deprecated.
|
void |
onDrmKeysLoaded()
Deprecated.
Called each time keys are loaded.
|
void |
onDrmKeysRemoved()
Deprecated.
Called each time offline keys are removed.
|
void |
onDrmKeysRestored()
Deprecated.
Called each time offline keys are restored.
|
void |
onDrmSessionManagerError(java.lang.Exception e)
Deprecated.
Called when a drm error occurs.
|
void |
onDroppedFrames(int count,
long elapsed)
Deprecated.
|
void |
onLoadCanceled(int sourceId,
long bytesLoaded)
Deprecated.
|
void |
onLoadCompleted(int sourceId,
long bytesLoaded,
int type,
int trigger,
com.google.android.exoplayer.chunk.Format format,
long mediaStartTimeMs,
long mediaEndTimeMs,
long elapsedRealtimeMs,
long loadDurationMs)
Deprecated.
|
void |
onLoadError(int sourceId,
java.io.IOException e)
Deprecated.
|
void |
onLoadStarted(int sourceId,
long length,
int type,
int trigger,
com.google.android.exoplayer.chunk.Format format,
long mediaStartTimeMs,
long mediaEndTimeMs)
Deprecated.
|
void |
onMediaPlaylistLoadCompleted(byte[] bytes)
Deprecated.
|
void |
onMetadata(java.util.List<com.google.android.exoplayer.metadata.id3.Id3Frame> id3Frames)
Deprecated.
|
void |
onPlayerError(com.google.android.exoplayer.ExoPlaybackException e)
Deprecated.
|
void |
onPlayerStateChanged(boolean playWhenReady,
int state)
Deprecated.
|
void |
onPlayWhenReadyCommitted()
Deprecated.
|
void |
onUpstreamDiscarded(int sourceId,
long mediaStartTimeMs,
long mediaEndTimeMs)
Deprecated.
|
void |
onVideoSizeChanged(int width,
int height,
int unappliedRotationDegrees,
float pixelWidthHeightRatio)
Deprecated.
|
protected void |
openVideo(Video video,
Source source)
Deprecated.
Creates, configures, and prepares a new instance of MediaPlayer
|
void |
setBandwidthMeter(com.google.android.exoplayer.upstream.BandwidthMeter bandwidthMeter)
Deprecated.
Sets the current bandwidth meter.
|
void |
setCaptionListener(ExoPlayerVideoDisplayComponent.CaptionListener listener)
Deprecated.
|
void |
setDebugListener(ExoPlayerVideoDisplayComponent.InfoListener debugListener)
Deprecated.
|
void |
setHlsChunkSource(com.google.android.exoplayer.hls.HlsChunkSource hlsChunkSource)
Deprecated.
Save the given chunk source to discriminate between live and non-live videos.
|
void |
setInternalErrorListener(ExoPlayerVideoDisplayComponent.InternalErrorListener internalErrorListener)
Deprecated.
|
void |
setMaxBufferDurationToSwitchDown(long maxBufferDurationToSwitchDown)
Deprecated.
Sets the maximum duration of media that needs to be buffered
for a switch to a lower quality variant to be considered.
|
void |
setMetadataListener(ExoPlayerVideoDisplayComponent.Id3MetadataListener listener)
Deprecated.
|
void |
setMinBufferDurationToSwitchUp(long minBufferDurationToSwitchUp)
Deprecated.
Sets the minimum duration of media that needs to be buffered
for a switch to a higher quality variant to be considered.
|
void |
setMinBufferMs(int minBufferMs)
Deprecated.
Sets the minimum duration of data that must be buffered for
playback to start or resume following a user action such as a
seek.
|
void |
setMinRebufferMs(int minRebufferMs)
Deprecated.
Sets the minimum duration of data that must be buffered for
playback to resume after a player invoked rebuffer (i.e.
|
void |
setPeakBitrate(int peakBitrate)
Deprecated.
Sets the peak bitrate.
|
protected void |
startUpdater()
Deprecated.
|
protected void |
stopUpdater()
Deprecated.
|
void |
surfaceChanged(android.view.SurfaceHolder surfaceHolder,
int format,
int w,
int h)
Deprecated.
|
void |
surfaceCreated(android.view.SurfaceHolder surfaceHolder)
Deprecated.
|
void |
surfaceDestroyed(android.view.SurfaceHolder surfaceHolder)
Deprecated.
|
emitErrorEvent, emitErrorEvent, emitVideoSize, getAnalytics, getCurrentSource, getCurrentSourceOrFail, getCurrentVideo, getCurrentVideoOrFail, getHeaders, getRenderView, isCurrentVideo360Mode, isInLiveEdge, onSurfaceTextureAvailable, onSurfaceTextureDestroyed, onSurfaceTextureSizeChanged, onSurfaceTextureUpdated, openCurrentVideoSource, setProgressInterval, setRendererConfig, setVideoSourceaddListener, addOnceListener, getEventEmitter, removeListener, removeListenerspublic static final int DISABLED_TRACK
public static final java.lang.String IN_MANIFEST_CC_URI_STR
public static final java.lang.String BUFFERED_POSITION
public static final java.lang.String RENDITION_CHANGED
public static final java.lang.String EXOPLAYER_FORMAT
public static final int RENDERER_COUNT
public static final java.lang.String PLAY_WHEN_READY_COMMITTED
public ExoPlayerVideoDisplayComponent(RenderView renderView, EventEmitter eventEmitter)
@Nullable public BrightcoveDrmSession getBrightcoveDrmSession()
BrightcoveDrmSession will be created only when the current Source
properties has the key Source.Fields#WIDEVINE_KEY_SYSTEMprotected void initializeListeners()
initializeListeners in class VideoDisplayComponentprotected void startUpdater()
startUpdater in class VideoDisplayComponentprotected void stopUpdater()
stopUpdater in class VideoDisplayComponentpublic android.media.MediaPlayer getMediaPlayer()
getMediaPlayer in class VideoDisplayComponentpublic boolean hasDvr()
VideoDisplayComponenthasDvr in class VideoDisplayComponentTRUE iff live video with DVR capabilities is supported.public void setHlsChunkSource(com.google.android.exoplayer.hls.HlsChunkSource hlsChunkSource)
hlsChunkSource - The given chunk source object.public boolean isLive()
VideoDisplayComponentisLive in class VideoDisplayComponentTRUE iff live video is supported.public int getLiveEdge()
getLiveEdge in class VideoDisplayComponentpublic com.google.android.exoplayer.ExoPlayer getExoPlayer()
public int getPlayerState()
public void setDebugListener(ExoPlayerVideoDisplayComponent.InfoListener debugListener)
public void setCaptionListener(ExoPlayerVideoDisplayComponent.CaptionListener listener)
public void setMetadataListener(ExoPlayerVideoDisplayComponent.Id3MetadataListener listener)
public void setInternalErrorListener(ExoPlayerVideoDisplayComponent.InternalErrorListener internalErrorListener)
protected void openVideo(@NonNull
Video video,
@Nullable
Source source)
VideoDisplayComponentopenVideo in class VideoDisplayComponentvideo - reference to the video to be prepared for the playback.source - reference to the source to played if any.protected void destroyPlayer()
VideoDisplayComponentdestroyPlayer in class VideoDisplayComponentMediaPlayer,
SurfaceViewpublic android.os.Looper getPlaybackLooper()
public android.os.Handler getMainHandler()
public void onPlayerStateChanged(boolean playWhenReady,
int state)
onPlayerStateChanged in interface com.google.android.exoplayer.ExoPlayer.Listenerpublic void onPlayWhenReadyCommitted()
onPlayWhenReadyCommitted in interface com.google.android.exoplayer.ExoPlayer.Listenerpublic void onPlayerError(com.google.android.exoplayer.ExoPlaybackException e)
onPlayerError in interface com.google.android.exoplayer.ExoPlayer.Listenerpublic void onLoadStarted(int sourceId,
long length,
int type,
int trigger,
com.google.android.exoplayer.chunk.Format format,
long mediaStartTimeMs,
long mediaEndTimeMs)
onLoadStarted in interface com.google.android.exoplayer.chunk.BaseChunkSampleSourceEventListenerpublic void onLoadCompleted(int sourceId,
long bytesLoaded,
int type,
int trigger,
com.google.android.exoplayer.chunk.Format format,
long mediaStartTimeMs,
long mediaEndTimeMs,
long elapsedRealtimeMs,
long loadDurationMs)
onLoadCompleted in interface com.google.android.exoplayer.chunk.BaseChunkSampleSourceEventListenerpublic void onLoadCanceled(int sourceId,
long bytesLoaded)
onLoadCanceled in interface com.google.android.exoplayer.chunk.BaseChunkSampleSourceEventListenerpublic void onLoadError(int sourceId,
java.io.IOException e)
onLoadError in interface com.google.android.exoplayer.chunk.BaseChunkSampleSourceEventListenerpublic void onUpstreamDiscarded(int sourceId,
long mediaStartTimeMs,
long mediaEndTimeMs)
onUpstreamDiscarded in interface com.google.android.exoplayer.chunk.BaseChunkSampleSourceEventListenerpublic void onDownstreamFormatChanged(int sourceId,
com.google.android.exoplayer.chunk.Format format,
int trigger,
long mediaTimeMs)
onDownstreamFormatChanged in interface com.google.android.exoplayer.chunk.BaseChunkSampleSourceEventListenerpublic void onDroppedFrames(int count,
long elapsed)
onDroppedFrames in interface com.google.android.exoplayer.MediaCodecVideoTrackRenderer.EventListenerpublic void onVideoSizeChanged(int width,
int height,
int unappliedRotationDegrees,
float pixelWidthHeightRatio)
onVideoSizeChanged in interface com.google.android.exoplayer.MediaCodecVideoTrackRenderer.EventListenerpublic void onDrawnToSurface(android.view.Surface surface)
onDrawnToSurface in interface com.google.android.exoplayer.MediaCodecVideoTrackRenderer.EventListenerpublic void onDrmKeysLoaded()
ExoPlayerDrmSessionManager.EventListeneronDrmKeysLoaded in interface ExoPlayerDrmSessionManager.EventListenerpublic void onDrmKeysRestored()
ExoPlayerDrmSessionManager.EventListeneronDrmKeysRestored in interface ExoPlayerDrmSessionManager.EventListenerpublic void onDrmKeysRemoved()
ExoPlayerDrmSessionManager.EventListeneronDrmKeysRemoved in interface ExoPlayerDrmSessionManager.EventListenerpublic void onDrmSessionManagerError(java.lang.Exception e)
ExoPlayerDrmSessionManager.EventListeneronDrmSessionManagerError in interface ExoPlayerDrmSessionManager.EventListenere - The reason for this error.public void onBandwidthSample(int elapsedMs,
long bytes,
long bitrateEstimate)
onBandwidthSample in interface com.google.android.exoplayer.upstream.BandwidthMeter.EventListenerpublic void onAudioTrackInitializationError(com.google.android.exoplayer.audio.AudioTrack.InitializationException e)
onAudioTrackInitializationError in interface com.google.android.exoplayer.MediaCodecAudioTrackRenderer.EventListenerpublic void onAudioTrackWriteError(com.google.android.exoplayer.audio.AudioTrack.WriteException e)
onAudioTrackWriteError in interface com.google.android.exoplayer.MediaCodecAudioTrackRenderer.EventListenerpublic void onAudioTrackUnderrun(int bufferSize,
long bufferSizeMs,
long elapsedSinceLastFeedMs)
onAudioTrackUnderrun in interface com.google.android.exoplayer.MediaCodecAudioTrackRenderer.EventListenerpublic void onDecoderInitializationError(com.google.android.exoplayer.MediaCodecTrackRenderer.DecoderInitializationException e)
onDecoderInitializationError in interface com.google.android.exoplayer.MediaCodecTrackRenderer.EventListenerpublic void onCryptoError(android.media.MediaCodec.CryptoException e)
onCryptoError in interface com.google.android.exoplayer.MediaCodecTrackRenderer.EventListenerpublic void onAudioCapabilitiesChanged(com.google.android.exoplayer.audio.AudioCapabilities audioCapabilities)
onAudioCapabilitiesChanged in interface com.google.android.exoplayer.audio.AudioCapabilitiesReceiver.Listenerpublic void onDecoderInitialized(java.lang.String decoderName,
long elapsedRealtimeMs,
long initializationDurationMs)
onDecoderInitialized in interface com.google.android.exoplayer.MediaCodecTrackRenderer.EventListenerpublic void onAvailableRangeChanged(int sourceId,
com.google.android.exoplayer.TimeRange availableRange)
onAvailableRangeChanged in interface com.google.android.exoplayer.dash.DashChunkSource.EventListenerpublic void onAvailableRangeChanged(com.google.android.exoplayer.TimeRange availableRange)
onAvailableRangeChanged in interface com.google.android.exoplayer.hls.HlsChunkSource.EventListenerpublic void onMediaPlaylistLoadCompleted(byte[] bytes)
onMediaPlaylistLoadCompleted in interface com.google.android.exoplayer.hls.HlsChunkSource.EventListenerpublic void onCues(java.util.List<com.google.android.exoplayer.text.Cue> cues)
onCues in interface com.google.android.exoplayer.text.TextRendererpublic void onMetadata(java.util.List<com.google.android.exoplayer.metadata.id3.Id3Frame> id3Frames)
onMetadata in interface com.google.android.exoplayer.metadata.MetadataTrackRenderer.MetadataRenderer<java.util.List<com.google.android.exoplayer.metadata.id3.Id3Frame>>public com.google.android.exoplayer.chunk.Format getVideoFormat()
public int getPeakBitrate()
public void setPeakBitrate(int peakBitrate)
public com.google.android.exoplayer.upstream.BandwidthMeter getBandwidthMeter()
public void setBandwidthMeter(com.google.android.exoplayer.upstream.BandwidthMeter bandwidthMeter)
public com.google.android.exoplayer.CodecCounters getCodecCounters()
public long getMinBufferDurationToSwitchUp()
public void setMinBufferDurationToSwitchUp(long minBufferDurationToSwitchUp)
public long getMaxBufferDurationToSwitchDown()
public void setMaxBufferDurationToSwitchDown(long maxBufferDurationToSwitchDown)
public int getMinBufferMs()
public void setMinBufferMs(int minBufferMs)
public int getMinRebufferMs()
public void setMinRebufferMs(int minRebufferMs)
public void surfaceCreated(android.view.SurfaceHolder surfaceHolder)
surfaceCreated in class VideoDisplayComponentpublic void surfaceChanged(android.view.SurfaceHolder surfaceHolder,
int format,
int w,
int h)
surfaceChanged in class VideoDisplayComponentpublic void surfaceDestroyed(android.view.SurfaceHolder surfaceHolder)
surfaceDestroyed in class VideoDisplayComponent