-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Incorrect video is paused after turning on and off full screen mode #43025
Conversation
@hoangzinh Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
return; | ||
} | ||
shareVideoPlayerElements(videoPlayerRef.current, videoPlayerElementParentRef.current, videoPlayerElementRef.current, isUploading); | ||
}, [currentlyPlayingURL, shouldUseSharedVideoElement, shareVideoPlayerElements, url, isUploading, isFullScreenRef]); | ||
shareVideoPlayerElements(videoPlayerRef.current, videoPlayerElementParentRef.current, videoPlayerElementRef.current, isUploading || isFullScreenRef.current); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jacobnguyen0000 why do we need to check isFullScreenRef.current here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hoangzinh
Let's assume this test case.
- Upload two videos (Video1, Video2)
- Play Video1
- Play Video2
- Click full screen mode button of Video1 while Video2 is playing
In this case, Video1 is auto played when entering fullscreen mode without isFullScreenRef
check.
I thought this is not the result that we expect.
Adding isFullScreenRef.current
prevent auto playing in above steps, as last parameter of shareVideoPlayerElements
is determining whether play or not play play.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for update I will take a look at this soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense, then I think we can rename the last param to shouldNotAutoPlay, what do you think?
|
||
// don't include `isFullScreenRef.current` in dependency array as we don't have to update shared video elements when it is changed | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [currentlyPlayingURL, shouldUseSharedVideoElement, shareVideoPlayerElements, url, isUploading]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}, [currentlyPlayingURL, shouldUseSharedVideoElement, shareVideoPlayerElements, url, isUploading]); | |
}, [currentlyPlayingURL, shouldUseSharedVideoElement, shareVideoPlayerElements, url, isUploading, isFullScreenRef]); |
I think we can keep isFullScreenRef as the previous code. It still works because isFullScreenRef
is a ref then it won't change.
@hoangzinh |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-06-07.at.18.02.46.android.movAndroid: mWeb ChromeScreen.Recording.2024-06-07.at.17.49.37.android.chrome.moviOS: NativeScreen.Recording.2024-06-07.at.17.47.13.ios.moviOS: mWeb SafariScreen.Recording.2024-06-07.at.17.45.18.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2024-06-07.at.17.38.40.web.mp4MacOS: DesktopScreen.Recording.2024-06-07.at.17.41.42.desktop.mov |
@jacobnguyen0000 can you add expectation result to your test steps? Thanks |
@jacobnguyen0000 can you also add recordings for mweb + native please? It helps us to ensure we won't break anything on other platforms |
@hoangzinh |
The expectation result should be step 7.
Are you able to complete it this weekend? |
Updated! Now it's very difficult to login on my side(maybe due to network problem). |
Let's try to complete it @jacobnguyen0000. You can always try to find experienced errors or ask your errors in Slack #expensify-open-source |
@hoangzinh |
@jacobnguyen0000 It's sad to hear that. Sure it's fine to me. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.83-3 🚀
|
Details
Fixed Issues
$ #42427
PROPOSAL: #42427 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
ios.mp4
MacOS: Chrome / Safari
bandicam.2024-05-31.01-12-01-386.mp4
MacOS: Desktop
bandicam.2024-06-04.17-35-28-579.mp4