Skip to content
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]: Black screen on Android until video fully loaded #4045

Closed
forchello opened this issue Aug 1, 2024 · 10 comments · Fixed by #4060
Closed

[BUG]: Black screen on Android until video fully loaded #4045

forchello opened this issue Aug 1, 2024 · 10 comments · Fixed by #4060
Labels

Comments

@forchello
Copy link

Version

6.4.3

What platforms are you having the problem on?

Android

System Version

android 12+

On what device are you experiencing the issue?

Real device, Simulator

Architecture

Old architecture

What happened?

I have a static photo and wanted to add a "live photo". This is a regular mp4 video that is uploaded via a link and activated.

But the problem is that in the latest versions of the library at the moment of "onLoadStart" a black canvas is called, which is shown until the video is loaded. I saw shutterColor and hideShutterView in the documentation, but using them doesn't solve the problem.

Reproduction

No response

Reproduction

Step to reproduce this bug are:
Just try to loaded video from remote uri: for example https://d23dyxeqlo5psv.cloudfront.net/big_buck_bunny.mp4

@forchello forchello added the bug label Aug 1, 2024
@forchello forchello changed the title [BUG]: Black screen until video fully loaded [BUG]: Black screen on Android until video fully loaded Aug 1, 2024
@freeboub
Copy link
Collaborator

freeboub commented Aug 1, 2024

Does renderLoader prop solve your issue ? https://thewidlarzgroup.github.io/react-native-video/component/props#renderloader
BTW, I am not 100% to understand the issue.

@forchello
Copy link
Author

Does renderLoader prop solve your issue ? https://thewidlarzgroup.github.io/react-native-video/component/props#renderloader BTW, I am not 100% to understand the issue.

2024-08-02.11.35.12.mp4

I mean this dark layout before the video started.

This is my code:

<Video
source={{
uri: 'https://d23dyxeqlo5psv.cloudfront.net/big_buck_bunny.mp4',
type: 'mp4',
}}
style={{
width: 400,
height: 300,
}}
repeat
resizeMode={'cover'}
rate={1}
playInBackground={false}
playWhenInactive={false}
hideShutterView
shutterColor="transparent"
renderLoader={null}
muted
/>

@moskalakamil
Copy link
Member

Hi @forchello, I'm working on fix that issue - i will keep you updated

@forchello
Copy link
Author

Hi @forchello, I'm working on fix that issue - i will keep you updated

Thanks a lot!

I also noticed that when I use screen video and call modalfy ( react-native-modalfy ) with the same video, I see the screen video on modal ( with dimensions from the screen ). This goes on for a few seconds. When I close the modal, the opposite situation happens

@moskalakamil
Copy link
Member

Sure, can you describe this in next issue, please?

@forchello
Copy link
Author

Of course, I'll also attach a video to familiarize you with the problem.

@forchello
Copy link
Author

forchello commented Aug 2, 2024

Sure, can you describe this in next issue, please?

I described and demonstrated the problem here: #4051

@kavinder123
Copy link

still facing the same issue as i scroll up to load any other video it will first show black screen after that video will play. Please help if any one have any solution regarding this issue.

@forchello
Copy link
Author

forchello commented Aug 6, 2024

still facing the same issue as i scroll up to load any other video it will first show black screen after that video will play. Please help if any one have any solution regarding this issue.

now I have a temporary solution: make a wrapper for the video, give the video opacity: 0, and after calling onLoad give the video opacity: 1

P.S. use it for android only, because ios works fine

@CMLCNL
Copy link

CMLCNL commented Aug 22, 2024

any update for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants