Skip to content

Bckp/cast currently#483

Merged
theovilardo merged 55 commits intomasterfrom
bckp/cast-currently
Dec 10, 2025
Merged

Bckp/cast currently#483
theovilardo merged 55 commits intomasterfrom
bckp/cast-currently

Conversation

@theovilardo
Copy link
Copy Markdown
Owner

No description provided.

theovilardo and others added 30 commits December 4, 2025 17:26
- Fixed compilation errors in `MediaFileHttpServerService` by correcting `ContentRange` logic and ensuring safe access to nullable `ranges`.
- Implemented correct `TailFrom` range calculation logic (`range.from` to `fileSize - 1`).
- Ensured resource safety by using `.use` for `ParcelFileDescriptor`.
- Verified and corrected Ktor imports for `HttpStatusCode`, `ContentRange`, and headers.
- Corrected usage of Ktor `RangesSpecifier` and `ContentRange` logic in `MediaFileHttpServerService` to properly handle partial content requests.
- Fixed return type handling for `parseRangesSpecifier` (using `rangesSpecifier?.ranges` and proper null checks).
- Replaced the nonexistent `RangeNotSatisfiable` status code with `RequestedRangeNotSatisfiable` (416).
- Corrected the byte range calculation logic for `TailFrom` requests.
- Switched to `inputStream.readNBytes` for reading precise chunks, ensuring correct data is served for seek operations.
- Ensured `ConnectivityManager` import is present.
Annotate MediaFileHttpServerService with Tiramisu API requirement
…-remote-playback

Improve cast queue display and add cast connecting state
A `toImmutableList()` call has been added to ensure the remote queue is immutable, preventing potential crashes. A new `isConnecting` parameter has also been added to the `CastBottomSheet`.
…mote-to-local-playback

Fix local player state after cast disconnect
- Add a disconnect icon for the cast bottom sheet.
- Refine the `ActiveDeviceHero` layout in `CastBottomSheet` for better alignment and sizing of the device icon and text content.
- Update the disconnect button in the `ActiveDeviceHero` to use the new icon and adjust its colors.
- Tweak the styling and layout of `AvailableDeviceItem` and other minor UI elements within the bottom sheet.
- In the full player, adjust the layout and animation of the cast button to improve text visibility and alignment.
- Change the color of the "connected" indicator dot to green.
…itions

This change ensures a seamless visual transition between local and remote playback by:
1. Preventing `stablePlayerState.currentSong` from being nulled out during the handover process in `PlayerViewModel`, effectively persisting the last known song state.
2. Modifying `UnifiedPlayerSheet` to stay visible if `isCastConnecting` is true, even if the player temporarily reports no active song.
3. Adding a "Connecting..." visual state to both the Mini Player and Full Player components to provide immediate user feedback.
4. Delaying the reset of the `isCastConnecting` flag until the local player is fully restored when disconnecting from Cast.
Fix player UI disappearing during Cast transition
…atus

*   Consolidated the "Active Device" card subtitles into a single text line to avoid redundancy.
*   Redesigned Wi-Fi and Bluetooth indicators as large "Quick Settings" style pills and moved them to the top of the sheet.
*   Updated the "Turn on Wi-Fi" button to launch system Wi-Fi settings via `Settings.ACTION_WIFI_SETTINGS`.
*   Cleaned up unused `ServiceDot` component and previous indicator implementation.
google-labs-jules bot and others added 24 commits December 9, 2025 00:16
- Added `ACCESS_FINE_LOCATION` and `ACCESS_COARSE_LOCATION` to `AndroidManifest.xml` to enable fetching the connected Wi-Fi SSID on Android 8.1+.
- Updated `PlayerViewModel` to expose `wifiName` and `bluetoothName` StateFlows.
  - Implemented `ConnectivityManager.NetworkCallback` logic to attempt to retrieve SSID (gracefully handling redaction if permissions are missing).
  - Implemented `AudioManager.AudioDeviceCallback` to detect and display the name of connected Bluetooth audio devices (A2DP, SCO, BLE).
- Updated `CastBottomSheet` UI:
  - `QuickSettingTile` now accepts a `subtitle` to display the connected network/device name or "On"/"Off".
  - Added click handlers to the Wi-Fi and Bluetooth tiles to open their respective system settings via Intents.
  - Updated layout to accommodate the new information.
