Skip to content

Temporary fix for video not playing in landscape mode #3823

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

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

ashiagr
Copy link
Contributor

@ashiagr ashiagr commented Mar 28, 2025

Description

This temporarily fixes video not playing in landscape mode issue.

It appears there was a race condition where the video view's surface was destroyed immediately after creation while transitioning from portrait to landscape mode. That caused the video to appear black or frozen.

I've added a small delay so that the surface is in a stable state before attachment. While it improves the behavior while transitioning between portrait and landscape mode, I've noticed that the picture-in-picture mode may still have the issue.

Partially fixes #3807

Testing Instructions

  1. Play a video (eg. from Ted Talks HD)
  2. Rotate the device
  3. ✅ Notice that the video keep playing

Screenshots or Screencast

before.webm
after.webm

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md (not adding a changelog as it doesn't fix the issue entirely)
  • 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.

I have tested any UI changes...

  • with different themes
  • with a landscape orientation
  • with the device set to have a large display and font size
  • for accessibility with TalkBack

@ashiagr ashiagr added [Type] Bug Not functioning as intended. [Area] Playback Episode playback issue labels Mar 28, 2025
@ashiagr ashiagr added this to the 7.86 milestone Mar 28, 2025
@ashiagr ashiagr requested a review from a team as a code owner March 28, 2025 13:13
@ashiagr ashiagr requested review from mebarbosa and removed request for a team March 28, 2025 13:13
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Mar 28, 2025

📲 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
Commite793e9c
Direct Downloadpocketcasts-app-prototype-build-pr3823-e793e9c.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
Commite793e9c
Direct Downloadpocketcasts-automotive-prototype-build-pr3823-e793e9c.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
Commite793e9c
Direct Downloadpocketcasts-wear-prototype-build-pr3823-e793e9c.apk

Copy link
Contributor

@mebarbosa mebarbosa left a comment

Choose a reason for hiding this comment

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

It's working as expected! Thanks for the fix

@mebarbosa mebarbosa enabled auto-merge (squash) March 28, 2025 13:22
@mebarbosa mebarbosa merged commit f20d127 into main Mar 28, 2025
20 of 22 checks passed
@mebarbosa mebarbosa deleted the fix/3807-fix-landscape-mode-video-play branch March 28, 2025 13:42
ashiagr added a commit that referenced this pull request Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Area] Playback Episode playback issue [Type] Bug Not functioning as intended.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Video Pauses when Orientation is set to Landscape while in Picture-in-Picture mode
3 participants