play video from file


import React, {Component} from 'react'

import PropTypes from 'prop-types'

import { View, StyleSheet } from 'react-native'

import Video from 'react-native-video'


export default class VideoComponent extends React.Component {


  renderVideo () {

      return(

        <Video

          source={require('./assets/Piano_Playing_Close.mp4')}

          style={{ width: 800, height: 800 }}

          muted={true}

          repeat={true}

          resizeMode={"cover"}

          volume={1.0}

          rate={1.0}

          ignoreSilentSwitch={"obey"}


        />

      )

  }


  render () {

    return (

      <View>

        {this.renderVideo()}

      </View>

    )

  }

}


// Later on in your styles..

var styles = StyleSheet.create({

  backgroundVideo: {

    position: 'absolute',

    top: 0,

    left: 0,

    bottom: 0,

    right: 0,

  },

});

Comments

Popular posts from this blog

WR3D wwe 2k19 MOD apk direct download link for Android

Download wwe2k17 wr3d

How to make resizeable window in pygame and make content adjustable according to window size