DebugTextViewHelper


public class DebugTextViewHelper


A helper class for periodically updating a TextView with debug information obtained from an ExoPlayer.

Summary

Public constructors

Public methods

final void

Starts periodic updates of the TextView.

final void

Stops periodic updates of the TextView.

Protected methods

String

Returns a string containing audio debugging information.

String

Returns the debugging information string to be shown by the target TextView.

String

Returns a string containing player state debugging information.

String

Returns a string containing video debugging information.

final void

Public constructors

DebugTextViewHelper

public DebugTextViewHelper(ExoPlayer player, TextView textView)
Parameters
ExoPlayer player

The ExoPlayer from which debug information should be obtained. Only players which are accessed on the main thread are supported ( player.getApplicationLooper() == Looper.getMainLooper()).

TextView textView

The TextView that should be updated to display the information.

Public methods

start

public final void start()

Starts periodic updates of the TextView. Must be called from the application's main thread.

stop

public final void stop()

Stops periodic updates of the TextView. Must be called from the application's main thread.

Protected methods

getAudioString

@UnstableApi
protected String getAudioString()

Returns a string containing audio debugging information.

getDebugString

@UnstableApi
protected String getDebugString()

Returns the debugging information string to be shown by the target TextView.

getPlayerStateString

@UnstableApi
protected String getPlayerStateString()

Returns a string containing player state debugging information.

getVideoString

@UnstableApi
protected String getVideoString()

Returns a string containing video debugging information.

updateAndPost

@UnstableApi
protected final void updateAndPost()