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

How to use this.player.presentFullscreenPlayer() correctly. #392

Closed
ronak301 opened this issue Nov 21, 2016 · 5 comments
Closed

How to use this.player.presentFullscreenPlayer() correctly. #392

ronak301 opened this issue Nov 21, 2016 · 5 comments
Labels
documentation stale Closed due to inactivity or lack or resources

Comments

@ronak301
Copy link

ronak301 commented Nov 21, 2016

I have list of of photos and videos.
On clicking video i want to play full screen video.

@duhseekoh
Copy link
Contributor

duhseekoh commented Nov 21, 2016

I have been putting items in a list (could be a photo, text, whatever you want) and when you press on that, render a video, then call this.player.presentFullscreenPlayer(); I also set the video style to have a 0 width/height so the video is never displayed inline.

Something like...

render() {
 return (
  <TouchableHighlight onPress={this._onPressPlay}><Text>Play me</Text></TouchableHighlight>
  {this.state.isVideoVisible && <Video ref='player' ...></Video>}
 )
}

_onPressPlay() {
 this.setState({isVideoVisible, true}, () => {
  this.player.presentFullscreenPlayer();
 }
}

@ronak301
Copy link
Author

is this also working on android ?

@avkvak
Copy link

avkvak commented Nov 22, 2016

Same question.. All works good on iOS, but nothing happens on android

@duhseekoh
Copy link
Contributor

@ronak301 @avkvak - It's not mentioned in the readme, but presentFullscreenPlayer has no effect on android... unfortunately. A workaround is running a method based on platform and

  • iOS: use presentFullscreenPlayer
  • Android: add styling to make it look full screen + add some type of controls

@ghost ghost added the documentation label Feb 9, 2017
@davingreen
Copy link

Can anyone point to an example of full screen usage with Android? Especially on supporting landscape full screen, I'm having issues with playback using transform rotation. Here's an example of the approach:
androidVideo: { backgroundColor: '#000', width: screenwidth, height: screenheight },

<View style={{transform: [{rotate: '90deg'}]}}><VIDEO></View>

With the above approach, the video does not actually present in "full screen" because of Android Statusbar and any controls I add over the video (such as using the react-native-video-player wrapper) cease to work when presented this way.

Thanks for any help!

@hueniverse hueniverse added the stale Closed due to inactivity or lack or resources label Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation stale Closed due to inactivity or lack or resources
Projects
None yet
Development

No branches or pull requests

5 participants