|
@@ -23,8 +23,11 @@ export const Player = ({player:{token,volume,duration=0,currentTime=0,isPlaying,
|
|
|
return (
|
|
|
<div className='Player'>
|
|
|
|
|
|
- <span>{minutesLeft || 0}:{(secondsLeft < 10?"0"+secondsLeft : secondsLeft) || "00"}</span>
|
|
|
|
|
|
+ <div className='player-nav'>
|
|
|
+
|
|
|
+ <div className='player-current-time'>
|
|
|
+ <span className='track-timer'>{minutesLeft || 0}:{(secondsLeft < 10?"0"+secondsLeft : secondsLeft) || "00"}</span>
|
|
|
<input className='currentTime'
|
|
|
type="range"
|
|
|
min={0}
|
|
@@ -32,25 +35,29 @@ export const Player = ({player:{token,volume,duration=0,currentTime=0,isPlaying,
|
|
|
max={duration ? duration : `${duration}`}
|
|
|
onChange={(e) => trackCurrentTime(e.target.value)}
|
|
|
value={currentTime}/>
|
|
|
+ <span className='track-timer'>{minutes || 0}:{(seconds < 10?"0"+seconds : seconds) || "00"}</span>
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
- <span>{minutes || 0}:{(seconds < 10?"0"+seconds : seconds) || "00"}</span>
|
|
|
+ <div className="vol-buttons">
|
|
|
+ <div className='player-buttons'>
|
|
|
<button onClick={() => trackPrevious()}><img src={prev} alt='prev'/></button>
|
|
|
{!isPlaying ? ( <button onClick={() => trackPlay()}>
|
|
|
<img src={play} alt='play'/></button>) : ( <button onClick={() => trackStop()}>
|
|
|
<img src={pause} alt='pause'/></button>)}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
<button onClick={()=>trackNext()}><img src={next} alt='next'/></button>
|
|
|
- <input
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <input className='volume'
|
|
|
type="range"
|
|
|
min={0}
|
|
|
step={0.1}
|
|
|
max={1}
|
|
|
onChange={(e) => trackVolume(e.target.value)}
|
|
|
value={volume}/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<h3>{name || ''}</h3>
|
|
|
</div>
|
|
|
)
|