Skip to content

Commit

Permalink
fix #26
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Milloy committed Jun 29, 2017
1 parent 0ad8516 commit c4b323a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
9 changes: 4 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.2.1 (29-06-2017)
[#26](https://github.com/itsnubix/react-native-video-controls/issues/26)
- Floor time values to prevent wrong time being displayed.

## 1.2.0 (20-03-2017)

[#14](https://github.com/itsnubix/react-native-video-controls/issues/14)
Expand All @@ -6,11 +10,6 @@
[#19](https://github.com/itsnubix/react-native-video-controls/issues/19)
- Updated requirements to RN 0.42.x and RN Video 1.0.0






## 1.1.1 (23-12-2016)

Restore playInBackground and playWhenInactive
Expand Down
7 changes: 5 additions & 2 deletions VideoPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,11 @@ export default class VideoPlayer extends Component {
const minutes = time / 60;
const seconds = time % 60;

const formattedMinutes = _.padStart( minutes.toFixed( 0 ), 2, 0 );
const formattedSeconds = _.padStart( seconds.toFixed( 0 ), 2 , 0 );
const formattedMinutes = _.padStart( Math.floor( minutes ).toFixed( 0 ), 2, 0 );
const formattedSeconds = _.padStart( Math.floor( seconds ).toFixed( 0 ), 2 , 0 );

// console.warn(formattedMinutes);


return `${ symbol }${ formattedMinutes }:${ formattedSeconds }`;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-video-controls",
"version": "1.2.0",
"version": "1.2.1",
"description": "A set of GUI controls for the react-native-video component",
"license": "MIT",
"main": "VideoPlayer.js",
Expand Down

0 comments on commit c4b323a

Please sign in to comment.