Pass loadControl parameters as video props

This commit is contained in:
Bryan van Wijk
2018-08-01 15:58:02 +02:00
parent 092ba33e95
commit dde27a320e
6 changed files with 71 additions and 81 deletions

View File

@@ -11,13 +11,7 @@ const styles = StyleSheet.create({
},
});
const {
ExoPlayerConfig
} = NativeModules
const VideoPlayerConfig = Platform.OS === "android" ? ExoPlayerConfig : undefined;
export { TextTrackType, VideoPlayerConfig};
export { TextTrackType };
export default class Video extends Component {
@@ -351,6 +345,12 @@ Video.propTypes = {
paused: PropTypes.bool,
muted: PropTypes.bool,
volume: PropTypes.number,
loadControl: PropTypes.shape({
minBufferMs: PropTypes.number,
maxBufferMs: PropTypes.number,
bufferForPlaybackMs: PropTypes.number,
bufferForPlaybackAfterRebufferMs: PropTypes.number,
}),
stereoPan: PropTypes.number,
rate: PropTypes.number,
playInBackground: PropTypes.bool,