[PR #1738] [MERGED] Android cast: stabilize MediaSession volume handling; simplify Google… #1675

Closed
opened 2026-04-25 00:00:33 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf-app/pull/1738
Author: @eagleeyetom
Created: 11/27/2025
Status: Merged
Merged: 2/8/2026
Merged by: @advplyr

Base: masterHead: chromecast-volume-fix-updated


📝 Commits (1)

  • 1a52f19 Android cast: stabilize MediaSession volume handling; simplify Google Cast volume

📊 Changes

2 files changed (+42 additions, -30 deletions)

View changed files

📝 android/app/src/main/java/com/audiobookshelf/app/player/CastPlayer.kt (+32 -9)
📝 android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt (+10 -21)

📄 Description

… Cast volume

Brief summary

Improves the Google Cast functionality to control the volume via a casting device

Which issue is fixed?

Google Cast should now work properly, increment by 1 step and reflect the correct volume.

Pull Request Type

Android

In-depth Description

Use immediate UI updates via VolumeProvider (setCurrentVolume) and dispatch device volume changes without relying on async callbacks.

Simplify Cast volume: remove even-value quantization and step-2 enforcement; add short pending cache (~100ms) to bridge async setVolume.

Align increase/decrease to ±1 to match platform step; clamp to 0..100.

How have you tested this?

APK install -> Cast -> Change volume

Screenshots

N/A


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf-app/pull/1738 **Author:** [@eagleeyetom](https://github.com/eagleeyetom) **Created:** 11/27/2025 **Status:** ✅ Merged **Merged:** 2/8/2026 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `chromecast-volume-fix-updated` --- ### 📝 Commits (1) - [`1a52f19`](https://github.com/advplyr/audiobookshelf-app/commit/1a52f19b329e770fff984ffa4e9964599d077624) Android cast: stabilize MediaSession volume handling; simplify Google Cast volume ### 📊 Changes **2 files changed** (+42 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `android/app/src/main/java/com/audiobookshelf/app/player/CastPlayer.kt` (+32 -9) 📝 `android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt` (+10 -21) </details> ### 📄 Description … Cast volume ## Brief summary Improves the Google Cast functionality to control the volume via a casting device ## Which issue is fixed? Google Cast should now work properly, increment by 1 step and reflect the correct volume. ## Pull Request Type Android ## In-depth Description Use immediate UI updates via VolumeProvider (setCurrentVolume) and dispatch device volume changes without relying on async callbacks. Simplify Cast volume: remove even-value quantization and step-2 enforcement; add short pending cache (~100ms) to bridge async setVolume. Align increase/decrease to ±1 to match platform step; clamp to 0..100. ## How have you tested this? APK install -> Cast -> Change volume ## Screenshots N/A --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:00:33 +02:00
adam closed this issue 2026-04-25 00:00:33 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#1675