DebugTextViewHelper


class DebugTextViewHelper


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

Summary

Public constructors

DebugTextViewHelper(player: ExoPlayer!, textView: TextView!)

Public functions

Unit

Starts periodic updates of the TextView.

Unit

Stops periodic updates of the TextView.

Protected functions

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.

Unit

Public constructors

DebugTextViewHelper

DebugTextViewHelper(player: ExoPlayer!, textView: TextView!)
Parameters
player: ExoPlayer!

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 functions

start

fun start(): Unit

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

stop

fun stop(): Unit

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

Protected functions

getAudioString

@UnstableApi
protected fun getAudioString(): String!

Returns a string containing audio debugging information.

getDebugString

@UnstableApi
protected fun getDebugString(): String!

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

getPlayerStateString

@UnstableApi
protected fun getPlayerStateString(): String!

Returns a string containing player state debugging information.

getVideoString

@UnstableApi
protected fun getVideoString(): String!

Returns a string containing video debugging information.

updateAndPost

@UnstableApi
protected fun updateAndPost(): Unit