Merge branch 'master' into rate-manager

This commit is contained in:
advplyr 2024-04-27 16:06:20 -05:00 committed by GitHub
commit 124300b215
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 6 deletions

View file

@ -15,8 +15,6 @@ import com.google.android.exoplayer2.Player
import com.google.android.exoplayer2.ui.PlayerNotificationManager
import kotlinx.coroutines.*
const val NOTIFICATION_LARGE_ICON_SIZE = 144 // px
class AbMediaDescriptionAdapter constructor(private val controller: MediaControllerCompat, private val playerNotificationService: PlayerNotificationService) : PlayerNotificationManager.MediaDescriptionAdapter {
private val tag = "MediaDescriptionAdapter"
@ -77,7 +75,7 @@ class AbMediaDescriptionAdapter constructor(private val controller: MediaControl
.load(uri)
.placeholder(R.drawable.icon)
.error(R.drawable.icon)
.submit(NOTIFICATION_LARGE_ICON_SIZE, NOTIFICATION_LARGE_ICON_SIZE)
.submit()
.get()
} catch (e: Exception) {
e.printStackTrace()
@ -85,7 +83,7 @@ class AbMediaDescriptionAdapter constructor(private val controller: MediaControl
Glide.with(playerNotificationService)
.asBitmap()
.load(Uri.parse("android.resource://${BuildConfig.APPLICATION_ID}/" + R.drawable.icon))
.submit(NOTIFICATION_LARGE_ICON_SIZE, NOTIFICATION_LARGE_ICON_SIZE)
.submit()
.get()
}
}

View file

@ -71,7 +71,7 @@ export default {
}
},
rates() {
return [0.5, 1, 1.2, 1.5, 2, 3]
return [0.5, 1, 1.2, 1.5, 1.7, 2, 3]
},
canIncrement() {
return this.playbackRate + 0.1 <= this.MAX_SPEED

View file

@ -693,7 +693,6 @@ class AudioPlayer: NSObject {
duration: currentChapter.getRelativeChapterEndTime(),
currentTime: currentChapter.getRelativeChapterCurrentTime(sessionCurrentTime: session.currentTime),
rate: self.rateManager.rate,
defaultRate: self.rateManager.defaultRate,
chapterName: currentChapter.title,
chapterNumber: (session.chapters.firstIndex(of: currentChapter) ?? 0) + 1,
chapterCount: session.chapters.count