From e6e4d13bc2af99fff0fd6bb7d4bed64226760b3a Mon Sep 17 00:00:00 2001 From: Mike Wilcox Date: Fri, 10 Apr 2015 23:40:13 -0400 Subject: [PATCH] add onEnd Prop --- Video.ios.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Video.ios.js b/Video.ios.js index 4b8963d4..4f6a9cd0 100644 --- a/Video.ios.js +++ b/Video.ios.js @@ -28,6 +28,7 @@ var Video = React.createClass({ onLoad: PropTypes.func, onError: PropTypes.func, onProgress: PropTypes.func, + onEnd: PropTypes.func, }, mixins: [NativeMethodsMixin], @@ -61,6 +62,10 @@ var Video = React.createClass({ this.setNativeProps({seek: parseFloat(time)}); }, + _onEnd(event) { + this.props.onEnd && this.props.onEnd(event.nativeEvent); + }, + render() { var style = flattenStyle([styles.base, this.props.style]); var source = this.props.source; @@ -89,6 +94,7 @@ var Video = React.createClass({ }, onLoad: this._onLoad, onProgress: this._onProgress, + onEnd: this._onEnd, }); return ;