VANHIEP.NET - Làm web giá rẻ - Thiết Kế Website - Thiết Kế Ứng Dụng Mobile
react-native-video khao báo các thành phần props

react-native-video khao báo các thành phần props

<ScrollView
    style={{flex: 1}} contentContainerStyle={{
        flexDirection: 'column',
        justifyContent: 'center',
        alignItems: 'center',
    }} >
    {this.state.videos.map(function(video, i) {
        return <Video source={{uri: video.url}}
            key={video.key}
            repeat={true}
            playInBackground={false}
            playWhenInactive={false}
            onBuffer={self.onBuffer}
            onEnd={self.onEnd}
            onError={self.videoError}
            onFullscreenPlayerWillPresent={self.fullScreenPlayerWillPresent}
            onFullscreenPlayerDidPresent={self.fullScreenPlayerDidPresent}
            onFullscreenPlayerWillDismiss={self.fullScreenPlayerWillDismiss}
            onFullscreenPlayerDidDismiss={self.fullScreenPlayerDidDissmiss}
            onLoadStart={self.loadStart}
            onLoad={self.setDuration}
            onProgress={self.setTime}
            onTimedMetadata={self.onTimedMetadata}
            resizeMode={"cover"}
            style={{
                aspectRatio: 1,
                width: "100%"
            }}
            />
    })}
</ScrollView>