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

[HOLD for payment 2024-03-04] [$500] Video - On full screen mode, when the video ends, the play button does nothing #36865

Closed
1 of 6 tasks
izarutskaya opened this issue Feb 20, 2024 · 23 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@izarutskaya
Copy link

izarutskaya commented Feb 20, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v1.4.43-0
Reproducible in staging?: Y
Reproducible in production?: N
Email or phone of affected tester (no customers): vdargentotest+ios021924@gmail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation:

Action Performed:

Pre-requisite: the user should be logged in.

  1. Go to any chat.
  2. Send a video.
  3. Tap on the video.
  4. Tap on the full screen icon.
  5. Wait for the video to end.
  6. Tap on the play button.

Expected Result:

The video should be restarted.

Actual Result:

The play button does nothing.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6385355_1708408537798.Hhvs7775_1_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012225fc83456fd541
  • Upwork Job ID: 1759896721297903616
  • Last Price Increase: 2024-02-20
  • Automatic offers:
    • jjcoffee | Reviewer | 0
    • tienifr | Contributor | 0
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

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

@melvin-bot melvin-bot bot changed the title Video - On full screen mode, when the video ends, the play button does nothing [$500] Video - On full screen mode, when the video ends, the play button does nothing Feb 20, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

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

Copy link

melvin-bot bot commented Feb 20, 2024

Triggered auto assignment to @greg-schroeder (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 20, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Feb 20, 2024

Triggered auto assignment to @rlinoz (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@izarutskaya
Copy link
Author

We think that this bug might be related to #vip-vsb
CC @quinthar

@tienifr
Copy link
Contributor

tienifr commented Feb 20, 2024

Proposal

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

The play button does nothing.

What is the root cause of that problem?

In full screen mode, it will use device's native video implementation, we currently don't have any logic to replay the video if play button is clicked after the video ends. We only have that logic for non-fullscreen mode here.

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

Add the logic to replay the video if play button is clicked after the video ends in full screen mode.

In this case, the onPlaybackStatusUpdate of the video will be triggered with isPlaying: true and durationMillis being equal to positionMillis (because the videos already ends before).

We just need to compare the isPlaying with its previous value and trigger replay the video if this case is detected.

In here

if (isPlaying === false && e.isPlaying === true && duration === position) {
    videoPlayerRef.current.setStatusAsync({positionMillis: 0, shouldPlay: true});
}

And isPlaying, duration, position needs to be added into the dependencies list here, if we don't want to add into dependencies list, we can use usePrevious on the isPlaying instead, and use the duration and position from the event object.

We can further isolate the above logic to run only if the video is in full screen mode, if we want to.

(Above is also the approach recommended by the library author here)

What alternative solutions did you explore? (Optional)

For Android the condition could be slightly different (due to platform implementation details), instead of e.isPlaying === true we can check that e.didJustFinish === false

@rlinoz
Copy link
Contributor

rlinoz commented Feb 20, 2024

Hmmm so this should happen in prod as well, right @tienifr ?

Or did we just merge the new feature?

@rlinoz
Copy link
Contributor

rlinoz commented Feb 20, 2024

Ok it is a new feature, so related to this PR #30829

cc: @francoisl, @Skalakid, @akinwale

@tienifr's proposal makes sense to me, what do you think @jjcoffee?

@jjcoffee
Copy link
Contributor

@rlinoz Agreed, @tienifr's solution makes sense!

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Feb 20, 2024

Current assignee @rlinoz is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@rlinoz
Copy link
Contributor

rlinoz commented Feb 20, 2024

Nice, assigning @tienifr then, do you think you can raise a quick PR for this?

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

melvin-bot bot commented Feb 20, 2024

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

Offer link
Upwork job

Copy link

melvin-bot bot commented Feb 20, 2024

📣 @tienifr 🎉 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 📖

@tienifr
Copy link
Contributor

tienifr commented Feb 20, 2024

Sure.

@rlinoz
Copy link
Contributor

rlinoz commented Feb 22, 2024

This is CP'd so removing the blocker.

@rlinoz rlinoz removed the DeployBlockerCash This issue or pull request should block deployment label Feb 22, 2024
@tienifr
Copy link
Contributor

tienifr commented Mar 1, 2024

@greg-schroeder PR hit production. Melvin is malfunctioning. Please add HOLD for payment label.

@rlinoz rlinoz added Awaiting Payment Auto-added when associated PR is deployed to production and removed Awaiting Payment Auto-added when associated PR is deployed to production labels Mar 1, 2024
@rlinoz
Copy link
Contributor

rlinoz commented Mar 1, 2024

Ok I am removing the label because I am not sure what date to put in the title

@greg-schroeder
Copy link
Contributor

Deployed 2/26, payment date will be 3/4

@greg-schroeder greg-schroeder added the Awaiting Payment Auto-added when associated PR is deployed to production label Mar 1, 2024
@greg-schroeder greg-schroeder changed the title [$500] Video - On full screen mode, when the video ends, the play button does nothing [HOLD for payment 2024-03-04] [$500] Video - On full screen mode, when the video ends, the play button does nothing Mar 1, 2024
@greg-schroeder greg-schroeder removed the Reviewing Has a PR in review label Mar 2, 2024
@jjcoffee jjcoffee mentioned this issue Mar 5, 2024
58 tasks
@jjcoffee
Copy link
Contributor

jjcoffee commented Mar 5, 2024

  • The PR that introduced the bug has been identified. Link to the PR: Video player #30829
  • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: Video player #30829 (comment)
  • A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
  • Determine if we should create a regression test for this bug. Yes
  • If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Proposal

  1. Go to any chat.
  2. Send a video.
  3. Tap on the video.
  4. Tap on the full screen icon.
  5. Wait for the video to end.
  6. Tap on the play button.
  7. Verify that the video is restarted.

Do we agree 👍 or 👎

@jjcoffee
Copy link
Contributor

jjcoffee commented Mar 5, 2024

@greg-schroeder Checklist complete!

@greg-schroeder
Copy link
Contributor

Thanks! Sorry I was out yesterday, will take care of this today

@greg-schroeder
Copy link
Contributor

Paid, regression test filed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants