Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Commit

Permalink
set duration state to 1 (it was getting nan value)
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedShab committed Apr 30, 2017
1 parent 17bf2aa commit 8760a18
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/redux/modules/audioplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import {
TOGGLE_SCROLL,
UPDATE,
// LOAD,
LOAD_SUCCESS,
LOAD_SUCCESS
// LOAD_FAIL
} from 'redux/constants/audioplayer.js';
} from 'redux/constants/audioplayer.js';

import {
LOAD as VERSES_LOAD,
Expand All @@ -33,6 +33,7 @@ const initialState = {
currentVerse: null,
currentWord: null,
currentTime: 0,
duration: 1,
isPlaying: false,
repeat: {
from: undefined,
Expand Down Expand Up @@ -212,7 +213,8 @@ export default function reducer(state = initialState, action = {}) {

if (!state.segments[chapterId][nextId].words[position]) return state;

const currentTime = state.segments[chapterId][nextId].words[position].startTime;
const currentTime =
state.segments[chapterId][nextId].words[position].startTime;
const endTime = state.segments[chapterId][nextId].words[position].endTime;
currentFile.currentTime = currentTime;

Expand Down

0 comments on commit 8760a18

Please sign in to comment.