-
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
[Android] with 'fullscreen' property playback controls are missing #2864
Comments
Ok,I will clarify doc! I confirm it is available on Android.
|
@freeboub thanks for answer. In my app the video should play only in fullscreen mode. That is, I do not use the "mini" player placed on the user screen (as described here: #2763 (comment)) So, yes, I shoud use 'fullscreen' property. But shoud I use 'controls=true'? If no, how will the native playback controls be displayed? I also want to note that there was no such problem with 6.0.0-alpha 2. |
@bulkinav I can confirm that last change broke this behavior. I didn't expect someone do this... |
ping @wood1986 if you have more time than me :) |
@bulkinav Is it possible to record a video? I do not understand the issue |
@wood1986 the issue happen when Fullscreen and controls are both true. |
Ok I will follow up this weekend. |
@freeboub I do not quite understand.
When both set to true, this means native control will be used. native will handle the full screen button onPress and enter/exit the Dialog. What I can see the bug is when both set to true, it did not enter full screen mode after Video component is mounted (at the very beginning). As for this bug, I do not know how to fix it properly. Currently the behaviour of I have a workaround for android. iOS is broken with this code both in v5 and v6 due to this #2808 <Video
ref={videoRef}
source={require('./playstation.mp4')}
controls={true}
resizeMode={'contain'}
paused={true}
style={[{flex: 1, height: '100%', width: '100%'}]}
onLoad={() => {
videoRef.current?.seek(0);
videoRef.current?.presentFullscreenPlayer();
}}
/> I think fullscreen props is not reliable and we should deprecate it because when user tap the fullscreen icon via the native control, fullscreen props does not reflect the right state. I think the workaround is the right code and we do not need to fix this issue and we only need to fix #2808. Then both iOS and android will have same behaviour with the "workaround" code. |
Thank you for the feedback! Unfortunnatly we cannot deprecate |
Wait. People still can keep track of the fullscreen via useState in these callbacks in onFullscreenPlayerDid{Present/Dismiss}. When their control has fullscreen button, they can use presentFullscrenPlayer(). I expect they still can implement their own controls. Before investigating/introducing the startup config props, I want to know the possibility of deprecating fullscreen props after my latest point and to see if my workaround is the right way. For now, I think #2808 is higher priority but the solution is based on a very old commit. And I will try to fix today. Then we can have the feature parity for both android and iOS. Feel free to let me know if I am wrong |
@bulkinav @wood1986 I finnally found time to propose a fix here: #2911 |
@freeboub thanks for your time. Unfortunately, I can still reproduce this problem. Several behaviors are considered below:
|
I cannot read correctly the video you provide... Anyway, when you say there is no control, you Don't see any control ? This patch should only remove the Fullscreen button in that case 🤔 |
@freeboub I changed example links.
Yes, and I several times rebuild project / cleaned cache, but it didn't help. |
@freeboub yes, I confirm - fullscreen playback now has controls. Thanks for a time to fix this problem. |
@bulkinav I update the PR, can you please approve it ? I will generate a release soone |
@freeboub I see you have removed this line:
Yes, the PR also works as expected. |
@bulkinav I think these tests are messy, for exemple:
the test should be done in the subfunction, not in master function. For exemple depending on startup process (start playback is asynchronious) we can miss to apply control option correctly |
Has been merged, fix will be available on alpha.4 |
Bug
Tested 6.0.0-alpha4 and see the following issue:
On Android with 'fullscreen' property playback controls are missing. Tapping on the screen also does not cause the playback to appear.
If don't use 'fullscreen' the controls are presented, BUT the player runs not in fullscreen mode (this is understandable by the "Switch to fullscreen mode" button). After clicking the "Switch to fullscreen mode" button, the fullscreen appears.
https://github.com/react-native-video/react-native-video/blob/master/API.md#controls - it says here that the 'fullscreen' property is applicable only for iOS. But as you can see, and for Android too.
Platform
Android (using Pixel 5a with Android 13)
Environment info
React native info output:
Library version: 6.0.0-alpha4
Steps To Reproduce
Expected behaviour
Playback controls are presented
Reproducible sample code
The text was updated successfully, but these errors were encountered: