-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix: do not update new rate when open popover #46800
Conversation
@@ -84,6 +84,8 @@ function BaseVideoPlayer({ | |||
const videoStateRef = useRef<AVPlaybackStatus | null>(null); | |||
const {updateVolume} = useVolumeContext(); | |||
const {videoPopoverMenuPlayerRef, currentPlaybackSpeed, setCurrentPlaybackSpeed} = useVideoPopoverMenuContext(); | |||
const {source} = videoPopoverMenuPlayerRef.current?.props ?? {}; | |||
const shouldUseNewRate = typeof source === 'number' || !source || source.uri !== sourceURL; |
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.
can you post a brief summary about your changes?
Why is it failing only on android?
On other platforms, the playback speed should be set firstly in
Let's assume it's 2 and then when users open popover, we have the logic to set the current playback speed (2) App/src/components/VideoPlayer/BaseVideoPlayer.tsx Lines 99 to 106 in dd5a9e1
But on android, when users open popover too fast this logic is not triggered yet, so the default rate (1) will be set here Solution We should use the same logic
to prevent reset the playback speed. It should be the same if the source doesn't change. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.mp4Android: mWeb Chromemchrome.mp4iOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
Please put sequential numbers in Tests Step. |
Updated |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
I can see this code in staging, so i think it did get deployed bug the auto-comment failed due to some issues earlier in the week |
FYI I believe this was deployed to prod yesterday, from this checklist - #47219 |
Details
Fixed Issues
$ #42519
PROPOSAL: #42519 (comment)
Tests
Offline tests
Same as above
QA Steps
Same as above
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
Screen.Recording.2024-08-05.at.16.38.09.mov
Android: mWeb Chrome
Screen.Recording.2024-08-05.at.16.43.57.mov
iOS: Native
Screen.Recording.2024-08-05.at.16.40.05.mov
iOS: mWeb Safari
Screen.Recording.2024-08-05.at.16.42.59.mov
MacOS: Chrome / Safari
web-resize.mp4
MacOS: Desktop
web-resize.mp4