- Added `ACCESS_FINE_LOCATION` and `ACCESS_COARSE_LOCATION` to `AndroidManifest.xml` to enable fetching the connected Wi-Fi SSID on Android 8.1+.
- Updated `PlayerViewModel` to expose `wifiName` and `bluetoothName` StateFlows.
  - Implemented `ConnectivityManager.NetworkCallback` logic to attempt to retrieve SSID (gracefully handling redaction if permissions are missing).
  - Implemented `AudioManager.AudioDeviceCallback` to detect and display the name of connected Bluetooth audio devices (A2DP, SCO, BLE).
- Updated `CastBottomSheet` UI:
  - `QuickSettingTile` now accepts a `subtitle` to display the connected network/device name or "On"/"Off".
  - Added click handlers to the Wi-Fi and Bluetooth tiles to open their respective system settings via Intents.
  - Updated layout to accommodate the new information.
This commit refactors and visually enhances the Cast bottom sheet and related player components.

Key changes include:
- Refined the visual design and layout of the "Connect device" card.
- Updated color schemes and shapes for better consistency.
- Removed the "Connecting..." text from the full player header.
- Cleaned up and removed obsolete commented-out code.
…ity-info-15220278969080433240

Enhance cast sheet connectivity info 15220278969080433240
- Update `PlayerViewModel.updateWifiInfo` to use `WifiManager.getConnectionInfo` as a fallback when `NetworkCapabilities` fails to return an SSID (e.g., due to permission or API level nuances).
- Update `PlayerViewModel.updateBluetoothName` to include `TYPE_HEARING_AID` and ensure it runs on `ACTION_ACL_CONNECTED` and `ACTION_ACL_DISCONNECTED` events for more reliable updates.
- This ensures the UI correctly displays the connected network name and audio device name as requested.
- Update `PlayerViewModel.updateWifiInfo` to use `WifiManager.getConnectionInfo` as a fallback when `NetworkCapabilities` fails to return an SSID (e.g., due to permission or API level nuances).
- Update `PlayerViewModel.updateBluetoothName` to include `TYPE_HEARING_AID` and ensure it runs on `ACTION_ACL_CONNECTED` and `ACTION_ACL_DISCONNECTED` events for more reliable updates.
- Update `CastBottomSheet.kt` to use the SSID and Bluetooth device name as the Tile Labels (replacing "Wi-Fi" / "Bluetooth") when connected.
- Update `ActiveDeviceHero` in `CastBottomSheet.kt` to display the Bluetooth device name and icon when connected, improving visibility of the active audio output.
…i-tiles-updates

Codex/fix bluetooth and wi fi tiles updates
…s-to-castbottomsheet

Add cast connecting animations and refresh indicator
This commit refactors several UI components within the CastBottomSheet for a cleaner and more dynamic presentation.

Key changes include:
- Redesigned `DeviceItem` to use a `Row` and `Column` layout instead of `ListItem`, improving alignment and spacing.
- Refined the `InfoTile` design with animated colors for the active state and a smooth corner shape.
- Adjusted padding, spacers, and corner rounding throughout the bottom sheet for a more polished look.
…-conectividad-bluetooth

Add Bluetooth device UI and cast autoplay toggle
This commit refactors several UI components within the CastBottomSheet for a cleaner and more dynamic presentation.

Key changes include:
- Redesigned `DeviceItem` to use a `Row` and `Column` layout instead of `ListItem`, improving alignment and spacing.
- Refined the `InfoTile` design with animated colors for the active state and a smooth corner shape.
- Adjusted padding, spacers, and corner rounding throughout the bottom sheet for a more polished look.
…tion-behavior

Adjust cast sheet connectivity placeholder
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

https://github.com/theovilardo/PixelPlay/blob/8979aa94cc688b69b6387bc7b51649795bdc6dbf/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlayerViewModel.kt#L3881-L3884
P1 Badge Refresh drops Cast route discovery

The new Cast support adds CastMediaControlIntent.categoryForCast(...) to the media route selector during initialization, but refreshCastRoutes() still rebuilds the selector with only MediaControlIntent.CATEGORY_REMOTE_PLAYBACK. After a user taps refresh, the media router stops discovering Cast-specific routes, so existing Chromecast devices disappear from the list until the app is restarted. The selector here should include the Cast category as well.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@theovilardo theovilardo merged commit 0b44529 into master Dec 10, 2025
@lostf1sh lostf1sh deleted the bckp/cast-currently branch January 16, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant