rwieruch / favesound-redux

🎶 A SoundCloud Client in React + Redux running in production. Live Demo and Source Code to explore React + Redux as a beginner.
http://www.robinwieruch.de/the-soundcloud-client-in-react-redux/
1.59k stars 249 forks source link

Feature Proposal: Volume #6

Closed rwieruch closed 8 years ago

rwieruch commented 8 years ago

It would be cool to adjust the volume from within the player! The volume from 0 to 100 could be saved in the global state. Moreover it could have a mute state when you click the button.

screen shot 2016-07-08 at 18 02 58

Player component src/components/Player where you would have to place the Volume interaction. It has to fire a new action via src/actions/player to set the volume from 0 to 100 in the src/reducers/player

const initialState = {
  volume: 70,
  activeTrackId: null,
  isPlaying: false,
  playlist: []
};

When you click the mute button, it should set the volume to 0. Once this is implemented, one would take the new volume property in the player component for the <audio ... /> element to adjust the volume.