1.0.2 • Published 2 years ago

expo-fullscreen-video-player v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

expo-fullscreen-video-player

An expo video player component that can be rotated to full screen landscape mode.

Installation

npm i expo-fullscreen-video-player

How to use

-> Import Video player component from expo-fullscreen-video-player -> expo-fullscreen-video-player supports all the props that Expo-av supports. -> One extra prop is 'fullscreenMode', by default its set to 'LANDSCAPE'. Possible values are :

LANDSCAPE (string) - Any landscape orientation.

LANDSCAPE_LEFT (string) - Left landscape only.

LANDSCAPE_RIGHT (string) - Right landscape only.

Example

import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { StyleSheet, View, Dimensions } from 'react-native';
import VideoPlayer from 'expo-fullscreen-video-player';

export default function App() {

  return (
    <View style={styles.container}>

      <StatusBar style="auto" />
      
       <VideoPlayer
       
          source={{ uri: 'http://d23dyxeqlo5psv.cloudfront.net/big_buck_bunny.mp4' }}
          resizeMode="cover"
          shouldPlay
          fullscreenMode = "LANDSCAPE"
          useNativeControls
          style={{ width: Dimensions.get('window').width, height: 200 }}
          
        />
      
       
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});