-
Notifications
You must be signed in to change notification settings - Fork 473
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
View controls are not shown on Android #131
Comments
I also stumble upon this problem every now and then. Still don't know what causes it but it seems to be pretty persistent on some scenarios so I hope to tackle it soon. Try working with the v1 branch as it will be the next version of this project |
@davidohayon669 I don't think it's the case for Master because the video/player DOESN'T WORK and I believe is broken in Master. Video is not being displayed but you can hear audio in the background. Can you confirm this? I'm using a Galaxy S7 fyi. So I've been working in the V1 branch where the play DOES work and play but intermittently the players controls (pause, fullscreen) will NOT show. It displays the player controls maybe 40% and DOESN'T display 60% of the time in debug mode. When doing a Android release build, it DOESN'T show at all 100% of the time :( Any ideas? |
I know about this problem. It also affects my project |
@davidohayon669 Any update on this? |
@larryranches not yet.. |
+1, I'm missing a play and a pause button. |
I'm facing this same issue on my android phone. |
…n name). Also some fixes because the android player sometimes doesn't show controls: davidohayon669/react-native-youtube#131 Namely, we will play the video on returning to the same screen. And we support the tutorial row itself as a play/pause button.
FWIW: I've created a project that has one screen that has only this one component styled exactly like the example (See code below). I consistently get the following behavior on both Android 4.1 on a motorola razr and on Android 7.1.1 in an emulator: With play=true, controls=1, fullscreen=false With play=false, controls=1, fullscreen=false (if controls=2 then all controls appear instead of just play button) When rotating back and forth the controls can become mis-sized and mis-positioned. Note that the error can be avoided by setting play=true and fullscreen=true. Then, onChangeState where state="playing" set both back to false. It will revert to portrait and touching the play button will resume playing without error.
|
@johnckendall If you got it on a fork I can take a look |
ok, I created a fork and updated RCTYouTubeExample with the code above if you still want to check it out. Thanks. |
this hack works for me
|
@wack17s i tried the above hack but youtube controls still don't appear sometimes. |
@davidohayon669 : Even with @wack17s workarround, there are no video-controls in the Video after startup. @davidohayon669: Maybe some additional Inforamtions that may help to find out why the bug happends. |
Is there a fix for this? |
I'm also experiencing this problem. I've made it fullscreen for android and it works, but it's quite jarring having the video pop up full screen at first. Any ideas how I might be able to trick it into being fullscreen but invisible but then immediately closed? |
use the hack above but set the timeout to 500, it works like charm for me. |
@koswarabilly answer solved the problem for me, thanks a lot!! |
youtube controls still don't appear sometimes. Has anyone solved the problem? |
@Lexiwu the actual problem is sometime when you rescale the controls it do not have enough time, i guess the bigger the value of timeout the better it scale, the solution is you might have to add loading screen so that it have better user experience, for any particular fix without using rescaling, i am afraid their isn't any solution yet |
On my S7 emulator, I see the controls The hack of @wack17s with 500 works too ... |
Timeout hack is working only when the video is loaded in that given time. So, when controls are not visible and onReady is executed too early, only solution I found is to set auto playback to true and handle video playback state change. Sadly there's no "video loaded from server" state, therefore auto playback is necessary.
This is still a dirty hack. |
any update? |
+1 |
@Ilushkanama I'll take a look at this soon. Hope it really solves this |
@Ilushkanama @luisfuertes @punksta @Loigor @Kisepro @xstable @tirrorex |
I continue with bug and have v1.1.0 @davidohayon669 |
Seems to be working great as of first tests |
@luisfuertes Does it also occur in the example app? |
Bug still active and occurs very frequently. |
@davidohayon669 cant compile example in android |
I tried to unlink component and remove from package but It doesn't work. Maybe play services versions are wrong?
Package versions:
|
The bug still occurs randomly in our app. On some devices, like Galaxy S7, Galaxy S8, or Moto G5, the bug appears more often than on other Android devices like Moto G5 Plus. Are there any new insights? |
Same issue too, device is Huawei mate8.
|
Same issue as well. This only seems to be an issue on Android for me. I have a flatlist of 'products'. Tapping one navigates to a particular product screen which is a redux connected container. Within that container there is a react-native-youtube video. The video controls render maybe 2/3rds of the time. It seems the video player becomes more unstable over time and eventually, given enough navigation, the video controls do not display for any video until the app is restarted.
|
No updates for it? Still with control problems do not appear in 2/3 of the times any news? |
The only means of mitigating this issue that I found was to instantiate the YouTube player only once per app lifespan. I'm not sure if there's a singleton pattern that could be applied here but it'd probably do the trick. |
bug still active: *it only work on debug but not on release |
works man thanks a lot |
Faced the same issue on MI Redmi note 5 Pro, and the hack with 500 works
|
Any updates? |
Too bad this is still happening over a year from initial report :( In my case it happens 100% of the time on latest release. Only @wack17s using 500 as timeout solves it for me... |
hey how can I automatic landscape mode in full screen like.. at this time if I click on fullscreen button it goes into fullscreen in landscape mode but I want that it working on the basis of orientation like if my device is in portrait mode and if click on fullscreen button it goes into full screen but portrait and if my device is in landscape mode than I will be in... how can I do it... |
Thank you. You saved me from a weekend of fully rewriting the android logic. |
FYI...make sure you test the behavior extensively. I tried these hacks and the behavior of the player on Android is not very reliable. |
Please increase time of timeout |
any updates? I am facing the same problem |
This works for me...(99% error free) |
solved in c9a0c38 |
More often than not, the youtube view on Android, loads with only the starting image (cover) of the video, but without any video player controls. Nor the play button, nor the fullscreen mode button, nothing.
As far as I've seen throughout the other issues, this type of behaviour is not reported so-far. Is there something I am missing, or not using the component as intended?
I am using the component in the following manner:
The text was updated successfully, but these errors were encountered: