Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] Fix: Casting not working correctly to Google Devices #3394

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mebarbosa
Copy link
Contributor

@mebarbosa mebarbosa commented Dec 26, 2024

Description

  • This is an attempt to fix the reported chromecast issues:

Pocket Cast pauses less than a second into playing a podcast through Chromecast. Hit play, and it starts for a half second again and immediately pauses

  • In my investigations, I noticed that we are receiving the stop command from MediaSession when casting an episode, and this is causing the episode to stop. We are overriding the stop method in MediaSessionManager.kt, which stops the episode when this command is received. However, upon reviewing the code, I noticed that this overridden stop method is being called only when attempting to cast an episode. It is not being triggered for the App, Wear, or Automotive platforms, as suggested by the comments in the stop method. All platforms call the pause method instead
  • If I remove this method, the Chromecast issue is resolved, and all platforms continue to work as expected. I performed a smoke test on the app by interacting with playback through various sources, such as the notification media center, the now playing screen, Wear OS, and automotive, and confirmed that everything functions correctly, so my propose is to remove this method.
  • ⚠️ I was not able to reproduce the same reported scenario the users are reporting because I don't have a Google Nest. What I used to cast was my Tv and the behavior I got was this one:
  1. Have some episode playing
  2. Open Now Playing
  3. Tap on the 3 dots
  4. Chromecast
  5. Select the device to cast
  6. In my case, the episode was paused here like the users reported
  7. So I pressed play again and I was able to play the episode as expected. What our users are reporting is that this step don't work for them
  • I opened this thread so we can discuss about this @Automattic/pocket-casts-android : p1735230022595629-slack-C07J5LNP4SF

Fixes #3321

Testing Instructions

  1. Have some episode playing
  2. Open Now Playing
  3. Tap on the 3 dots
  4. Chromecast
  5. Select the device to cast
  6. The episode should continue playing in the selected device ✅

Screenshots or Screencast

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews
  • I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.

@mebarbosa mebarbosa added this to the 7.80 milestone Dec 26, 2024
@dangermattic
Copy link
Collaborator

1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Dec 26, 2024

📲 You can test the changes from this Pull Request in 📱 Mobile by scanning the QR code below to install the corresponding build.
App Name 📱 Mobile
Build TypedebugProd
Commit5ce4d9a
Direct Downloadpocketcasts-app-prototype-build-pr3394-5ce4d9a.apk
📲 You can test the changes from this Pull Request in 🚗 Automotive by scanning the QR code below to install the corresponding build.
App Name 🚗 Automotive
Build TypedebugProd
Commit5ce4d9a
Direct Downloadpocketcasts-automotive-prototype-build-pr3394-5ce4d9a.apk
📲 You can test the changes from this Pull Request in ⌚ Wear by scanning the QR code below to install the corresponding build.
App Name ⌚ Wear
Build TypedebugProd
Commit5ce4d9a
Direct Downloadpocketcasts-wear-prototype-build-pr3394-5ce4d9a.apk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Casting not working correctly to Google Devices
3 participants