-
-
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
Support for displaying controls in Android Exoplayer #1414
Conversation
When will this pull request be accepted? |
@cobarx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @IbrahimSulai, sorry for the delay in looking at this, I've been sick the last week so haven't gotten to put any time into the project.
Here are some minor changes that I saw by glancing over the PR. I still need to run the code and see how it works.
Thanks for putting this together! I had no idea that ExoPlayer included built-in controls so this makes it so much easier to implement this feature. Nice work!
Go ahead and make the changes, I will test this out in the next day or two.
android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
Outdated
Show resolved
Hide resolved
android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
Outdated
Show resolved
Hide resolved
@cobarx - Thanks for your valuable review comments. I have resolved the same. Please review the changes. I hope you are doing good regarding your health. Take care. |
Is there any news about this PR? @cobarx |
Hey @cobarx I have tried this PR on Android in my local and it's really works. It has some issues that needs to be solved although but I think it's still better than nothing. I hope you can merge it when you are available. And @IbrahimSulai thanks for your attention but can you apply a change for fullScreen on control, too? Because i couldn't see and i really need it. Thank you both. |
Please @cobarx merge it!!!!! 🎉🎉🎉 thank you @IbrahimSulai |
@cobarx - I will look into the above UI issue and also will handle the controls props. |
@cobarx - I have fixed the UI player control UI issue. Also handled the controls prop state. Could you please review it. |
@IbrahimSulai Can you apply a button for fullscreen if you can, please? |
@mgezkaya , Sure. Once @cobarx merge this, will add the full screen feature as a separate PR. Thanks. |
Thanks for return |
@IbrahimSulai didn't work for me on Android 9. But if I put the App into background, and get it back to foreground, it autoplays the video, and "Pause" button is visible. Here is my patch-file: https://hastebin.com/jugowesova.diff |
@xstable I’m not sure about the patch package you are using, so can you also please try to use the changes AS IS from the PR instead of trying via any patch/patch packages. |
@IbrahimSulai The Patch is my own one, I've created with patch-package. It contains the diff between default "react-native-video" and my changes. My Device is: Xiaomi Mi A1 & Samsung S4 Maybe I've missed something, or have an Issue in my code, so here I've create a package of my changed source-code from android-explayer so that you can have a look inside. |
@xstable Could you please share your mail id. So, that we can communicate in person in the below slack channel to solve this. |
I can able to reproduce the issue with your patch file. I debugged the issue, the player states are working exactly fine. But, there is a UI glitch with the play/pause button. I am working on it to find the root cause for the same, will get back with the solution ASAP. |
…r to align with player state
I have fixed the issue observed in the test harness. Changed the execution order of initializePlayerControl method in order to align with the player state. Since the createView is executed before the "setControls" props method gets called. so the values of the playerControl are not aligned with the player state values. Could you please review and merge the same. |
Very nice, this is working wonderfully for me in the test harness. I'm merging now. There are going to be a lot of happy people using this! Adding the controls exposes a lot of new functionality that you could develop further (if you have the time and interest). If you want to do another PR, it would be great to have onPause & onPlay events so that the app can be notified that the play/pause state changed due a click within the controls. It might also be good to implement some kind of auto-hide behavior so the controls disappear after a certain amount of time, configurable by a prop. Keep up the good work! |
Thank you guys! I was wanting this merge! |
Thank you @cobarx and others in the community who supported for this feature to get merged. |
@IbrahimSulai Is there an ability to make video fullScreen on Android? |
Will add the full-screen feature in upcoming PR. |
@cobarx As you don't have to create your own controls, but you are "able to do". |
Because I hardly needed the fullscreen-functionality, I forked and upgraded react-native-video-player so that it now support react-native-video 4.4.0. Feel free to give it a try. But I still looking forward to @IbrahimSulai Solution to have the whole functionality inside of react-native-video. So you can take my solution as temporary workaround, till @IbrahimSulai is done with it. |
Thank you so much for adding controls! Would it be possible to make them more accessible for dpad/keyboard users? My app is being rejected from the play store due to this. |
Currently working on the full-screen functionality for the Android Exoplayer. Once completed, will check on this. Thanks |
- controls TheWidlarzGroup/react-native-video#1414 - PictureInPicture TheWidlarzGroup/react-native-video#1325 - minLoadRetryCount TheWidlarzGroup/react-native-video@420d88d
@IbrahimSulai thanks for adding control support. Any updates on fullscreen functionality? |
- controls TheWidlarzGroup/react-native-video#1414 - PictureInPicture TheWidlarzGroup/react-native-video#1325 - minLoadRetryCount TheWidlarzGroup/react-native-video@420d88d
@IbrahimSulai |
@IbrahimSulai hey is the fullscreen functionality coming ? So much waiting about this one :) |
@jonathangreco I am planning to control the full-screen functionality in the react-native layer based on the platform. Will let you know once it's done. Thanks |
@IbrahimSulai Hi thx for those news, Iknow that the fullscreen is a very complicated aspect on react native for videos, because on iOS it does not fully work either. I really hope that you work will do the job for all cases. Keep up the good work and hope this will be released this year :) |
@jonathangreco - Thanks for your support and encouragement. I will add this feature ASAP. |
@jonathangreco @datzun @shaunsantacruz @sherif-magdy @xstable @AndriiUhryn @mgezkaya Sorry for the delay. No more wait. Here is the full-screen functionality. Opened a PR (#1730) for full-screen support in Android Exoplayer. |
Support for displaying controls in Android Exoplayer (rebased from commit e0fd69e)
Added support for displaying player controls in Android Exoplayer component using PlayerControlView
Utilised the existing boolean prop 'controls' to show/hide the native controls for the player.
Sample Usage