-
-
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
UI frame drop while loading (initial buffer) the video #2744
Comments
I have the same problem. I present my video, and there's a moment of lockup in animation, interaction when the video is initially loading. Screen.Recording.2022-07-14.at.11.32.29.movSee video. First presentation, I'm actually trying to gesture to dismiss the modal early. Second time, I wait a moment for video to actually load, then I play with gesture. You can see it works that time. (Yes it's fullscreen gesture, in the video I pulled down from top but doesn't matter, it works if I pull down from anywhere like it should) |
Getting this issue as well. If the video is autoplayed while scrolling, the scrolling stutters a bit. |
Is this ios only or do you also have the issue on android ? |
I didn’t have time to test it on Android. |
@matinzd It would be usefull ... ios implemenation has reacently been rewriten in swift, it can be a root cause. |
I am using this commit from master branch: https://github.com/react-native-video/react-native-video.git#054abcac8e1dcb738b0b679f8b496474f8a159e5 |
Ok, I tested it on android and it's working smoothly. This is the first performance issue I am facing on iOS which is fine on Android :) |
Same problem, but switch to 5.2.0 and it works well |
I am also having the similar issue in iOS. In my case, UI freezes for a while while navigating to the video screen. And also while using |
I am having same issue in iOS with version 6.0.0-alpha.2. UPDATE In function setSrc() changing line 267
to
seems to fix this issue. |
@sperko00 can you open a PR please ? Thank you |
Fix seems to be legit. This will unblock the main thread while replacing the source. |
@matinzd your change is not KVO-compliance. It will crash the app when changing the src so quick
|
Bug
The main UI thread is being blocked by loading the video in the initial buffer, causing the UI to drop to 5-20 fps.
Platform
Which player are you experiencing the problem on:
Environment info
React native info output:
Library version: https://github.com/react-native-video/react-native-video.git#054abcac8e1dcb738b0b679f8b496474f8a159e5
Steps To Reproduce
Expected behaviour
Reproducible sample code
Screen record
https://drive.google.com/file/d/1O-S3wdNHIk_somhq-bSwDwaZ3HiAVR8A/view?usp=sharing
The text was updated successfully, but these errors were encountered: