expo / videoplayer

Customizable controls for Expo video
83 stars 83 forks source link

Native fullscreen #28

Open thomprycejones opened 6 years ago

thomprycejones commented 6 years ago

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 commented 6 years ago

Hi,

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

baselbj commented 6 years ago

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}
/>
)
}