Skip to content
This repository has been archived by the owner on Jun 7, 2019. It is now read-only.

Native fullscreen #28

Open
thomprycejones opened this issue Apr 18, 2018 · 2 comments
Open

Native fullscreen #28

thomprycejones opened this issue Apr 18, 2018 · 2 comments

Comments

@thomprycejones
Copy link

Hello,

i'm trying to make a video player which supports landscape fullscreen, with views (like a FAB) on top of it. I'm having some issues using this component, as it works (it seems) differently than using the Expo Video component when triggering fullscreen. The VideoPlayer example only changes orientation, and the nativecontrols of Video component triggers a "real" on top view fullscreen.

Is there a way to make something similar? Maybe i'm just missing something. Thanks!

@astraeapark
Copy link

Hi,

i also need 'real' fullscreen.
did u get any solution? @thomprycejones

@baselbj
Copy link

baselbj commented Jun 28, 2018

you should do this manually for example when (isPortrait) in your component status changed to false you should hide all components in the screen except the videoplayer component for example:

if (this.state.isPortrait) {
      return (
        <View>      
            <Text>This will be shown on the sceen</Text>
          </View>
          <View style={styles.row}>
           <VideoPlayer
  videoProps={{
    shouldPlay: true,
    resizeMode: Video.RESIZE_MODE_CONTAIN,
    source: {
      uri: 'https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8',
    },
  }}
  isPortrait={true}
  playFromPositionMillis={0}
/>
          </View>
        </View>
      )
    }else {
return (
<VideoPlayer
  videoProps={{
    shouldPlay: true,
    resizeMode: Video.RESIZE_MODE_CONTAIN,
    source: {
      uri: 'https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8',
    },
  }}
  isPortrait={true}
  playFromPositionMillis={0}
/>
)
}

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

No branches or pull requests

3 participants