mirror of
https://github.com/zoriya/react-native-video.git
synced 2026-06-05 11:49:45 +00:00
[Video] Implement setNativeProps
This commit is contained in:
@@ -31,6 +31,10 @@ class Video extends Component {
|
|||||||
this._onEnd = this._onEnd.bind(this);
|
this._onEnd = this._onEnd.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setNativeProps(nativeProps) {
|
||||||
|
this._root.setNativeProps(nativeProps);
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { seekTime } = this.state;
|
const { seekTime } = this.state;
|
||||||
const {
|
const {
|
||||||
@@ -75,7 +79,11 @@ class Video extends Component {
|
|||||||
onVideoEnd: this._onEnd,
|
onVideoEnd: this._onEnd,
|
||||||
});
|
});
|
||||||
|
|
||||||
return <RCTVideo ref={ref} {...nativeProps} />;
|
return (
|
||||||
|
<RCTVideo
|
||||||
|
ref={ component => this._root = component }
|
||||||
|
{...nativeProps} />
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
seek(time) {
|
seek(time) {
|
||||||
|
|||||||
Reference in New Issue
Block a user