From e301b3071cc9c0bbc02054b9e15c19f7b4ddc998 Mon Sep 17 00:00:00 2001 From: advplyr Date: Fri, 19 Apr 2024 14:39:00 -0500 Subject: [PATCH 1/3] Update:Add 1.7x playback speed to modal #1180 --- components/modals/PlaybackSpeedModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/modals/PlaybackSpeedModal.vue b/components/modals/PlaybackSpeedModal.vue index 1e40a814..109527bb 100644 --- a/components/modals/PlaybackSpeedModal.vue +++ b/components/modals/PlaybackSpeedModal.vue @@ -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 From e94d6fdc1e7ae064a9761e3d5d2e6036452fe384 Mon Sep 17 00:00:00 2001 From: advplyr Date: Fri, 19 Apr 2024 16:32:16 -0500 Subject: [PATCH 2/3] Update:Android notification image to not resize #657 --- .../audiobookshelf/app/player/AbMediaDescriptionAdapter.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/android/app/src/main/java/com/audiobookshelf/app/player/AbMediaDescriptionAdapter.kt b/android/app/src/main/java/com/audiobookshelf/app/player/AbMediaDescriptionAdapter.kt index 12cb827a..35a14cf2 100644 --- a/android/app/src/main/java/com/audiobookshelf/app/player/AbMediaDescriptionAdapter.kt +++ b/android/app/src/main/java/com/audiobookshelf/app/player/AbMediaDescriptionAdapter.kt @@ -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() } } From 0f2cd3b132e4a2aec6d9d1c8869fd1aa3048f6c1 Mon Sep 17 00:00:00 2001 From: Marke Hallowell Date: Sat, 13 Apr 2024 23:10:03 -0700 Subject: [PATCH 3/3] Update Now Playing info with correct default rate so that third party apps don't mistake current status as scrubbing. --- ios/App/Shared/player/AudioPlayer.swift | 3 ++- ios/App/Shared/util/NowPlayingInfo.swift | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ios/App/Shared/player/AudioPlayer.swift b/ios/App/Shared/player/AudioPlayer.swift index 2cc60f64..e9086775 100644 --- a/ios/App/Shared/player/AudioPlayer.swift +++ b/ios/App/Shared/player/AudioPlayer.swift @@ -707,12 +707,13 @@ class AudioPlayer: NSObject { duration: currentChapter.getRelativeChapterEndTime(), currentTime: currentChapter.getRelativeChapterCurrentTime(sessionCurrentTime: session.currentTime), rate: rate, + defaultRate: tmpRate, chapterName: currentChapter.title, chapterNumber: (session.chapters.firstIndex(of: currentChapter) ?? 0) + 1, chapterCount: session.chapters.count ) } else if let duration = self.getDuration(), let currentTime = self.getCurrentTime() { - NowPlayingInfo.shared.update(duration: duration, currentTime: currentTime, rate: rate) + NowPlayingInfo.shared.update(duration: duration, currentTime: currentTime, rate: rate, defaultRate: tmpRate) } } diff --git a/ios/App/Shared/util/NowPlayingInfo.swift b/ios/App/Shared/util/NowPlayingInfo.swift index 86ca8ad4..69443fbe 100644 --- a/ios/App/Shared/util/NowPlayingInfo.swift +++ b/ios/App/Shared/util/NowPlayingInfo.swift @@ -53,14 +53,14 @@ class NowPlayingInfo { self.setMetadata(artwork: artwork, metadata: metadata) } } - public func update(duration: Double, currentTime: Double, rate: Float, chapterName: String? = nil, chapterNumber: Int? = nil, chapterCount: Int? = nil) { + public func update(duration: Double, currentTime: Double, rate: Float, defaultRate: Float, chapterName: String? = nil, chapterNumber: Int? = nil, chapterCount: Int? = nil) { // Update on the main to prevent access collisions DispatchQueue.main.async { [weak self] in if let self = self { self.nowPlayingInfo[MPMediaItemPropertyPlaybackDuration] = duration self.nowPlayingInfo[MPNowPlayingInfoPropertyElapsedPlaybackTime] = currentTime self.nowPlayingInfo[MPNowPlayingInfoPropertyPlaybackRate] = rate - self.nowPlayingInfo[MPNowPlayingInfoPropertyDefaultPlaybackRate] = 1.0 + self.nowPlayingInfo[MPNowPlayingInfoPropertyDefaultPlaybackRate] = defaultRate if let chapterName = chapterName, let chapterNumber = chapterNumber, let chapterCount = chapterCount {