This commit is contained in:
Horis
2023-06-20 19:39:22 +08:00
parent d3f3912532
commit a4009ff87a
2 changed files with 5 additions and 3 deletions

View File

@@ -135,7 +135,7 @@ class HttpReadAloudService : BaseReadAloudService(),
launch(Main) {
exoPlayer.addMediaItem(mediaItem)
if (!exoPlayer.isPlaying && nowSpeak == index) {
exoPlayer.playWhenReady = true
exoPlayer.playWhenReady = !pause
exoPlayer.prepare()
}
}

View File

@@ -11,6 +11,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:singleLine="true"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0"
@@ -25,12 +26,13 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:singleLine="true"
android:textColor="@color/secondaryText"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintLeft_toRightOf="@id/cb_source_name"
app:layout_constraintRight_toLeftOf="@id/tv_open"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_chainStyle="packed" />
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_open"