diff --git a/Video.js b/Video.js index 5d11936c..ddee232a 100644 --- a/Video.js +++ b/Video.js @@ -2,6 +2,7 @@ import React, {Component} from 'react'; import PropTypes from 'prop-types'; import {StyleSheet, requireNativeComponent, NativeModules, View, ViewPropTypes, Image} from 'react-native'; import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource'; +import TextTrackType from './TextTrackType'; import VideoResizeMode from './VideoResizeMode.js'; const styles = StyleSheet.create({ @@ -10,6 +11,8 @@ const styles = StyleSheet.create({ }, }); +export { TextTrackType }; + export default class Video extends Component { constructor(props) { @@ -282,6 +285,18 @@ Video.propTypes = { PropTypes.number ]) }), + textTracks: PropTypes.arrayOf( + PropTypes.shape({ + title: PropTypes.string, + uri: PropTypes.string.isRequired, + type: PropTypes.oneOf([ + TextTrackType.SRT, + TextTrackType.TTML, + TextTrackType.VTT, + ]), + language: PropTypes.string.isRequired + }) + ), paused: PropTypes.bool, muted: PropTypes.bool, volume: PropTypes.number,