-
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
Playback speed is not displayed correctly in video player #40646 #41055
Conversation
@hungvu193 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] |
@@ -18,13 +19,14 @@ function VideoPopoverMenuContextProvider({children}: ChildrenProps) { | |||
const [currentPlaybackSpeed, setCurrentPlaybackSpeed] = useState<PlaybackSpeed>(CONST.VIDEO_PLAYER.PLAYBACK_SPEEDS[2]); | |||
const {isOffline} = useNetwork(); | |||
const isLocalFile = currentlyPlayingURL && CONST.ATTACHMENT_LOCAL_URL_PREFIX.some((prefix) => currentlyPlayingURL.startsWith(prefix)); | |||
const playerRef = useRef<VideoWithOnFullScreenUpdate | null>(null); |
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 we give it a more meaningful name? IE: videoPopoverMenuRef
const playerRef = useRef<VideoWithOnFullScreenUpdate | null>(null); | |
const videoPopoverMenuPlayerRef = useRef<VideoWithOnFullScreenUpdate | null>(null); |
@KMichel1030 I recommend that you should only mark PR ready when you've completed all the video and checklist. |
9143b89
to
29a23c2
Compare
Any update here please? @KMichel1030 |
We have conflicts here @KMichel1030 |
@hungvu193 |
Is there any chance that you can complete the PR author checklist today? It's been a week though |
Bump @KMichel1030, any update please? |
@hungvu193 |
Did you try npm run clean? |
Sorry, I've tried |
can you please post the full logs? Also if you can not build ios, can you build android? I only saw you complete the record for desktop and mac/chrome |
@hungvu193 |
Wdym other versions? Even mWeb Safari and mWeb Android chrome? Did you follow the guide for local development here? |
Of course, I've followed guide. I built ios version once, but then error persists. |
Please post the full logs to expensify open source so we can help you. I'll verify the changes in the mean time. |
Can you please merge with main? @KMichel1030 |
Please see the video, I don't think it's working for IOS. I got an infinite loop render also Screen.Recording.2024-05-08.at.10.57.47.mov |
Ok, I will check. Thank you. |
merged main branch |
This comment was marked as resolved.
This comment was marked as resolved.
The problem will be with small screen, since we will use attachment modal for them to display (wrap) the video player instead of using VideoPlayer itself directly. |
Friendly bump here @KMichel1030 |
@hungvu193
I've tested it with smartphone size in web and it's working properly. So it seems it's not problem with small screen. bandicam.2024-05-14.16-32-19-619.mp4 |
Cool. Thanks for letting me know. Can you please merge main again? I'll take another few tests |
@hungvu193 |
Hi, @hungvu193 |
Cool, please complete the author checklist while I'm checking it rn |
@hungvu193 |
Make sure you setup https: https://github.com/Expensify/App?tab=readme-ov-file#configuring-https |
@hungvu193 |
Can you merge main again? MenuItem is broken on our branch |
@hungvu193 |
No worries, it's not related to this PR |
So I got this one on iOS, open any video, change the speed, close the modal and open that video again, now the speed is reset to 1. But I think that's fine. I didn't find any other problem so far. I'll complete checklist in a while |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-05-15.at.16.19.00.movAndroid: mWeb ChromeScreen.Recording.2024-05-15.at.16.15.00.moviOS: NativeScreen.Recording.2024-05-15.at.15.52.16.mp4iOS: mWeb SafariScreen.Recording.2024-05-15.at.16.11.12.movMacOS: Chrome / SafariScreen.Recording.2024-05-15.at.16.12.17.movMacOS: DesktopScreen.Recording.2024-05-15.at.16.09.36.mov |
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.
LGTM!
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.
LGTM
✋ 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 staging by https://github.com/blimpich in version: 1.4.75-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.75-1 🚀
|
@@ -24,9 +24,9 @@ function VideoPopoverMenuContextProvider({children}: ChildrenProps) { | |||
const updatePlaybackSpeed = useCallback( | |||
(speed: PlaybackSpeed) => { | |||
setCurrentPlaybackSpeed(speed); | |||
currentVideoPlayerRef.current?.setStatusAsync?.({rate: speed}); | |||
videoPopoverMenuPlayerRef.current?.setStatusAsync?.({rate: speed}); |
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.
There was regression from this change.
More details: #42519 (comment)
Details
Fixed Issues
$ #40646
PROPOSAL: #40646 (comment)
Tests
For MacOS: Chrome / Safari & MacOS: Desktop
Video1
,Video2
).Video1
.Video2
.Video2
to 2.Video1
to 0.25 (or any other)Video2
is 2.Video1
and check if speed is 0.25.Other platforms
Video1
,Video2
).Video1
and change speed to 0.25(or any other)Video2
and check that speed is 1.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
bandicam.2024-05-15.10-22-56-062.mp4
iOS: mWeb Safari
bandicam.2024-05-15.12-08-32-903.mp4
MacOS: Chrome / Safari
chrome.mp4
MacOS: Desktop
bandicam.2024-04-28.06-49-58-948.mp4