From c977e38639dcb5fcb4315a784abf335e8c0517d5 Mon Sep 17 00:00:00 2001 From: Miguel Alatzar Date: Mon, 25 Nov 2019 17:27:24 -0700 Subject: [PATCH] Fix video player refs (#3604) --- app/screens/image_preview/video_preview.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/screens/image_preview/video_preview.js b/app/screens/image_preview/video_preview.js index 8e812ac68..19a730c92 100644 --- a/app/screens/image_preview/video_preview.js +++ b/app/screens/image_preview/video_preview.js @@ -164,16 +164,16 @@ export default class VideoPreview extends PureComponent { }; onReplay = () => { - if (this.refs.videoPlayer) { + if (this.videoPlayerRef) { this.setState({playerState: PLAYER_STATE.PLAYING, paused: false}); - this.refs.videoPlayer.seek(0); + this.videoPlayerRef.seek(0); } }; onSeek = (seek) => { - if (this.refs.videoPlayer) { + if (this.videoPlayerRef) { this.setState({currentTime: seek}, () => { - this.refs.videoPlayer.seek(seek); + this.videoPlayerRef.seek(seek); }); } }; @@ -215,7 +215,7 @@ export default class VideoPreview extends PureComponent { this.refs.controls.fadeInControls()} + onPress={() => this.controlsRef?.fadeInControls()} >