-
-
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
[BUG]: Poster not working on android #3640
Comments
Thank you for the patch, I will clarify the expected behavior soon. (But if you want to have a poster instead of the video, you should do it on the app side) |
I open a PR to fix the issue. I think you should be able to test it ! |
Hey @freeboub this seems to be reproducing on the latest version as well (v6.4.3) 😢 |
@freeboub This is how I managed to fix it: diff --git a/node_modules/react-native-video/src/Video.tsx b/node_modules/react-native-video/src/Video.tsx
index 49ca1e9..5cc196c 100644
--- a/node_modules/react-native-video/src/Video.tsx
+++ b/node_modules/react-native-video/src/Video.tsx
@@ -452,7 +452,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
);
const _onReadyForDisplay = useCallback(() => {
- hasPoster && setShowPoster(false);
+ setShowPoster(hasPoster);
onReadyForDisplay?.();
}, [setShowPoster, hasPoster, onReadyForDisplay]); Let me know if you want me to open a PR with this, it would be my pleasure to contribute. |
Hi @LunatiqueCoder, I see that this issue is still active. We would be grateful for your PR! |
@moskalakamil Please solve this for android. @LunatiqueCoder It worked for android thank you! |
I’m happy it worked for you. I’ll create a PR on Monday |
@LunatiqueCoder Sorry it did not work properly for videos which has posters. I made a custom solution to tackle this issue. |
I tested again on the last version, I don't reproduce the issue. |
Version
v6 (Beta)
What platforms are you having the problem on?
Android
Architecture
Old architecture
What happened?
When using the
poster
prop, it works for a few seconds at the beginning, and then we have a blank screen.Reproduction
N/A
Reproduction
N/A
Solution:
The text was updated successfully, but these errors were encountered: