You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Awaiting Contributor Response for Payment - Payment 27th June] [$250] Incorrect video is paused after turning on and off full screen mode #42427
changed the title [-]Incorrect video is paused after turning on and off full screen mode[/-][+][$250] Incorrect video is paused after turning on and off full screen mode[/+]on May 21, 2024
Please re-state the problem that we are trying to solve in this issue.
Incorrect video is paused after turning on and off full screen mode
What is the root cause of that problem?
When entering full screen mode, currentlyPlayingURL is updated, but currentVideoPlayerRef is not updated because we have isFullScreenRef check here.
Since we use currentVideoPlayerRef when play and pause video, incorrect video is paused.
What changes do you think we should make in order to solve the problem?
We should remove isFullScreenRef check here.
We also need to modify last parameter of this line to prevent auto play when entering full screen mode.
What alternative solutions did you explore? (Optional)
📣 @jacobnguyen0000! 📣
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:
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.
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.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
Let say we have two video A and B.
When we play B then enter the fullscreen mode with A, we call updateCurrentlyPlayingURL in here and we do not call shareVideoPlayerElements in here. Now currentlyPlayingURL refers to A, but currentVideoPlayerRef refers to B.
Then, after we turn off fullscreen mode, currentlyPlayingURL still refers to A, but currentVideoPlayerRef still refers to B.
So when we click on the "Play" button in A, in here, because isCurrentlyURLSet is true, so the updateCurrentlyPlayingURL(url) is not called.
So this useEffect is not called because one of its dependences, currentlyPlayingURL is not updated. That leads to currentVideoPlayerRef still refers to B. That why we click on "Play" button in A, B is played.
What changes do you think we should make in order to solve the problem?
In here, we should create a new param, named shouldPlayVideo, and update logic:
Cool, dropped to weekly. I'll likely just close this after a couple of weeks, and @jacobnguyen0000 can let me know when he's back if he wants to get paid.
Activity
melvin-bot commentedon May 21, 2024
Triggered auto assignment to @trjExpensify (
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.trjExpensify commentedon May 21, 2024
@KMichel1030 are you interesting in proposing a solution for this?
[-]Incorrect video is paused after turning on and off full screen mode[/-][+][$250] Incorrect video is paused after turning on and off full screen mode[/+]melvin-bot commentedon May 21, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0153a7421c659e1e1b
melvin-bot commentedon May 21, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)jacobnguyen0000 commentedon May 21, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Incorrect video is paused after turning on and off full screen mode
What is the root cause of that problem?
When entering full screen mode,
currentlyPlayingURLis updated, butcurrentVideoPlayerRefis not updated because we haveisFullScreenRefcheck here.Since we use
currentVideoPlayerRefwhen play and pause video, incorrect video is paused.What changes do you think we should make in order to solve the problem?
We should remove
isFullScreenRefcheck here.We also need to modify last parameter of this line to prevent auto play when entering full screen mode.
What alternative solutions did you explore? (Optional)
melvin-bot commentedon May 21, 2024
📣 @jacobnguyen0000! 📣
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:
Format:
tienifr commentedon May 22, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
Let say we have two video A and B.
When we play B then enter the fullscreen mode with A, we call
updateCurrentlyPlayingURLin here and we do not callshareVideoPlayerElementsin here. NowcurrentlyPlayingURLrefers to A, butcurrentVideoPlayerRefrefers to B.Then, after we turn off fullscreen mode,
currentlyPlayingURLstill refers to A, butcurrentVideoPlayerRefstill refers to B.So when we click on the "Play" button in A, in here, because
isCurrentlyURLSetistrue, so theupdateCurrentlyPlayingURL(url)is not called.So this useEffect is not called because one of its dependences,
currentlyPlayingURLis not updated. That leads tocurrentVideoPlayerRefstill refers to B. That why we click on "Play" button in A, B is played.What changes do you think we should make in order to solve the problem?
shouldPlayVideo, and update logic:App/src/components/VideoPlayerContexts/PlaybackContext.tsx
Lines 59 to 61 in e8ae3c5
to:
shouldPlayVideo: falseWhat alternative solutions did you explore? (Optional)
updateCurrentlyPlayingURL(null)in here to reset the currently playing url.62 remaining items
trjExpensify commentedon Jul 8, 2024
Cool, dropped to weekly. I'll likely just close this after a couple of weeks, and @jacobnguyen0000 can let me know when he's back if he wants to get paid.
trjExpensify commentedon Jul 19, 2024
Closing.
jacobnguyen0000 commentedon Aug 6, 2024
Hi, @trjExpensify
Sorry for late response. Can I get payment now?
Contributor details
Your Expensify account email: jacobnguyen0000@outlook.com
Upwork Profile Link: https://www.upwork.com/freelancers/~014cac515a92876fc5
melvin-bot commentedon Aug 6, 2024
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
jacobnguyen0000 commentedon Aug 7, 2024
@mallenexpensify
It seems @trjExpensify is not here.
Could you please complete payment here?
trjExpensify commentedon Aug 7, 2024
Sent an offer.
jacobnguyen0000 commentedon Aug 7, 2024
Thank you, @trjExpensify.
I've accepted offer.
trjExpensify commentedon Aug 7, 2024
Paid!