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

Android fullscreen via bridging #38

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

ShariqMush
Copy link

@ShariqMush ShariqMush commented Jul 18, 2017

Native bridge to android launching android video view in fullscreen, hours of work of sweat and tears!!!
To all the other developers, please use this github library for working fullscreen until the developer of this library merges the pull request :) I will be updating that fork as well.

@cornedor
Copy link
Collaborator

Thanks for this commit.
Do you by any change have the rest of the Android project?

@ShariqMush
Copy link
Author

@cornedor Nope, readme says it all.

@cornedor
Copy link
Collaborator

Ah I didn't see that, thanks. I'll try to make this work with react-native link.

@ShariqMush
Copy link
Author

@cornedor Can you check my pull request? It is native and performs better than react because in react you would have to resize the video component which is unstable where native video player fixes it all in native so please check my request and merge it. Thank you.

@cornedor
Copy link
Collaborator

@ShariqMush yes I agree, I have more time after next week, so I will try to make it work with react-native link. If you update the app now you will need to manually copy the files from the repo to your own project.

I do appreciate all the work you did to get it this far.

@abrown1982
Copy link

I spent the last few days looking for the best full-screen android option for RN and I think this pull request is the best available. A few issues though.

1 - No option to leave fullscreen (other than the back button) once in fullscreen.
2 - Position of video is not retain when switching between inline and fullscreen.

I have written fixes to both of these issues (doubleclick on fullscreen to close and passing of position between activities), though I have not tested it much, would appreciate someone else running their eyes over it to make sure I've not missed anything?

abrown1982@43bffe5

@Misiur
Copy link

Misiur commented Sep 29, 2017

This works great, but fullscreen has native controls, not the react-native-video-player controls. Can something be done about this, or is it too compilcated?

@ShariqMush
Copy link
Author

@Misiur Yes it is very complicated, why would you need the react controls when you are already getting the native controls?

@Misiur
Copy link

Misiur commented Sep 29, 2017

Missing back-from-fullscreen button, missing volume controls, just all around missing functionality - that's why I'm using react-native-video-player in the first place! (well, and your awesome native fullscreen functionality)

@ShariqMush
Copy link
Author

@Misiur For the back button, why not use the ordinary back button on any android device lol but I can look at the volume controls for you but then its pretty much like the player rebuilt into the native but yeah I will look forward to it but please post an issue on my fork. I will be posting further updates there until this pull request gets accepted.

Johan and others added 2 commits October 17, 2017 16:00
@rnowm
Copy link

rnowm commented Oct 23, 2017

Any update on that one? would be great if you could merge it, I was not able to make it work following the described steps. Thanks!


public class BridgePackage implements ReactPackage {

@Override
Copy link

@EthanLin-TWer EthanLin-TWer Oct 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from RN 0.47.x on the createJSModules() method has been removed and thus the @Override implement here will fail the gradle compilation. Simply remove the @Override and keep the method call should resolve this issue.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks man!

import PropTypes from 'prop-types';
import { Image, Platform, StyleSheet, TouchableOpacity, View, ViewPropTypes } from 'react-native';
import React, { Component, PropTypes } from 'react';
import { View, StyleSheet, Image, TouchableOpacity, Platform, NativeModules } from 'react-native';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reasons for changing to use the built-in PropTypes instead of the separate prop-types library?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

built-in PropTypes are breaking since react does not support them, we should use separate prop-types library.

@callmejm
Copy link

@Misiur I agree with you, native control don't have back fullscreen, and the control are hard to make a custom control bar like without fullscreen

@solonik1
Copy link

+1

@Angelk90
Copy link

@ShariqMush , @abrown1982: Ot, I have a problem, I created a native module, but when you start the native module all right, it works. But if the user presses the physical back button, the app crashes, how can I fix this? I would like when the user presses the physical back button, he returns to the native react app at the point I had left before the native module started.

@kashifaliquazi
Copy link

kashifaliquazi commented Jan 22, 2018

@ShariqMush Native player is working fine, but no callbacks are working in full screen mode, like onEnd, onFullscreenPlayerDidDismiss etc. how can we register these events in fulscreen mode as that of ios.

@kashifaliquazi
Copy link

@abrown1982 can you pleae help me in adding callbacks(onEnd,onFullscreenPlayerDidDismiss etc ) on full screen mode.
thanks in Advance

@abrown1982
Copy link

@kashifaliquazi I'm working to a deadline at the moment so don't have any time available in the next week or so.

@ShariqMush
Copy link
Author

I have been away from my computer but I'll be updating the fork asap with the callbacks.

@Ilario17
Copy link

@ShariqMush I installed your library but the fullscreen button is not present anyway.
@cornedor Would not it be better to keep a single library?

@hoscarcito
Copy link

It's been a month since the last update here... Any news?

@SujaYuga
Copy link

I too tried with PR#38 no errors but the fullscreen button on Android does not show. I am using react native video player version #0.9.1. Any update please?

@xstable
Copy link

xstable commented May 9, 2018

Would love to see the FullScreen work.

@ShariqMush
Copy link
Author

@hoscarcito @SujaYuga @xstable @Ilario17 I have been inactive for a while but will look at what the problem is very soon. Check forks of my own fork and there you should find some working ones.

@xstable
Copy link

xstable commented Jan 25, 2019

@ShariqMush Any progress here?

@ShariqMush
Copy link
Author

@xstable Hi, I am not working with react native at the moment but I believe that the issue is related to react native library not any problem in the native code. If fullscreen button does not appear then you should tamper with the library files. Try pulling my fork of the video player to see if it works because some people made some PR's that I merged recently.

@xstable
Copy link

xstable commented Feb 26, 2019

I spent the last few days looking for the best full-screen android option for RN and I think this pull request is the best available. A few issues though.

1 - No option to leave fullscreen (other than the back button) once in fullscreen.
2 - Position of video is not retain when switching between inline and fullscreen.

I have written fixes to both of these issues (doubleclick on fullscreen to close and passing of position between activities), though I have not tested it much, would appreciate someone else running their eyes over it to make sure I've not missed anything?

abrown1982@43bffe5

@abrown1982 is there a chance to have a classic "x" as close-button in the Fullscreen-View?
That would be awesome.

@ghost
Copy link

ghost commented Mar 17, 2019

is there any update for full screen mode on android??????

@onedevlad
Copy link

Hey guys! Any news? We're getting tired of stretching video components manually.

@iamshadmirza
Copy link

Hey guys! Any news? We're getting tired of stretching video components manually.

We need fullscreen feature on Android.

@ShariqMush
Copy link
Author

@iamshadmirza Isn't the issue with the fullscreen fixed yet? I am not working with react native anymore :)

@ayeshasaeed94
Copy link

@ShariqMush any updates regarding full screen mode on android?

@RishavKumar-3796
Copy link

Please fix this ASAP

@TheDanielMoli
Copy link
Collaborator

I verified that this PR is not working out of the box, not even after following the complex guidelines added in the README.md file. Will be looking into this and keep you all updated.

@15110011
Copy link

tried to config like this and still not working

@pierroo
Copy link

pierroo commented Apr 2, 2022

It's a bit old but: is there any news regarding fullscreen for android?

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

Successfully merging this pull request may close these issues.