mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
37 lines
725 B
TypeScript
37 lines
725 B
TypeScript
import * as React from 'react';
|
|
import {
|
|
StyleSheet,
|
|
Text,
|
|
View,
|
|
ViewStyle
|
|
} from 'react-native';
|
|
import Video from 'react-native-video';
|
|
|
|
class VideoTest extends React.Component {
|
|
constructor(props: {}) {
|
|
super(props);
|
|
}
|
|
|
|
render(): React.ReactElement<any> {
|
|
return (
|
|
<Video
|
|
source={{ uri: '//:example.com/test.mp4' }}
|
|
onProgress={this.onProgress}
|
|
/>
|
|
);
|
|
}
|
|
|
|
onProgress = (data: {
|
|
currentTime: number,
|
|
playableDuration: number,
|
|
}): void => {
|
|
console.log(data.currentTime, data.playableDuration);
|
|
}
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
wrapper: {
|
|
flex: 1,
|
|
},
|
|
});
|