|
|
@ -2,7 +2,6 @@ package io.legado.app.service |
|
|
|
|
|
|
|
|
|
|
|
import android.app.PendingIntent |
|
|
|
import android.app.PendingIntent |
|
|
|
import android.media.MediaPlayer |
|
|
|
import android.media.MediaPlayer |
|
|
|
import android.util.Log |
|
|
|
|
|
|
|
import io.legado.app.constant.AppLog |
|
|
|
import io.legado.app.constant.AppLog |
|
|
|
import io.legado.app.constant.EventBus |
|
|
|
import io.legado.app.constant.EventBus |
|
|
|
import io.legado.app.help.AppConfig |
|
|
|
import io.legado.app.help.AppConfig |
|
|
@ -77,7 +76,6 @@ class HttpReadAloudService : BaseReadAloudService(), |
|
|
|
|
|
|
|
|
|
|
|
private fun playNext() { |
|
|
|
private fun playNext() { |
|
|
|
readAloudNumber += contentList[nowSpeak].length + 1 |
|
|
|
readAloudNumber += contentList[nowSpeak].length + 1 |
|
|
|
Log.e("playNext", "$readAloudNumber") |
|
|
|
|
|
|
|
if (nowSpeak < contentList.lastIndex) { |
|
|
|
if (nowSpeak < contentList.lastIndex) { |
|
|
|
nowSpeak++ |
|
|
|
nowSpeak++ |
|
|
|
play() |
|
|
|
play() |
|
|
@ -262,7 +260,7 @@ class HttpReadAloudService : BaseReadAloudService(), |
|
|
|
delay(500) |
|
|
|
delay(500) |
|
|
|
playNext() |
|
|
|
playNext() |
|
|
|
} |
|
|
|
} |
|
|
|
return false |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun onCompletion(mp: MediaPlayer?) { |
|
|
|
override fun onCompletion(mp: MediaPlayer?) { |
|
|
|