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

Set fullScreenPlayer's orientation [iOS] #790

Closed
wants to merge 2 commits into from
Closed

Set fullScreenPlayer's orientation [iOS] #790

wants to merge 2 commits into from

Conversation

gevgasparyan
Copy link

@gevgasparyan gevgasparyan commented Sep 21, 2017

Pass autoRotate (default true) and screenOrientation prop to FullScreenVideoPlayer.

<Video
            source={{ uri: 'some_source_here' }}
            .....
            autoRotate={false}
            fullScreenOrientation={Video.Constants.landscape}
          />

fullScreenOrientation can be one of these values (default is all).

    all,
    allButUpsideDown,
    portrait,
    portraitUpsideDown,
    landscape,
    landscapeLeft,
    landscapeRight

fullScreenOrientation affects even when device's rotation lock is enabled

@shahen94
Copy link

@jhabdas Can we merge this ?

@cobarx
Copy link
Contributor

cobarx commented May 29, 2018

@Gevorg94 It seems like having autoRotate is redundant, since they can control whether it is allowed to rotate by toggling between allowing all orientations and specific ones.

@gevgasparyan
Copy link
Author

@cobarx If you want to have only one orientation than you need to set autoRotate={false}, otherwise orientation will be changed when you rotate your device (assuming that screen lock is not enabled). So, by setting specific orientation and autoRotate={true}, your specified orientation will be an initial orientation and will be changed when you rotate your device.

@fabricioasap
Copy link

@cobarx Do you have plans to accept this PR? It'd be great

@cobarx
Copy link
Contributor

cobarx commented Jun 13, 2018

@fabricioasap Yes, I've been going thru and reviewing and testing each PR so it takes a fair bit of time. I'll give this a go as soon as I can.

@Gevorg94 One thought I had is that react-native-orientation already provides this functionality. What are your thoughts about whether it's worth duplicating that in this project vs. recommending people use that?

@cobarx
Copy link
Contributor

cobarx commented Oct 14, 2018

This functionality has been rolled into #1215, so closing.

@cobarx cobarx closed this Oct 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants