Skip to content

Commit

Permalink
fix(component): Fixed MediaPlayer end played value
Browse files Browse the repository at this point in the history
  • Loading branch information
myxvisual committed Jun 14, 2017
1 parent 25494d1 commit 9019201
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/src/routes/Components/Slider/SimpleExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ export default class SimpleExample extends React.Component<{}, void> {

render() {
return (
<div>
<div style={{ margin: "10px 0" }}>
<Slider />

<Slider
initValue={250}
maxValue={500}
style={{ margin: 10 }}
/>

<Slider
Expand Down
2 changes: 1 addition & 1 deletion src/CalendarView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export class CalendarView extends React.Component<CalendarViewProps, CalendarVie
}}
>
<p
style={{ cursor: "pointer" }}
style={{ cursor: "pointer", height: "100%" }}
onClick={this.togglePickerMode}
key={title}
>
Expand Down
6 changes: 5 additions & 1 deletion src/MediaPlayer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,11 @@ export class MediaPlayer extends React.Component<MediaPlayerProps, MediaPlayerSt
this.reactPlayer.seekTo(currPlayed);
}}
onEnded={() => {
this.setState({ currPlaying: false, currShowControl: true });
this.setState({
currPlaying: false,
currShowControl: true,
played: 0
});
}}
/>
</div>
Expand Down

0 comments on commit 9019201

Please sign in to comment.