Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LunatiqueCoder committed May 15, 2022
1 parent ed10ee2 commit e10a72c
Showing 1 changed file with 54 additions and 51 deletions.
105 changes: 54 additions & 51 deletions src/VideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -387,57 +387,60 @@ export const VideoPlayer = (props: VideoPlayerProps) => {
style={[_styles.player.video, styles.videoStyle]}
source={source}
/>
loading ? <Loader animations={animations} />:
<>
<Error error={error} />
<TopControls
panHandlers={volumePanResponder.panHandlers}
animations={animations}
disableBack={disableBack}
disableVolume={disableVolume}
volumeFillWidth={volumeFillWidth}
volumeTrackWidth={volumeTrackWidth}
volumePosition={volumePosition}
onBack={events.onBack}
resetControlTimeout={resetControlTimeout}
/>
<PlayPause
animations={animations}
disablePlayPause={disablePlayPause}
paused={_paused}
togglePlayPause={togglePlayPause}
resetControlTimeout={resetControlTimeout}
showControls={showControls}
onPressRewind={() =>
videoRef?.current?.seek(currentTime - rewindTime)
}
onPressForward={() =>
videoRef?.current?.seek(currentTime + rewindTime)
}
/>
<BottomControls
animations={animations}
panHandlers={seekPanResponder.panHandlers}
disableTimer={disableTimer}
disableSeekbar={disableSeekbar}
showHours={showHours}
showDuration={showDuration}
paused={_paused}
showTimeRemaining={_showTimeRemaining}
currentTime={currentTime}
duration={duration}
seekColor={seekColor}
title={title}
toggleTimer={toggleTimer}
resetControlTimeout={resetControlTimeout}
seekerFillWidth={seekerFillWidth}
seekerPosition={seekerPosition}
setSeekerWidth={setSeekerWidth}
isFullscreen={isFullscreen}
disableFullscreen={disableFullscreen}
toggleFullscreen={toggleFullscreen}
/>
</>
{loading ? (
<Loader animations={animations} />
) : (
<>
<Error error={error} />
<TopControls
panHandlers={volumePanResponder.panHandlers}
animations={animations}
disableBack={disableBack}
disableVolume={disableVolume}
volumeFillWidth={volumeFillWidth}
volumeTrackWidth={volumeTrackWidth}
volumePosition={volumePosition}
onBack={events.onBack}
resetControlTimeout={resetControlTimeout}
/>
<PlayPause
animations={animations}
disablePlayPause={disablePlayPause}
paused={_paused}
togglePlayPause={togglePlayPause}
resetControlTimeout={resetControlTimeout}
showControls={showControls}
onPressRewind={() =>
videoRef?.current?.seek(currentTime - rewindTime)
}
onPressForward={() =>
videoRef?.current?.seek(currentTime + rewindTime)
}
/>
<BottomControls
animations={animations}
panHandlers={seekPanResponder.panHandlers}
disableTimer={disableTimer}
disableSeekbar={disableSeekbar}
showHours={showHours}
showDuration={showDuration}
paused={_paused}
showTimeRemaining={_showTimeRemaining}
currentTime={currentTime}
duration={duration}
seekColor={seekColor}
title={title}
toggleTimer={toggleTimer}
resetControlTimeout={resetControlTimeout}
seekerFillWidth={seekerFillWidth}
seekerPosition={seekerPosition}
setSeekerWidth={setSeekerWidth}
isFullscreen={isFullscreen}
disableFullscreen={disableFullscreen}
toggleFullscreen={toggleFullscreen}
/>
</>
)}
</View>
</TouchableWithoutFeedback>
);
Expand Down

0 comments on commit e10a72c

Please sign in to comment.