public class DebugTextViewHelper
extends com.google.android.exoplayer2.Player.DefaultEventListener
implements java.lang.Runnable
TextView with debug information obtained from
a SimpleExoPlayer.| Constructor and Description |
|---|
DebugTextViewHelper(com.google.android.exoplayer2.SimpleExoPlayer player,
android.widget.TextView textView) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getAudioString()
Returns a string containing audio debugging information.
|
protected java.lang.String |
getDebugString()
Returns the debugging information string to be shown by the target
TextView. |
protected java.lang.String |
getPlayerStateString()
Returns a string containing player state debugging information.
|
protected java.lang.String |
getVideoString()
Returns a string containing video debugging information.
|
void |
onPlayerStateChanged(boolean playWhenReady,
int playbackState) |
void |
onPositionDiscontinuity(int reason) |
void |
run() |
void |
start()
Starts periodic updates of the
TextView. |
void |
stop()
Stops periodic updates of the
TextView. |
protected void |
updateAndPost() |
public DebugTextViewHelper(com.google.android.exoplayer2.SimpleExoPlayer player,
android.widget.TextView textView)
player - The SimpleExoPlayer from which debug information should be obtained.textView - The TextView that should be updated to display the information.public final void start()
TextView. Must be called from the application's main
thread.public final void stop()
TextView. Must be called from the application's main
thread.public final void onPlayerStateChanged(boolean playWhenReady,
int playbackState)
onPlayerStateChanged in interface com.google.android.exoplayer2.Player.EventListeneronPlayerStateChanged in class com.google.android.exoplayer2.Player.DefaultEventListenerpublic final void onPositionDiscontinuity(int reason)
onPositionDiscontinuity in interface com.google.android.exoplayer2.Player.EventListeneronPositionDiscontinuity in class com.google.android.exoplayer2.Player.DefaultEventListenerpublic final void run()
run in interface java.lang.Runnableprotected final void updateAndPost()
protected java.lang.String getDebugString()
TextView.protected java.lang.String getPlayerStateString()
protected java.lang.String getVideoString()
protected java.lang.String getAudioString()