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 Waiting on contributor] [$250] Playing video is not paused when opening attachment modal. #40735

Closed
1 of 6 tasks
m-natarajan opened this issue Apr 22, 2024 · 59 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Apr 22, 2024

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: 1.4.64-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @blimpich / @KMichel1030
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1713565853756499

Action Performed:

  1. upload a video
  2. start playing the video
  3. while the first video is playing, upload another video
  4. now try to download the first video that is still playing
  5. click the pause button once on the playing video

Expected Result:

1st video should be downloaded and clicking pause should pause the video.

Actual Result:

video is not downloaded and clicking pause does nothing - Reproduced by @KMichel1030 and @blimpich
NOTE : I can download the video but pause 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

Add any screenshot/video evidence

Screen.Recording.2024-04-20.at.4.27.53.PM.mov
Recording.3024.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01dfbe7a8e20d88932
  • Upwork Job ID: 1782544477695893504
  • Last Price Increase: 2024-05-20
  • Automatic offers:
    • Pujan92 | Reviewer | 0
Issue OwnerCurrent Issue Owner: @JmillsExpensify
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 22, 2024
Copy link

melvin-bot bot commented Apr 22, 2024

Triggered auto assignment to @JmillsExpensify (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.

@blimpich blimpich self-assigned this Apr 22, 2024
@blimpich blimpich added the External Added to denote the issue can be worked on by a contributor label Apr 22, 2024
Copy link

melvin-bot bot commented Apr 22, 2024

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

@melvin-bot melvin-bot bot changed the title Playing video is not paused when opening attachment modal. [$250] Playing video is not paused when opening attachment modal. Apr 22, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 22, 2024
Copy link

melvin-bot bot commented Apr 22, 2024

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

@blimpich blimpich changed the title [$250] Playing video is not paused when opening attachment modal. [$150] Playing video is not paused when opening attachment modal. Apr 22, 2024
Copy link

melvin-bot bot commented Apr 22, 2024

Upwork job price has been updated to $150

@blimpich
Copy link
Contributor

Lowered price since I consider this a low-priority bug.

@alexbautistars12
Copy link
Contributor

alexbautistars12 commented Apr 22, 2024

Proposal

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

  1. Playing video is not paused when opening attachment modal.
  2. We lose control when expanding and collapsing video.

What is the root cause of that problem?

  1. When we upload video, we set currentVideoPlayerRef here.
    currentVideoPlayerRef.current = videoPlayerRef.current;

    But we don't pause previously playing video.

  1. We reset currentlyPlayingURL here when video player is unmounted.
    We shouldn't reset currentlyPlayingURL when video player using shared ref is unmounted.

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

  1. We have to pause video before setting currentVideoPlayerRef.
    Add below part here
if(currentVideoPlayerRef.current) {
    pauseVideo();
}

  1. We have to update this line with if (shouldUseSharedVideoElement || !isCurrentlyURLSetRef.current).

What alternative solutions did you explore? (Optional)

We can just remove this part, as updateCurrentlyPlayingURL is called here and previously playing video will be paused.

When updateCurrentlyPlayingURL is called, below part is run because it has currentlyPlayingURL in dependency array.

useEffect(() => {
if (shouldUseSharedVideoElement || url !== currentlyPlayingURL || isFullScreenRef.current) {
return;
}
shareVideoPlayerElements(videoPlayerRef.current, videoPlayerElementParentRef.current, videoPlayerElementRef.current, isUploading);
}, [currentlyPlayingURL, shouldUseSharedVideoElement, shareVideoPlayerElements, url, isUploading, isFullScreenRef]);

Then in shareVideoPlayerElements() function, video will be paused.

Copy link

melvin-bot bot commented Apr 22, 2024

📣 @KMichel1030! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@Pujan92
Copy link
Contributor

Pujan92 commented Apr 24, 2024

@KMichel1030 Thanks for the proposal but I think the issue isn't pausing the running video on opening the attachment modal. The issue we need to solve is when a user plays the first video and then uploads another video, now user should be able to pause the first playing video by clicking on the pause button. Also download should be worked for the first video.

@blimpich Plz confirm the above issue description

@blimpich
Copy link
Contributor

blimpich commented Apr 24, 2024

@Pujan92 that issue description is correct. @KMichel1030 understands the issue, they just need to articulate the full issue in their proposal and how their solution solves it. @KMichel1030 can you update your proposal to address both the issue of not being able to pause and not being able to download the video (if that part is still reproducible)?

@alexbautistars12
Copy link
Contributor

@blimpich @Pujan92
Thank you for your check.
I'm apologize for not reading the issue description carefully.


  1. upload a video
  2. start playing the video
  3. while the first video is playing, upload another video
  4. click the pause button once on the playing video

When we click the pause button once on the playing video after upload video, updateCurrentlyPlayingURL() is called and then shareVideoPlayerElements() is called because updateCurrentlyPlayingURL() updates currentlyPlayingURL.

Then in shareVideoPlayerElements(), video is played.
So actually current playing video is updated but video is not paused. You can pause video by clicking again.

To resolve this problem, we have to delete auto play in shareVideoPlayerElements() and manage them separately in used parts.
And I think it will cause so many problems here and there.
And regarding current status, I mean, now previously playing video is paused when we play another video so I think it's better to pause video when opening attachment modal from generalization standpoint.

Please let me know your suggestions.

@melvin-bot melvin-bot bot added the Overdue label Apr 26, 2024
Copy link

melvin-bot bot commented Apr 29, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Apr 29, 2024

@JmillsExpensify, @Pujan92, @blimpich Eep! 4 days overdue now. Issues have feelings too...

@Pujan92
Copy link
Contributor

Pujan92 commented Apr 30, 2024

@KMichel1030 We don't need to upload another video to face this issue, it can be reproducible with a single video by expanding and collapsing it.

Screen.Recording.2024-04-30.at.18.48.43.mov

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Apr 30, 2024
@alexbautistars12
Copy link
Contributor

@Pujan92

@KMichel1030 We don't need to upload another video to face this issue, it can be reproducible with a single video by expanding and collapsing it.

Thank you for your check.
This bug is not related with this issue and also has different root cause.
I've updated proposal covering above issue.

cc: @blimpich
I'm wondering if we have to handle above issue as separate one. Please let me know your suggestion.

@blimpich
Copy link
Contributor

blimpich commented May 2, 2024

We don't have to handle it separately if we don't want to. They seem like very similar bugs to me, so I'd be curious to know how much their individual root causes differ from one another. If possible I'd like to fix both in this issue, depending on how different the root cause is.

@melvin-bot melvin-bot bot removed the Overdue label May 2, 2024
@alexbautistars12
Copy link
Contributor

@blimpich
Thank you. I got your point.
BTW, could you please let me know your suggestion about this?

Copy link

melvin-bot bot commented May 29, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented May 29, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.76-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-06-05. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented May 29, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@Pujan92] The PR that introduced the bug has been identified. Link to the PR:
  • [@Pujan92] 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:
  • [@Pujan92] 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:
  • [@Pujan92] Determine if we should create a regression test for this bug.
  • [@Pujan92] 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.
  • [@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 4, 2024
@JmillsExpensify
Copy link

@Pujan92 Mind completing the BZ checklist above?

@Pujan92
Copy link
Contributor

Pujan92 commented Jun 7, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

Regression Test Steps

  1. Play a video in any chat
  2. Open the Add attachment modal and close it without uploading any video
  3. Verify that the playing video is paused

Regression Test Steps(2nd issue)

  1. Play a video in any chat
  2. Expand it first and then collapse it
  3. Verify video controls(pause, download, ...) work correctly

@JmillsExpensify
Copy link

Thanks! Payment summary:

  • Contributor: @KMichel1030 $250
  • Contributor+: @Pujan92 $250

@Pujan92 Can you confirm you are still being paid via Upwork vs New Expensify?

@Pujan92
Copy link
Contributor

Pujan92 commented Jun 7, 2024

@JmillsExpensify It needs to be paid via Upwork. I think by the end of month will be eligible for payment in New Expensify.

@JmillsExpensify
Copy link

Ok thanks for confirming!

📣 @KMichel1030 You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing 📖

@KMichel1030 Please apply to the Upwork job when you have a moment.

@JmillsExpensify
Copy link

@Pujan92 I've paid your contract in Upwork

@melvin-bot melvin-bot bot added the Overdue label Jun 10, 2024
@JmillsExpensify
Copy link

@KMichel1030 friendly reminder to apply for the Upwork job.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jun 10, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

@JmillsExpensify, @Pujan92, @blimpich, @KMichel1030 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Jun 17, 2024

@JmillsExpensify, @Pujan92, @blimpich, @KMichel1030 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@JmillsExpensify
Copy link

Still waiting on contributor.

@melvin-bot melvin-bot bot removed the Overdue label Jun 19, 2024
@JmillsExpensify JmillsExpensify changed the title [HOLD for payment 2024-06-05] [$250] Playing video is not paused when opening attachment modal. [HOLD Waiting on contributor] [$250] Playing video is not paused when opening attachment modal. Jun 19, 2024
@melvin-bot melvin-bot bot added the Overdue label Jun 21, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

@JmillsExpensify, @Pujan92, @blimpich, @KMichel1030 Eep! 4 days overdue now. Issues have feelings too...

@JmillsExpensify
Copy link

Still waiting on contributor.

@melvin-bot melvin-bot bot removed the Overdue label Jun 25, 2024
@alexbautistars12
Copy link
Contributor

@JmillsExpensify
Sorry for late resposne.
Could you please send offer?

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~01275086f4193c6d86

Copy link

melvin-bot bot commented Jun 25, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@JmillsExpensify
Copy link

No worries. Offer sent!

@JmillsExpensify
Copy link

All paid out. Thanks!

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants