abbasfreestyle / react-native-af-video-player

MIT License
381 stars 288 forks source link

Video goes off its intended screen area #136

Open hossamnasser938 opened 5 years ago

hossamnasser938 commented 5 years ago

export default class PostVideo extends PureComponent { static propTypes = { video: PropTypes.object.isRequired };

render() {
    const { video } = this.props;

    return(
        <Video 
          url = { POST_FILES_URL_PATH +  video.url }
          style = { {height: 250, width: 250} }
        />
    );
}

}

I also tried to render the `Video` inside a `View` like this but also experiencing the same issue.
```js
render() {
        const { video } = this.props;

        return(
            <View style ={{height: 250, width: 250}}>
                <Video 
                  url = { POST_FILES_URL_PATH +  video.url }
                />
            </View>
        );
    }

Also tried giving the video flex: 1 like this:

render() {
        const { video } = this.props;

        return(
            <View style ={{height: 250, width: 250}}>
                <Video 
                  url = { POST_FILES_URL_PATH +  video.url }
                  style = { {flex: 1} }
                />
            </View>
        );
    }
hossamnasser938 commented 5 years ago

I guess that the default value of resizeMode which is contain does not work for some reason. It does not work even if I passed it explicitly rather than depending on the default value.