Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val onEverySecond = object : Runnable {
- override fun run() {
- if (exoPlayer != null) {
- if (phrases.isNotEmpty()) {
- try {
- if (exoPlayer?.currentPosition ?: 0 >= audioDuration || exoPlayer?.playWhenReady == false) {
- Timber.e("Stop self")
- }
- else {
- Handler().postDelayed(this, EVERY_SECOND_DELAY)
- sendUpdateSeekBar(exoPlayer?.currentPosition?.toInt()!!)
- updateFlowButtons()
- sendUpdateTimeText()
- sendUpdatePhrase()
- }
- } catch (e: IllegalStateException) { }
- }
- }
- else { }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement