Мой код:
Код: Выделить всё
import React, { Component, PropTypes } from "react";
import {
AppRegistry, Image, Platform, StyleSheet, Text, View, TextInput, Button, TouchableHighlight, Alert,
TouchableOpacity, ScrollView, ColorPropType, FlatList, SectionList, Dimensions,
Keyboard, Modal, NativeModules, SafeAreaView, StatusBar, ViewPropTypes,
} from 'react-native';
import Video from 'react-native-video';
export default class HomeScreen extends Component {
constructor(Props) {
super(Props);
this.state = {
error: null,
paused: true,
playing: false,
};
}
render() {
return (
{
return data_posts.id.toString();
}}
ItemSeparatorComponent={() => {
return (
)
}}
renderItem={(post, id) => {
const items = post.item;
return (
this.player = ref}
source={{ uri: "http://192.168.1.2:3200/" + items.file_Name }}
style={{ width: '100%', height: 700 }}
resizeMode="cover
volume={1.0}
controls={true}
volume={this.state.volume}
muted={this.state.muted}
paused={this.state.paused}
onLoad={this.onLoad}
onBuffer={this.onBuffer}
onError={this.videoError}
onProgress={this.onProgress}
/>
)
}}
/>
)
}
}
Подробнее здесь: https://stackoverflow.com/questions/591 ... n-or-off-t