Update example

This commit is contained in:
Laurin Quast
2018-03-01 23:51:30 +01:00
parent c926d8ba6c
commit 4b5ac43ded
5 changed files with 25 additions and 4948 deletions

View File

@@ -5,14 +5,30 @@
*/
import React, { Component } from "react";
import { StyleSheet, Text, View } from "react-native";
import { StyleSheet, Text, View, Dimensions } from "react-native";
import Video from "react-native-video";
const { height, width } = Dimensions.get("screen");
type Props = {};
export default class App extends Component<Props> {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>The implementation will follow!</Text>
<Video
cache={true}
source={{
uri:
"https://rawgit.com/mediaelement/mediaelement-files/master/big_buck_bunny.mp4"
}}
ref={player => {
this.player = player;
}}
onEnd={() => {
this.player.seek(0);
}}
style={{ flex: 1, height, width }}
/>
</View>
);
}