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

[$250] Android - Chat - In android, paused video starts playing when full screen mode enabled #55965

Open
2 of 8 tasks
vincdargento opened this issue Jan 29, 2025 · 19 comments
Open
2 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@vincdargento
Copy link

vincdargento commented Jan 29, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: V9.0.91-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: Redmi note 10s android 13
App Component: Chat Report View

Action Performed:

  1. Launch app in both mWeb and Android
  2. Log in via Gmail account using track and budget expenses
  3. Go to Reports - Chat - Attachment
  4. Open attachment in mWeb
  5. Pause the video
  6. Go to full screen mode
  7. Video remains paused on full screen mode
  8. In Android app, open attachment
  9. Pause the video
  10. Go to full screen mode

Expected Result:

In Android, paused video must not start playing in full screen mode.

Actual Result:

In Android, paused video starts playing in full screen mode automatically but in mWeb video remains paused.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021885097988338548808
  • Upwork Job ID: 1885097988338548808
  • Last Price Increase: 2025-01-30
  • Automatic offers:
    • linhvovan29546 | Contributor | 106015322
Issue OwnerCurrent Issue Owner: @eVoloshchak
@vincdargento vincdargento added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Jan 29, 2025
Copy link

melvin-bot bot commented Jan 29, 2025

Triggered auto assignment to @kadiealexander (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@linhvovan29546
Copy link
Contributor

linhvovan29546 commented Jan 30, 2025

Proposal

Please re-state the problem that we are trying to solve in this issue.

Android - Chat - In android, paused video starts playing when full screen mode enabled

What is the root cause of that problem?

The issue originates from PR #37674, where we handle video playback inside onReadyForDisplay. According to the Expo documentation:

A function to be called when the video is ready for display. Note that this function gets called whenever the video's natural size changes.

onReadyForDisplay={(e) => {
if (isCurrentlyURLSet && !isUploading) {
playVideo();
}

This function is triggered when fullscreen mode is enabled as well, causing playVideo to be called and the video to start playing unexpectedly.

What changes do you think we should make in order to solve the problem?

We should handle playVideo inside onLoad instead of onReadyForDisplay

onReadyForDisplay={(e) => {
if (isCurrentlyURLSet && !isUploading) {
playVideo();
}

<Video>
//other props
....
onLoad={() => {
    if (isCurrentlyURLSet && !isUploading) {
        playVideo();
    }
  }}
</Video>

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A

What alternative solutions did you explore? (Optional)

N/A
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@kadiealexander
Copy link
Contributor

Android <> iOS bug swap

@jliexpensify
Copy link
Contributor

Coming from this comment, it sounds like when rotated to full-screen, we should just leave the video paused. So the mWeb behaviour is correct.

The issue originates from PR #37674

@mountiny, @Skalakid and @eVoloshchak did you want to handle this, or leave it for External Contributors?

@mountiny
Copy link
Contributor

I think we can handle this in a normal bug flow and export it, the original PR is old

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Jan 30, 2025
@melvin-bot melvin-bot bot changed the title Android - Chat - In android, paused video starts playing when full screen mode enabled [$250] Android - Chat - In android, paused video starts playing when full screen mode enabled Jan 30, 2025
Copy link

melvin-bot bot commented Jan 30, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021885097988338548808

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 30, 2025
Copy link

melvin-bot bot commented Jan 30, 2025

Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External)

Copy link

melvin-bot bot commented Feb 3, 2025

@eVoloshchak, @jliexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Feb 3, 2025
@jliexpensify
Copy link
Contributor

Bumping @eVoloshchak to review proposals please

Copy link

melvin-bot bot commented Feb 5, 2025

@eVoloshchak, @jliexpensify Eep! 4 days overdue now. Issues have feelings too...

@jliexpensify
Copy link
Contributor

Bumped Eugene in Slack

@eVoloshchak
Copy link
Contributor

@linhvovan29546's proposal looks good to me!

We have to make sure to include the tests from #37674 too,

🎀👀🎀 C+ reviewed!

@melvin-bot melvin-bot bot removed the Overdue label Feb 5, 2025
Copy link

melvin-bot bot commented Feb 5, 2025

Triggered auto assignment to @mountiny, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 6, 2025
Copy link

melvin-bot bot commented Feb 6, 2025

📣 @linhvovan29546 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@linhvovan29546
Copy link
Contributor

linhvovan29546 commented Feb 6, 2025

@jliexpensify @mountiny @eVoloshchak FYI, while testing on web/desktop, I noticed two issues unrelated to this GitHub issue:

  1. Unable to play video previews in search and when opening RHN.
  2. When opening an attachment video in RHN from search, it loads indefinitely.

Steps:

  1. Open https://staging.new.expensify.com/search?q=type%3Achat%20status%3Aall%20sortBy%3Adate%20sortOrder%3Adesc
  2. Click Video Thumbnail.

NOTE: The issue occurs only on web/desktop. Details are provided in the video below.

Screen.Recording.2025-02-06.at.5.19.25.PM.mov

I can fix that by remove fallbackID here

reportID={currentReportIDValue?.currentReportID ?? '-1'}

     reportID={currentReportIDValue?.currentReportID ?? report?.reportID}

@mountiny
Copy link
Contributor

mountiny commented Feb 6, 2025

@linhvovan29546 if they exist in production can you please report in slack

@linhvovan29546
Copy link
Contributor

I don't have access to Slack. I can reproduce it in staging, but I think it also exists in production

@mountiny
Copy link
Contributor

mountiny commented Feb 6, 2025

@eVoloshchak CAn you please report it in Slack instead of @linhvovan29546 ?

@linhvovan29546 can you continue with the PR implementation please?

@linhvovan29546
Copy link
Contributor

PR is ready for review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants